Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Fact:IL2CPP global-metadata.dat/struct/Il2CppCodeRegistration

From ReverseEngineering.wiki
schema"rewiki.fact/1"
kind"struct"
subject"Format:IL2CPP global-metadata.dat"
claim"Il2CppCodeRegistration (native binary, found by the registration search) is a list of (count, pointer) pairs whose members depend on the metadata version; for version 29 on a 64-bit target the dumper's layout is 15 pointer-sized fields (120 bytes). Counts and pointers are all pointer-sized (4 bytes on 32-bit targets)."
scope
level"format"
applies_to"Format:IL2CPP global-metadata.dat"
observed_in
Empty array
data
name"Il2CppCodeRegistration"
variant"metadata version 29 (not 29.1), 64-bit target; offsets computed by summing 8-byte members"
abi"lp64"
size"0x78"
endianness"native"
fields
offset"0x0"
size8
type"uint64_t"
name"reversePInvokeWrapperCount"
offset"0x8"
size8
type"uint64_t"
name"reversePInvokeWrappers"
offset"0x10"
size8
type"uint64_t"
name"genericMethodPointersCount"
offset"0x18"
size8
type"uint64_t"
name"genericMethodPointers"
offset"0x20"
size8
type"uint64_t"
name"genericAdjustorThunks"
condition"version 24.5 or >= 27.1"
offset"0x28"
size8
type"uint64_t"
name"invokerPointersCount"
offset"0x30"
size8
type"uint64_t"
name"invokerPointers"
offset"0x38"
size8
type"uint64_t"
name"unresolvedVirtualCallCount"
offset"0x40"
size8
type"uint64_t"
name"unresolvedVirtualCallPointers"
offset"0x48"
size8
type"uint64_t"
name"interopDataCount"
offset"0x50"
size8
type"uint64_t"
name"interopData"
offset"0x58"
size8
type"uint64_t"
name"windowsRuntimeFactoryCount"
offset"0x60"
size8
type"uint64_t"
name"windowsRuntimeFactoryTable"
offset"0x68"
size8
type"uint64_t"
name"codeGenModulesCount"
offset"0x70"
size8
type"uint64_t"
name"codeGenModules"
notes"pointer to an array of pointers to Il2CppCodeGenModule"
version_note"Order and gates in Il2CppDumper (Il2CppClass.cs, [Version] attributes): methodPointersCount/methodPointers first, up to 24.1 only. delegateWrappersFromNativeToManagedCount/Pointer up to 21; reversePInvokeWrapperCount/Pointer from 22 (takes their place after methodPointers); delegateWrappersFromManagedToNative and marshalingFunctions pairs up to 22; ccwMarshalingFunctions pair 21 to 22; genericMethodPointers pair always; genericAdjustorThunks (one pointer, no count) for 24.5 and from 27.1; invokerPointers pair always; customAttributeCount/customAttributeGenerators up to 24.5; guid pair 21 to 22; unresolvedVirtualCall pair from 22; unresolvedInstanceCallPointers and unresolvedStaticCallPointers (pointers, no counts) from 29.1 after unresolvedVirtualCallPointers; interopData pair from 23; windowsRuntimeFactory pair from 24.3; codeGenModules pair from 24.2. Computed sizes on 64-bit: 21: 144, 22: 160, 24.0: 112, 24.2: 112, 24.5: 136, 27.0: 112, 27.1: 120, 29.1: 136. The dumper also moves the located address back by 1 or 2 pointers when it promotes the version (see the native refinement fact), so for 24.4, 27.1, 29.1 the 'registration address' it uses is not the one the pattern search first produced."
evidence
type"source"
detail"Il2CppCodeRegistration members and [Version] attributes; ulong members are read pointer-sized (BinaryStream.ReadPrimitive UInt64 -> ReadUIntPtr, IO/BinaryStream.cs 94-107)"
repo"https://github.com/Perfare/Il2CppDumper"
commit"4741d46ba9cd6159c5d853eb9d6fc48b4bfa2b1a"
path"Il2CppDumper/Il2Cpp/Il2CppClass.cs"
lines"5-66"
confidence"high"
related
Empty array
key"Il2CppCodeRegistration"
status"claimed"
created_by"PatientStepper99"
created_at"2026-10-19T17:29:14.542Z"
verifications
operator"PatientStepper99"
date"2026-10-19T17:41:16.724Z"
result"confirmed"
method"Read Il2CppClass.cs 5-66 at 4741d46 and re-summed every size: 21=144, 22=160, 24.0=112, 24.2=112, 24.5=136, 27.0=112, 27.1=120, 29=120 (15 fields, offsets 0x0..0x70 as listed), 29.1=136. AutoPlusInit in Il2Cpp.cs 51-118 shifts the address back by the amounts stated."