benilla-re systems structs docs

WardenModuleHeader

struct · warden · 40 bytes

Meaning
Holds the ten dwords that open a decompressed module image
Confidence
verified, proof two
Finding
warden/modules#the-module-image

Finding: The module image in warden: module decoding and loading

A decompressed module is a header, a section table and a stream of runs. Header values are offsets from the image base. At +0x28 each section has 12 bytes: an address, a size and a Win32 protection. The runs follow the table. A run is a 16-bit length; runs alternate between copied (the bytes follow) and skipped (zeros), starting with a copy at the first section's address and ending when the address reaches the image size.

offsetfield
+0x00image size, under 0x80000000
+0x04not read
+0x08relocation stream
+0x0crelocation count
+0x10export table
+0x14export count
+0x18ordinal of the first export
+0x1cimport table
+0x20import count
+0x24section count

The derivation is in the doc.

Fields 10

offsetsizetypenamemeaningconfidencefinding
0x00004uint32_tm_imageSizeHolds the size of the imageverified, proof twowarden/modules#the-module-image
0x00044uint32_tm_unreadHolds a dword the loader copies and never readsverified, proof twowarden/modules#the-module-image
0x00084uint32_tm_relocationOffsetHolds the offset of the relocation streamverified, proof twowarden/modules#the-module-image
0x000c4uint32_tm_relocationCountHolds the number of relocation entriesverified, proof twowarden/modules#the-module-image
0x00104uint32_tm_exportOffsetHolds the offset of the export tableverified, proof twowarden/modules#the-module-image
0x00144uint32_tm_exportCountHolds the number of exportsverified, proof twowarden/modules#the-module-image
0x00184uint32_tm_exportBaseHolds the ordinal of the first exportverified, proof twowarden/modules#the-module-image
0x001c4uint32_tm_importOffsetHolds the offset of the import tableverified, proof twowarden/modules#the-module-image
0x00204uint32_tm_importCountHolds the number of import librariesverified, proof twowarden/modules#the-module-image
0x00244uint32_tm_sectionCountHolds the number of 12-byte section entries after the headerverified, proof twowarden/modules#the-module-image