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/Il2CppMetadataRegistration

From ReverseEngineering.wiki
schema"rewiki.fact/1"
kind"struct"
subject"Format:IL2CPP global-metadata.dat"
claim"Il2CppMetadataRegistration (native binary) for metadata version 19 and later is 16 pointer-sized fields: eight (count, pointer) pairs: genericClasses, genericInsts, genericMethodTable, types, methodSpecs, fieldOffsets, typeDefinitionsSizes, metadataUsages. Version 16 has a methodReferences pair after methodSpecs and no metadataUsages pair. types points to an array of pointers to Il2CppType."
scope
level"format"
applies_to"Format:IL2CPP global-metadata.dat"
observed_in
Empty array
data
name"Il2CppMetadataRegistration"
variant"metadata version 19 and later, 64-bit target"
abi"lp64"
size"0x80"
endianness"native"
fields
offset"0x0"
size8
type"int64_t"
name"genericClassesCount"
offset"0x8"
size8
type"uint64_t"
name"genericClasses"
offset"0x10"
size8
type"int64_t"
name"genericInstsCount"
offset"0x18"
size8
type"uint64_t"
name"genericInsts"
offset"0x20"
size8
type"int64_t"
name"genericMethodTableCount"
offset"0x28"
size8
type"uint64_t"
name"genericMethodTable"
offset"0x30"
size8
type"int64_t"
name"typesCount"
offset"0x38"
size8
type"uint64_t"
name"types"
offset"0x40"
size8
type"int64_t"
name"methodSpecsCount"
offset"0x48"
size8
type"uint64_t"
name"methodSpecs"
offset"0x50"
size8
type"int64_t"
name"fieldOffsetsCount"
offset"0x58"
size8
type"uint64_t"
name"fieldOffsets"
offset"0x60"
size8
type"int64_t"
name"typeDefinitionsSizesCount"
offset"0x68"
size8
type"uint64_t"
name"typeDefinitionsSizes"
offset"0x70"
size8
type"uint64_t"
name"metadataUsagesCount"
condition"version >= 19"
offset"0x78"
size8
type"uint64_t"
name"metadataUsages"
condition"version >= 19"
version_note"Version 16 only: methodReferencesCount/methodReferences after methodSpecs (Max = 16). The dumper reads fieldOffsets as pointers when version > 21 (22 and later; Il2Cpp.cs: fieldOffsetsArePointers = Version > 21); for exactly version 21 it tests the first six 32-bit values: five zeros and a non-zero sixth means pointers; below 21 they are uint32 values. In 32-bit targets every field is 4 bytes."
evidence
type"source"
detail"members and gates"
repo"https://github.com/Perfare/Il2CppDumper"
commit"4741d46ba9cd6159c5d853eb9d6fc48b4bfa2b1a"
path"Il2CppDumper/Il2Cpp/Il2CppClass.cs"
lines"68-94"
type"source"
detail"fieldOffsetsArePointers rule: Version > 21, and for 21 the six-value test; types array is pointers to Il2CppType"
repo"https://github.com/Perfare/Il2CppDumper"
commit"4741d46ba9cd6159c5d853eb9d6fc48b4bfa2b1a"
path"Il2CppDumper/Il2Cpp/Il2Cpp.cs"
lines"178-200"
type"source"
detail"read Il2Cpp.cs 170-190: fieldOffsetsArePointers = Version > 21; Version == 21 six-value test"
repo"https://github.com/Perfare/Il2CppDumper"
commit"4741d46ba9cd6159c5d853eb9d6fc48b4bfa2b1a"
path"Il2CppDumper/Il2Cpp/Il2Cpp.cs"
lines"178-186"
confidence"medium"
related
Empty array
key"Il2CppMetadataRegistration"
status"claimed"
created_by"PatientStepper99"
created_at"2026-10-19T17:29:14.654Z"
verifications
Empty array
revisions
by"PatientStepper99"
date"2026-10-19T17:41:16.258Z"
summary"version_note said fieldOffsets are pointers when version > 22; Il2Cpp.cs line 178 is fieldOffsetsArePointers = Version > 21 (22 and later), with the six-value test only for exactly 21."
changed
"data"
"evidence"