NTSTATUS
FstubWriteHeaderEFI(
  IN  PDISK_INFORMATION Disk,
  IN  ULONG PartitionEntrySectorCount,
  IN  GUID DiskGUID,
  IN  ULONG32 MaxPartitionCount,
  IN  ULONG64 FirstUsableLBA,
  IN  ULONG64 LastUsableLBA,
  IN  ULONG32 CheckSum,
  IN  ULONG Partition
  );

Routine Description:

    Write an EFI partition table header to the disk.

Arguments:

    Disk - The disk the partition table header should be written to.

    PartitionEntrySectorCount - The number of sectors that the partition
            table array occupies. These must be complete sectors.

    DiskGUID - The Unique GUID for this disk.

    MaxPartitionCount - The maximum number of partitions allowed for this
            disk.

    FirstUsableLBA - The beginning sector of partitionable space for this
            disk.  This value must be larger than the space consumed by the
            MBR, and partition table.  This value is never validated for
            correctness.

    LastUsableLBA - The last sector of partitionable space on this disk. This
            value must be smaller than the last disk sector less space
            necessary for the backup partition table. This value is not
            validated for correctness.

    CheckSum - The CRC32 checksum for the partition entry array.

    Partition - Which partition we are writing, the primary partition or
            the backup partition.

Return Values:

    NTSTATUS code.

Notes:

    PartitionEntrySectorCount could be derived from MaxPartitionCount.