๐ Feature Comparison โ Rust vs C# vs Python
| Feature | Python | C# | Rust (This) |
|---|---|---|---|
| dump.cs generation | โ ๏ธ Basic (no properties) | โ Full | โ Full |
| DummyDLL generation | โ No | โ Yes | โ Yes (parallel) |
| il2cpp.h struct gen | โ ๏ธ Basic | โ Full | โ Full |
| script.json | โ Yes | โ Yes | โ Yes |
| stringliteral.json | โ Yes | โ Yes | โ Yes |
| Split Dump Per Type (DiffableCS) | โ No | โ No | โ Yes (parallel) |
| Variable-width indices (v39/Unity 6) | โ No | โ No | โ Yes |
| Auto-XOR Metadata Decryption | โ No | โ No | โ Yes |
| Latest Unity Formats (v104, v106) | โ No | โ No | โ Yes |
| Assembly name in dump.cs | โ No | โ No | โ Yes |
| Unity version detection | โ No | โ No | โ Auto-detect |
| Inline Disassembly (ARM64/ARM32/x86/x64) | โ No | โ No | โ Yes |
| Control Flow Graph (CFG) Analysis | โ No | โ No | โ Yes |
| Metadata Annotations (strings, types, vtable) | โ No | โ No | โ Yes |
| Semantic Variable Tracking | โ No | โ No | โ Yes |
| Forward Constant Propagation | โ No | โ No | โ Yes |
| Backward Slicing (Vtable Resolution) | โ No | โ ๏ธ Partial (Cpp2IL) | โ Yes |
| Init-Check Folding | โ No | โ No | โ Yes |
String Literal Indirect Resolution (il2cpp_string_new_wrapper) |
โ No | โ No | โ Yes |
| Generic Instantiation Tracking | โ No | โ No | โ Yes |
| Switch Table Reconstruction | โ No | โ No | โ Yes |
| Boxing/Unboxing Pattern Detection | โ No | โ No | โ Yes |
| Static Field Access Annotation | โ No | โ No | โ Yes |
| CODM (Call of Duty Mobile) Support | โ No | โ No | โ Yes (Android + iOS, 32/64-bit) |
| Fat Mach-O (Universal) | โ No | โ Yes | โ Yes |
| WASM (WebGL) | โ Yes | โ Yes | โ Yes |
| Dump file support | โ No | โ Yes | โ Yes (+ ELF reload) |
| v27+ ImageBase fix | โ No | โ Yes | โ Yes |
Parallel I/O (rayon) |
โ No | โ No | โ Yes |
| Auto-numbered output dirs | โ No | โ No | โ Dump0/, Dump1/... |
| Modern CLI UI (spinners, colors, prompts) | โ No | โ No | โ Yes |
| Cross-platform binary | โ ๏ธ Needs Python | โ ๏ธ Needs .NET | โ Standalone |
| C++ Scaffold (il2cpp-functions.h) | โ No | โ No | โ Yes |
| C++ Name Mangling (Itanium ABI) | โ No | โ No | โ Yes |
| Unity Header Auto-Detection | โ No | โ Yes | โ Yes (version-matched) |
| cpp_project/ Scaffolding | โ No | โ Yes | โ Yes |
| Topological Sort (type ordering) | โ No | โ No | โ Yes |
| Type Group Classification | โ No | โ No | โ Yes |
| Enhanced IDA Metadata | โ No | โ No | โ Yes |
| ELF Section Header Symbol Fallback | โ No | โ Yes | โ Yes |
| GUI | โ No | โ WinForms | โ Jetpack Compose + Tauri |
| Embeddable as library | โ No | โ No | โ Rust crate / JNI |
โก Performance
| Phase | Python | C# | Rust |
|---|---|---|---|
| Metadata loading | ~3.7s | ~2s | ~0.5s |
| Binary loading | ~5.2s | ~3s | ~0.8s |
| Search & Init | ~5.4s | ~2s | ~0.3s |
| dump.cs | ~14s | ~5s | ~2s |
| Struct generation | ~6.4s | ~5s | ~3.5s |
| DummyDLL | โ N/A | ~3s | ~1.5s |
| Total | ~35s | ~20s | ~5โ8s |
4ร faster than Python, 2.4ร faster than C# โ on the same binary.
โจ Features
Core Dumping
- dump.cs โ Full C# class/method/field/property decompilation with RVA/VA/Offset and assembly names
- Inline Disassembly โ Optional per-method native assembly embedded directly in dump.cs
- DiffableCs โ Splits classes into individual
.csfiles by namespace, parallelized withrayon - script.json โ Method addresses/signatures for IDA/Ghidra scripting
- il2cpp.h โ C struct definitions for native analysis with topological type ordering
- stringliteral.json โ All string literal values and indices
- DummyDLL โ Reconstructed .NET assemblies for dnSpy/ILSpy (parallelized)
C++ Headers & Scaffolding
- il2cpp-functions.h โ C++ scaffold with function pointer typedefs for hooking
- Itanium ABI Name Mangling โ Correct C++ mangled names for all IL2CPP types
- Unity Header Auto-Detection โ Version-matched
il2cpp-types.handil2cpp-api.hfrom embedded header database - cpp_project/ โ Ready-to-compile C++ project scaffold with includes and CMake structure
- Topological Sort โ Types emitted in dependency order; circular dependencies detected with fallback
- Type Group Classification โ Types categorized into forward declarations, method types, generic types, usage types
- Compiler Layout โ GCC (
__attribute__) or MSVC (__declspec) layout attributes - Enhanced IDA Metadata โ Extra type info annotations for IDA Pro scripts
Disassembly Engine
- Multi-Architecture โ ARM64 (
yaxpeax-arm), ARM32, x86/x64 (iced-x86) - Control Flow Graph (CFG) โ Basic block detection, branch targets, loop back-edges,
if (condition)reconstruction - Metadata Annotations โ String literals, type info, method/field references, vtable resolution via
ADRP+LDRpatterns - Semantic Variable Tracking โ Maps registers to parameter names (
X0โthis,X1โarg0) - Forward Constant Propagation โ Tracks register values (MOVZ/MOVK/ADD/SUB/ORR/ADRP) across instructions to resolve register+register memory accesses like
LDR X0, [X22, X21, LSL #3]into field names (e.g.// this.<>2__current). First IL2CPP tool to annotate indexed field accesses. - Backward Slicing for Vtable Resolution โ On
BLR Xn, walks backward throughLDR X8, [X0](klass) โLDR X9, [X8, #N](vtable slot) chains to resolve indirect calls into// virtual call: TypeName.MethodNameinstead of opaquesub_XXXXXX. - Initialization-Check Folding โ Detects and collapses
il2cpp_codegen_initialize_method,Il2CppCodeGenWriteBarrier, andTBZ/TBNZ-on-bit-0 prologue patterns into a single// [init check]annotation, drastically reducing method-body noise. - Indirect String Literal Resolution โ Tracks the literal index in
W0/W1atil2cpp_string_new_wrappercall sites and resolves throughmetadata_string_literalsto annotate the actual string content (// "Hello, world"). - Generic Instantiation Tracking โ Resolves calls into
MethodInfo*slots viamethod_definition_method_specsto annotate the concrete specialization (e.g.// โ List<int>.Add(this, item)). - Switch Table Reconstruction โ Detects ARM64 jump-table prologues (
ADRP+ADD+LDR Xn, [Xn, Xidx, lsl #2]+BR Xn) using reg+reg propagation and emitsswitch (var)blocks in the CFG. - Boxing / Unboxing Detection โ Annotates
il2cpp_codegen_box/il2cpp_unboxcall sites with the resolved boxed type from the first-arg type pointer. - Static Field Access Annotation โ Resolves the
ADRP+ADD โ LDR X8, [Xklass, #static_fields_offset] โ LDR Wd, [X8, #field_offset]pattern into// SomeClass.staticFieldusing the existing klass identification map. - Configurable โ Toggle hex bytes, field names, annotations, CFG independently
Supported Platforms
| Platform | Format | Status |
|---|---|---|
| Android | ELF32 / ELF64 | โ |
| iOS / macOS | Mach-O / Fat Mach-O | โ |
| Windows | PE32 / PE64 | โ |
| Nintendo Switch | NSO | โ |
| WebGL | WASM | โ |
IL2CPP Versions
- v16 โ v39 (Unity 5.3 โ Unity 6)
- Variable-width indices for v39/Unity 6
- Latest undocumented formats:
v104,v106 - Auto XOR metadata decryption (1-byte, 4-byte, 8-byte, rolling, position-dependent, header-only)
- Manual version override via config
CODM (Call of Duty Mobile)
- Custom v23 metadata layout with two-slot
type_definitions_countfingerprint anchor - Android packed relocations (
DT_ANDROID_RELA/DT_ANDROID_REL, APS2 + SLEB128) for 32-bit and 64-bit ELF - iOS chained fixups (
LC_DYLD_CHAINED_FIXUPS) and legacy rebase opcodes (LC_DYLD_INFO_ONLY) for 32-bit and 64-bit Mach-O - Pointer formats:
DYLD_CHAINED_PTR_64,_64_OFFSET, ARM64E variants - Self-healing Mach-O VA resolver โ if a slot's chain wasn't walked,
map_vatrdecodes the raw chained pointer on the fly (CODM-gated, no impact on standard Mach-O) - Il2CppType decryption โ XOR-with-
0x35stream cipher onbits(4 bytes) anddatapoint(8 bytes), with three combined detection markers:bitsbyte 3 low 5 bits ==0x15(encryptednum_modssignature)datapointhigh 32 bits ==0x35353535(encrypted klass_index high half)- Current
type_enuminvalid + XOR'dtype_enumvalid (catches obfuscator-only patterns like0x27 โ Class,0x24 โ ValueType)
- ~95 % of encrypted Il2CppType entries recovered (class names, value types, generic instances, field type references). The remaining ~5 % are intentional decoy fields with the
LITERAL(0x40) attribute flag set on real instance fields โ same limitation as the C# CODM dumper; not an encryption gap. - Toggle via
--codmflag orCodm: truein config โ additive code path, leaves standard Unity games untouched
What's new in v6.1
CODM resilient initialization
- ๐ Fixed CODM disk-based dumps crashing with "Auto mode failed" โ CODM binaries have correct
CodeRegistration/MetadataRegistrationaddresses, but some internal struct fields (e.g.generic_method_pointers,invoker_pointers) point to obfuscated/invalid addresses. Previously, any single unmappable pointer inload_pointers,load_types, orload_genericswould abort the entireinit(), causing all fallback strategies to fail even though the addresses were found correctly. - ๐ก๏ธ CODM-conditional error resilience โ when
codm_diag/codmis active, individual pointer loads now usematch/skip instead of strict?. Bad pointers print a[WARN]and are skipped; the dump proceeds with whatever data IS available. Non-CODM games retain strict?error propagation so false-positive addresses are caught properly. - ๐ Affected files:
formats/elf.rs(load_pointers,load_types,load_generics),il2cpp/base.rs(Il2Cpp::initpointer loading),main.rs(CLI init flow fallback) - โ All targets synced: CLI, Tauri desktop/mobile, Android JNI โ same engine fix across all platforms
What's new in v6
Static metadata & thread-static
- ๐งต Thread-static field support โ TLS offset decode (
0x80000000flag), comment annotations in dump.cs, DummyDllThreadStaticAttribute - ๐ฆ FieldRVA / PrivateImplementationDetails โ optional
static_metadata.json, optional blob export,FieldRvaAttributein DummyDll - ๐ iOS CODM auto-detection โ
resolve_codm()when metadata variant is CODM (same as Android ELF path) - ๐ Unity 27+ FieldRva metadata usage (case 7) โ
script.jsonFieldRvason PE / Mach-O / NSO / WASM viadata_sectionsscan - ๐
Il2CppTypeDefinitionSizesloading โ thread-static block heuristics fromMetadataRegistrationon all formats - ๐ ๏ธ Memory-dumped CODM fixes โ improved dump-file / image-base handling so memory-captured CODM binaries (Android ELF + iOS Mach-O) init and decrypt types reliably alongside standard dump support
- โ๏ธ Configurable static metadata โ
dumpStaticFieldMetadatamaster toggle (off by default for speed); nesteddumpFieldRvaData(off by default โ blobs make JSON huge) +maxFieldRvaDumpBytes - ๐ฅ๏ธ GUI parity โ Jetpack Compose + Tauri desktop apps ship the same v6 engine and config keys
Disassembler cross-platform parity
Full ARM32 + x86/x64 annotation parity with ARM64 (see DISASSEMBLER_UPGRADE.md):
- ARM32 rewrite โ propagation engine now runs on 32-bit Android:
ConstantOp,LoadInfo,RegRegAccess,IndirectCallReg, CBZ/CBNZ, ADR/ADRL, LDM block loads - x86/x64 LEA RIP-relative โ
RIP_PSEUDO_REGsentinel +ConstantOp::Adrptracking; MOVZX/MOVSX loads; 25+ GP-writing mnemonics emit properKill - Switch table reconstruction โ
detect_switch_dispatcheson x86/x64 PIC (lea rcx,[rip+table]โmovsxdโaddโjmp) and ARM32 - Static field annotation โ all architectures:
// TypeName.fieldNamefrom typeinfo + static-fields offset chains (x86 RIP-relative included) - Init-check suppression โ x86/x64
movzx/test/jne/call runtime_class_initpattern folded to// [init check] - x86 gap fixes โ LEA base+disp propagation, XADD/MOVBE/BMI2/MUL/DIV RDX:RAX kill coverage
Deep dives:
STATIC_FIELD_UPGRADE.mdยทDISASSEMBLER_UPGRADE.md
What's new in v5.5
- ๐ Il2CppType byte-stream XOR decryption for CODM (recovers Quaternion/Vector3/Class fields previously shown as
UnknownType(0x27)orobject) - ๐ Fixed iOS Mach-O chained-fixup edge cases โ first-pointer rebasing now works on CODM iOS builds
- ๐ Three-marker detection scheme with <0.1 % false-positive rate on clean entries
- ๐งน Removed stale debug eprintlns, cleaner stderr output
Search Strategies
- SectionHelper โ Format-aware section scanning
- Symbol Search โ ELF/Mach-O symbol table lookup
- ARM32 Search โ Dedicated binary pattern matching
- __mod_init_func โ Mach-O initializer analysis
- Manual mode โ Enter addresses as fallback
๐ฆ Installation
From crates.io
This installs the latest release globally. Run il2cpp_dumper from anywhere.
From Source
The binary will be at target/release/il2cpp_dumper (.exe on Windows).
Cross-Compilation
# Linux
# macOS
# Android (via cross)
๐ง Usage
Examples
Example Output
Rodroid Il2CppDumper
โฆโฆ โโโโโโโโโ โโฆโโฆ โฆโโฆโโโโโโโโฆโโ
โโ โ โโโ โ โโ โโโ โโโโโ โโโโฃ โ โฆโ
โฉโฉโโโ โโโโฉ โโฉโโโโโฉ โฉโฉ โโโโฉโโ
Version v0.6.0
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Output .\Dump0
โโโ Binary Analysis โโโโโโโโโโโโโโโโโโโ
โ Binary loaded: libil2cpp.so (52.43 MB)
Unity Version: 2022.3.62f2
โ Metadata loaded: global-metadata.dat (10.88 MB)
Metadata Version: 31
Type Definitions: 13815
Method Definitions: 93772
โโโ Format Detection โโโโโโโโโโโโโโโโโโ
๐ Detected ELF64 format
IL2CPP Version: 31
CodeRegistration: 0x44e5ff8
MetadataRegistration: 0x465a328
โโโ Output Generation โโโโโโโโโโโโโโโโโ
โ dump.cs generated
โ script.json, il2cpp.h, stringliteral.json generated
โ Dummy DLL files generated
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โจ All tasks completed successfully!
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Output Directory: .\Dump0
๐ฆ Generated Files: dump.cs, script.json, il2cpp.h, stringliteral.json, DummyDll/*.dll
๐ Elapsed: 8.35s
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ๏ธ Configuration
Place config.json next to the binary (or pass --config path/to/config.json). All keys use camelCase (see bundled config.json).
CLI flags (override config)
| Flag | Effect |
|---|---|
--codm |
Force CODM metadata layout + reloc/fixup paths |
--force-dump |
Treat input as a memory dump; prompt for image base |
--dump-static-metadata |
Enable thread-static / FieldRVA export pipeline |
--no-dump-static-metadata |
Disable static metadata export |
Key groups
| Group | Keys |
|---|---|
| Output | dumpMethod, dumpField, dumpProperty, dumpAttribute, dumpMethodOffset, dumpFieldOffset, dumpTypeDefIndex, dumpAssemblyName, splitDumpPerType |
| Generation | generateStruct, generateDummyDll, dummyDllAddToken, requireAnyKey |
| Generics | generateGenericsDump, dumpGenericsRgctx, dumpGenericsMethodSpecs, dumpGenericsCustomAttributes, dumpGenericsStringLiterals, dumpGenericsMetadataUsages, dumpGenericsVtables, dumpGenericsInterfaces |
| Disassembly | dumpDisassembly, dumpDisassemblyTarget (0=Both, 1=dump.cs, 2=DiffableCs), dumpDisassemblyHexBytes, dumpDisassemblyFieldNames, dumpDisassemblyAnnotations, dumpDisassemblyCfg, maxDisassemblyInstructions |
| C++ headers | generateCppScaffold, mangleNames, enhancedIdaMetadata, generateUnityHeaders, compilerLayout (GCC/MSVC), useTopologicalSort |
| Static metadata (v6) | dumpStaticFieldMetadata (default false), dumpFieldRvaData, maxFieldRvaDumpBytes |
| Advanced | forceIl2cppVersion, forceVersion, forceDump, noRedirectedPointer, codm |
v6 static metadata example
When enabled, outputs static_metadata.json and enriches dump.cs / DummyDll / script.json. Set dumpFieldRvaData to true only when you need base64 hex blobs in JSON (can be tens of MB on large games). Leave the master toggle off for faster dumps when you only need dump.cs.
๐๏ธ Architecture
il2cpp_dumper/src/
โโโ main.rs # CLI, format detection, orchestration
โโโ config.rs # Configuration handling
โโโ formats/ # Binary format parsers
โ โโโ elf.rs # ELF32/64 (Android, Linux)
โ โโโ pe.rs # PE32/64 (Windows)
โ โโโ macho.rs # Mach-O + Fat Mach-O (iOS, macOS)
โ โโโ nso.rs # NSO (Nintendo Switch)
โ โโโ wasm.rs # WebAssembly (WebGL)
โโโ il2cpp/ # IL2CPP structures and metadata
โ โโโ base.rs # Il2Cpp main struct, type_definition_sizes
โ โโโ field_layout.rs # Thread-static / FieldRVA offset decode (v6)
โ โโโ metadata.rs # Metadata parser (+ CODM variant)
โ โโโ structures.rs # IL2CPP type definitions
โโโ search/ # Registration search algorithms
โ โโโ section_helper.rs
โโโ executor/ # IL2CPP type resolution engine
โโโ disassembler/ # Multi-arch disassembly engine
โ โโโ mod.rs # CFG analysis, annotations, formatting
โ โโโ arm.rs # ARM64/ARM32 decoder (yaxpeax)
โ โโโ x86.rs # x86/x64 decoder (iced-x86)
โโโ output/ # Output generators
โโโ decompiler.rs # dump.cs + inline disassembly
โโโ static_field_exporter.rs # static_metadata.json + field annotations (v6)
โโโ struct_generator.rs # script.json, il2cpp.h, v27 FieldRva scan
โโโ dummy_assembly_generator.rs # DummyDLL (parallel)
โโโ cpp_scaffolding.rs # il2cpp-functions.h generation
โโโ cpp_ast.rs # C++ AST emission with group annotations
โโโ cpp_type_model.rs # C++ type model from IL2CPP types
โโโ cpp_type_dependency_graph.rs # Topological sort + cycle detection
โโโ name_mangler.rs # Itanium ABI C++ name mangling
โโโ header_manager.rs # Unity header version matching
โโโ unity_version.rs # Unity version parsing & ranges
๐ License
MIT
๐ Credits
- Perfare/Il2CppDumper โ Original C# implementation
- SamboyCoding/Cpp2IL โ Advanced C# IL2CPP analysis tool
- springmusk026/Il2CppDumper-Python โ Python port
- LukeFZ/Il2CppInspectorRedux โ Thanks for the code i used in v4 of my il2cppdumper, but its more faster since the logic its on rust and not C#
- dotnetdll โ .NET DLL generation crate
- rayon โ Parallel processing
- console-rs โ Terminal styling ecosystem (
console,indicatif,dialoguer)
๐ฌ Community
| Link | |
|---|---|
| ๐ข Telegram Channel | Join Channel |
| ๐ฌ Telegram Group | Join Group |
| ๐ค Developer | @rodroidmods |
โ ๏ธ Disclaimer: This tool is for educational and research purposes only. Respect game developers' rights and terms of service.