namespace SabreTools.Data.Models.PortableExecutable.LoadConfiguration { /// /// The data directory entry for a pre-reserved SEH load configuration /// structure must specify a particular size of the load configuration /// structure because the operating system loader always expects it to /// be a certain value. In that regard, the size is really only a /// version check. For compatibility with Windows XP and earlier versions /// of Windows, the size must be 64 for x86 images. /// /// public sealed class Directory { /// /// Flags that indicate attributes of the file, currently unused. /// public uint Characteristics { get; set; } /// /// Date and time stamp value. The value is represented in the number of /// seconds that have elapsed since midnight (00:00:00), January 1, 1970, /// Universal Coordinated Time, according to the system clock. The time /// stamp can be printed by using the C runtime (CRT) time function. /// public uint TimeDateStamp { get; set; } /// /// Major version number. /// public ushort MajorVersion { get; set; } /// /// Minor version number. /// public ushort MinorVersion { get; set; } /// /// The global loader flags to clear for this process as the loader starts /// the process. /// public uint GlobalFlagsClear { get; set; } /// /// The global loader flags to set for this process as the loader starts /// the process. /// public uint GlobalFlagsSet { get; set; } /// /// Memory that must be freed before it is returned to the system, in bytes. /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong DeCommitFreeBlockThreshold { get; set; } /// /// Total amount of free memory, in bytes. /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong DeCommitTotalFreeThreshold { get; set; } /// /// [x86 only] The VA of a list of addresses where the LOCK prefix is used so /// that they can be replaced with NOP on single processor machines. /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong LockPrefixTable { get; set; } /// /// Maximum allocation size, in bytes. /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong MaximumAllocationSize { get; set; } /// /// Maximum virtual memory size, in bytes. /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong VirtualMemoryThreshold { get; set; } /// /// Setting this field to a non-zero value is equivalent to calling /// SetProcessAffinityMask with this value during process startup (.exe only) /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong ProcessAffinityMask { get; set; } /// /// Process heap flags that correspond to the first argument of the /// HeapCreate function. These flags apply to the process heap that /// is created during process startup. /// public uint ProcessHeapFlags { get; set; } /// /// The service pack version identifier. /// public ushort CSDVersion { get; set; } /// /// Must be zero. /// public ushort Reserved { get; set; } /// /// Reserved for use by the system. /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong EditList { get; set; } // /// A pointer to a cookie that is used by Visual C++ or GS implementation. /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong SecurityCookie { get; set; } /// /// [x86 only] The VA of the sorted table of RVAs of each valid, unique /// SE handler in the image. /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong SEHandlerTable { get; set; } /// /// [x86 only] The count of unique handlers in the table. /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong SEHandlerCount { get; set; } /// /// The VA where Control Flow Guard check-function pointer is stored. /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong GuardCFCheckFunctionPointer { get; set; } /// /// The VA where Control Flow Guard dispatch-function pointer is stored. /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong GuardCFDispatchFunctionPointer { get; set; } /// /// The VA of the sorted table of RVAs of each Control Flow Guard /// function in the image. /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong GuardCFFunctionTable { get; set; } /// /// The count of unique RVAs in the above table. /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong GuardCFFunctionCount { get; set; } /// /// Control Flow Guard related flags. /// public GuardFlags GuardFlags { get; set; } /// /// Code integrity information. /// /// 12 bytes public byte[] CodeIntegrity { get; set; } = new byte[12]; /// /// The VA where Control Flow Guard address taken IAT table is stored. /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong GuardAddressTakenIatEntryTable { get; set; } /// /// The count of unique RVAs in the above table. /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong GuardAddressTakenIatEntryCount { get; set; } /// /// The VA where Control Flow Guard long jump target table is stored. /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong GuardLongJumpTargetTable { get; set; } /// /// The count of unique RVAs in the above table. /// /// This value is 32-bit if PE32 and 64-bit if PE32+ public ulong GuardLongJumpTargetCount { get; set; } } }