This CodeDirectory is tailored specifically at version 0x20400.
Fields
magic: u32,
Magic number (CSMAGIC_CODEDIRECTORY)
length: u32,
Total length of CodeDirectory blob
version: u32,
Compatibility version
flags: u32,
Setup and mode flags
hashOffset: u32,
Offset of hash slot element at index zero
identOffset: u32,
Offset of identifier string
nSpecialSlots: u32,
Number of special hash slots
nCodeSlots: u32,
Number of ordinary (code) hash slots
codeLimit: u32,
Limit to main image signature range
hashSize: u8,
Size of each hash in bytes
hashType: u8,
Type of hash (cdHashType* constants)
platform: u8,
Platform identifier; zero if not platform binary
pageSize: u8,
log2(page size in bytes); 0 => infinite
spare2: u32,
Unused (must be zero)
scatterOffset: u32,
teamOffset: u32,
spare3: u32,
codeLimit64: u64,
execSegBase: u64,
Offset of executable segment
execSegLimit: u64,
Limit of executable segment
execSegFlags: u64,
Executable segment flags