NTSTATUS
FstubReadHeaderEFI(
  IN  PDISK_INFORMATION Disk,
  IN  ULONG PartitionTable,
  OUT PEFI_PARTITION_HEADER* HeaderBuffer
  );

Routine Description:

    Read in and validate the EFI partition table header.

    The algorithm for validating the partition table header is as follows:

      1) Check the Partitin Table Signature, Revision and Size.

      2) Check the Partition Table CRC.

      3) Check that the MyLBA entry to the LBA that contains the Partition
         Table.

      4) Check that the CRC of the partition Entry Array is correct.

Arguments:

    Disk - The disk to read the EFI partition table header from.

    PartitionTable - Whether to read the primary or backup partition table.

    HeaderBuffer - Pointer to a buffer when the header table pointer will be
            copied on success. Note that, the header table is physically
            stored in the disk's scratch buffer.

Return Values:

    STATUS_SUCCESS - If the header was successfully read.

    STATUS_DISK_CORRUPT_ERROR - If the specified header is invalid and/or
            corrupt.

    NTSTATUS code - For other errors.