using System.Runtime.InteropServices;
namespace BurnOutSharp.Models.LinearExecutable
{
///
/// The `information block` in the LE header contains the linker version number,
/// length of various tables that further describe the executable file, the
/// offsets from the beginning of the header to the beginning of these tables,
/// the heap and stack sizes, and so on. The following list summarizes the
/// contents of the header `information block` (the locations are relative to
/// the beginning of the block):
///
///
[StructLayout(LayoutKind.Sequential)]
public class InformationBlock
{
///
/// Specifies the signature word 'LE' (4Ch 45H)
///
public char[] Signature;
///
/// Byte order
///
public ByteOrder ByteOrder;
///
/// Word order
///
public WordOrder WordOrder;
///
/// Executable format level
///
public uint ExecutableFormatLevel;
///
/// CPU type
///
public CPUType CPUType;
///
/// Target operating system
///
public OperatingSystem TargetOperatingSystem;
///
/// Module version
///
public uint ModuleVersion;
///
/// Module type flags
///
public InformationBlockFlag ModuleTypeFlags;
///
/// Number of memory pages
///
public uint MemoryPageCount;
///
/// Initial object CS number
///
public uint InitialObjectCS;
///
/// Initial EIP
///
public uint InitialEIP;
///
/// Initial object SS number
///
public uint InitialObjectSS;
///
/// Initial ESP
///
public uint InitialESP;
///
/// Memory page size
///
public uint MemoryPageSize;
///
/// Bytes on last page
///
public uint BytesOnLastPage;
///
/// Fix-up section size
///
public uint FixupSectionSize;
///
/// Fix-up section checksum
///
public uint FixupSectionChecksum;
///
/// Loader section size
///
public uint LoaderSectionSize;
///
/// Loader section checksum
///
public uint LoaderSectionChecksum;
///
/// Offset of object table
///
public uint ObjectTableOffset;
///
/// Object table entries
///
public uint ObjectTableCount;
///
/// Object page map offset
///
public uint ObjectPageMapOffset;
///
/// Object iterate data map offset
///
public uint ObjectIterateDataMapOffset;
///
/// Resource table offset
///
public uint ResourceTableOffset;
///
/// Resource table entries
///
public uint ResourceTableCount;
///
/// Resident names table offset
///
public uint ResidentNamesTableOffset;
///
/// Entry table offset
///
public uint EntryTableOffset;
///
/// Module directives table offset
///
public uint ModuleDirectivesTableOffset;
///
/// Module directives entries
///
public uint ModuleDirectivesCount;
///
/// Fix-up page table offset
///
public uint FixupPageTableOffset;
///
/// Fix-up record table offset
///
public uint FixupRecordTableOffset;
///
/// Imported modules name table offset
///
public uint ImportedModulesNameTableOffset;
///
/// Imported modules count
///
public uint ImportedModulesCount;
///
/// Imported procedure name table offset
///
public uint ImportedProcedureNameTableOffset;
///
/// Per-page checksum table offset
///
public uint PerPageChecksumTableOffset;
///
/// Data pages offset from top of file
///
public uint DataPagesOffset;
///
/// Preload page count
///
public uint PreloadPageCount;
///
/// Non-resident names table offset from top of file
///
public uint NonresidentNamesTableOffset;
///
/// Non-resident names table length
///
public uint NonresidentNamesTableLength;
///
/// Non-resident names table checksum
///
public uint NonresidentNamesTableChecksum;
///
/// Automatic data object
///
public uint AutomaticDataObject;
///
/// Debug information offset
///
public uint DebugInformationOffset;
///
/// Debug information length
///
public uint DebugInformationLength;
///
/// Preload instance pages number
///
public uint PreloadInstancePagesNumber;
///
/// Demand instance pages number
///
public uint DemandInstancePagesNumber;
///
/// Extra heap allocation
///
public uint ExtraHeapAllocation;
///
/// ???
///
public uint Reserved;
}
}