From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:PE (Portable Executable)" |
|---|
| claim | "The COFF file header of a PE image is 20 bytes at e_lfanew + 4: Machine, NumberOfSections, TimeDateStamp, PointerToSymbolTable, NumberOfSymbols, SizeOfOptionalHeader, Characteristics." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:PE (Portable Executable)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "IMAGE_FILE_HEADER" |
|---|
| size | 20 |
|---|
| fields | | offset | 0 |
|---|
| size | 2 |
|---|
| type | "uint16" |
|---|
| name | "Machine" |
|---|
| notes | "0x14C x86, 0x8664 x64, 0xAA64 ARM64" |
|---|
|
| offset | 2 |
|---|
| size | 2 |
|---|
| type | "uint16" |
|---|
| name | "NumberOfSections" |
|---|
|
| offset | 4 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "TimeDateStamp" |
|---|
| notes | "link time, or a hash in /Brepro builds" |
|---|
|
| offset | 8 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "PointerToSymbolTable" |
|---|
| notes | "COFF symbols, 0 in most images" |
|---|
|
| offset | 12 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "NumberOfSymbols" |
|---|
|
| offset | 16 |
|---|
| size | 2 |
|---|
| type | "uint16" |
|---|
| name | "SizeOfOptionalHeader" |
|---|
| notes | "224 PE32, 240 PE32+ normally" |
|---|
|
| offset | 18 |
|---|
| size | 2 |
|---|
| type | "uint16" |
|---|
| name | "Characteristics" |
|---|
| notes | "IMAGE_FILE_* flags" |
|---|
|
|
|---|
| endianness | "little" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "__IMAGE_FILE_HEADER_format__" |
|---|
| repo | "https://github.com/erocarrera/pefile" |
|---|
| commit | "58186a92164842cf758822e067bc79c59b3c80d9" |
|---|
| path | "pefile.py" |
|---|
| lines | "2429-2440" |
|---|
|
| type | "source" |
|---|
| detail | "Structure.__init__: 'Format is forced little endian', __format_str__ = "<"" |
|---|
| repo | "https://github.com/erocarrera/pefile" |
|---|
| commit | "58186a92164842cf758822e067bc79c59b3c80d9" |
|---|
| path | "pefile.py" |
|---|
| lines | "942-945" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "IMAGE_FILE_HEADER" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T10:17:24.124Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T12:52:45.214Z" |
|---|
| summary | "Byte order set: pefile forces '<' (little) for every PE structure" |
|---|
| changed | |
|---|
|
|
|---|