From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:IL2CPP global-metadata.dat" |
|---|
| claim | "Il2CppDumper finds Il2CppCodeRegistration and Il2CppMetadataRegistration by (1) a pattern search over data sections (PE: characteristics 0x40000040 or 0xC0000040 are data, 0x60000020 executable) via SectionHelper, (2) an ELF-only lookup of the dynamic symbols g_CodeRegistration and g_MetadataRegistration, (3) manual input. Program.Init order: PlusSearch; on Windows for a PE that failed, PlusSearch again on a custom PE loader image; Search(); SymbolSearch(); manual. PE Search() and SymbolSearch() return false. CodeRegistration before 24.2: a pointer-sized value equal to the method count followed by a pointer to that many pointers, all in executable sections. From 24.2: find the bytes 'mscorlib.dll'+NUL, follow two pointer references to the codeGenModules array; registration = 13 pointers before that reference (below 29; for 27+ only if the value before it equals the image count) or 14 (29+). ELF tries executable sections first, then data; other formats data first. MetadataRegistration: not searched below 19; 19 to 26: a value equal to the type definition count, then after two pointers a pointer to metadataUsagesCount pointers all in bss; registration 12 pointers before the count; 27+: two consecutive values equal to the type definition count, then a pointer to that many pointers lying in executable sections if CodeRegistration was found in one, else in data; registration 10 pointers before the first." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:IL2CPP global-metadata.dat" |
|---|
| observed_in | |
|---|
|
|---|
| data | | trigger | "dumping a binary with its global-metadata.dat" |
|---|
| effect | "yields CodeRegistration and MetadataRegistration virtual addresses" |
|---|
| function | "SectionHelper.FindCodeRegistration, FindMetadataRegistration; Elf.SymbolSearch; Program.Init" |
|---|
| condition | "version thresholds 19, 24.2, 27, 29" |
|---|
| not_read | "Mach-O and NSO section selection, WebAssembly, Elf32 Search body" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "FindCodeRegistration/FindMetadataRegistration and the three private finders read in full" |
|---|
| repo | "https://github.com/Perfare/Il2CppDumper" |
|---|
| commit | "4741d46ba9cd6159c5d853eb9d6fc48b4bfa2b1a" |
|---|
| path | "Il2CppDumper/Utils/SectionHelper.cs" |
|---|
| lines | "167-327, 349-407" |
|---|
|
| type | "source" |
|---|
| detail | "SymbolSearch reads g_CodeRegistration and g_MetadataRegistration from the symbol table via DT_STRTAB names" |
|---|
| repo | "https://github.com/Perfare/Il2CppDumper" |
|---|
| commit | "4741d46ba9cd6159c5d853eb9d6fc48b4bfa2b1a" |
|---|
| path | "Il2CppDumper/ExecutableFormats/Elf64.cs" |
|---|
| lines | "100-125" |
|---|
|
| type | "source" |
|---|
| detail | "PE Search and SymbolSearch return false; section characteristics selection" |
|---|
| repo | "https://github.com/Perfare/Il2CppDumper" |
|---|
| commit | "4741d46ba9cd6159c5d853eb9d6fc48b4bfa2b1a" |
|---|
| path | "Il2CppDumper/ExecutableFormats/PE.cs" |
|---|
| lines | "78-125" |
|---|
|
| type | "source" |
|---|
| detail | "search order and manual fallback" |
|---|
| repo | "https://github.com/Perfare/Il2CppDumper" |
|---|
| commit | "4741d46ba9cd6159c5d853eb9d6fc48b4bfa2b1a" |
|---|
| path | "Il2CppDumper/Program.cs" |
|---|
| lines | "207-237" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Locating the registrations in the binary" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T17:28:20.330Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T17:41:16.339Z" |
|---|
| summary | "Add the pointerInExec condition omitted for the 27+ MetadataRegistration search and the exact PE custom-loader scope; read SectionHelper.cs whole, Program.cs 207-237, PE.cs 78-125, Elf64.cs 100-125." |
|---|
| changed | |
|---|
|
|
|---|