rev-u3d-dump
p4nda0s/reverse-skills
Extract C# method names and addresses from Unity IL2CPP iOS/Android builds for IDA/Ghidra reverse engineering.
What is rev-u3d-dump?
Recovers the mapping between native function addresses and original C# class/method names from Unity IL2CPP binaries and global-metadata.dat files. Use this when analyzing compiled Unity games or apps to restore symbolic information stripped during IL2CPP compilation.
- Extracts method names, addresses, and type definitions from IL2CPP binaries (Mach-O/ELF)
- Parses global-metadata.dat to recover C# symbol information
- Generates IDA Python and Ghidra import scripts for automated function renaming
- Produces dump.cs with RVA/VA addresses and il2cpp.h with C struct definitions
- Supports metadata versions 24–39 (Unity 2021 through Unity 6)
How to install rev-u3d-dump
npx skills add https://github.com/p4nda0s/reverse-skills --skill rev-u3d-dump- IL2CPP binary file (libil2cpp.so for Android or UnityFramework for iOS)
- global-metadata.dat file from the same build
- IDA Pro or Ghidra for importing the generated scripts
- .NET 6+ runtime (for running Il2CppDumper)
- For iOS: ability to extract IPA or access the compiled framework
How to use rev-u3d-dump
- 1.Extract the IL2CPP binary and global-metadata.dat from your iOS IPA or Android APK
- 2.Verify the metadata version using xxd (first 8 bytes contain magic + version)
- 3.Clone the appropriate Il2CppDumper fork (roytu/Il2CppDumper v39 for Unity 6, original for earlier versions)
- 4.Build Il2CppDumper with dotnet build and run it with the binary and metadata paths
- 5.Verify output files (script.json, dump.cs, il2cpp.h) were generated successfully
- 6.In IDA: place script.json and ida_py3.py in the same directory, then run File → Script file to auto-rename functions
- 7.In Ghidra: use the ghidra.py script from Il2CppDumper output directory to import symbols
Use cases
- Reverse engineering a Unity mobile game to identify gameplay logic functions
- Analyzing a Unity app binary to find security-sensitive methods like authentication or encryption routines
- Extracting type definitions and field offsets for memory inspection with Frida
- Recovering class hierarchies and method signatures from a compiled iOS/Android build
- Preparing a stripped IL2CPP binary for detailed static analysis in IDA or Ghidra
- Reverse engineers analyzing Unity-based iOS or Android applications
- Security researchers performing binary analysis on compiled Unity games
- Mobile app penetration testers needing symbolic information from IL2CPP builds
- Game modders seeking to understand compiled Unity game structure
rev-u3d-dump FAQ
Use roytu/Il2CppDumper v39 fork for Unity 6 (metadata v39). Use the original Perfare/Il2CppDumper for Unity 2021 and earlier (metadata ≤29). Check your metadata version with xxd to determine which tool to use.
For iOS IPA: unzip the IPA and find UnityFramework binary in Payload/<AppName>.app/Frameworks/UnityFramework.framework/ and metadata at Payload/<AppName>.app/Data/Managed/Metadata/global-metadata.dat. For Android APK: unzip the APK and find libil2cpp.so in lib/{arch}/ and metadata at assets/bin/Data/Managed/Metadata/global-metadata.dat.
script.json contains an array of ScriptMethod objects with Address (decimal), Name (ClassName$$MethodName), Signature, and TypeSignature. These are imported by IDA/Ghidra scripts to automatically rename functions in the binary.
Exit 134 (SIGKILL) on macOS usually means the binary is unsigned; ad-hoc sign it with codesign -s -. Exit 134 in non-interactive mode is normal and can be ignored if the output files were created successfully.
This tool works on the metadata file, which is typically not encrypted. However, if the binary itself is encrypted or the metadata is corrupted, extraction will fail or produce incomplete results. The tool cannot decrypt encrypted binaries.
Full instructions (SKILL.md)
Source of truth, from p4nda0s/reverse-skills.
name: rev-u3d-dump description: Dump Unity IL2CPP symbols from iOS/Android builds. Extract method names, addresses, and type info from IL2CPP binaries and global-metadata.dat, then generate IDA/Ghidra import scripts.
rev-u3d-dump - Unity IL2CPP Symbol Dumper
Extract C# method names, addresses, and type definitions from Unity IL2CPP builds for IDA/Ghidra analysis.
Overview
Unity IL2CPP compiles C# to native code. The original class/method names are stripped from the binary but preserved in global-metadata.dat. This skill recovers the mapping between native function addresses and their original C# names.
Key Files in Unity Build
| File | Location | Purpose |
|---|---|---|
| Native binary | iOS: Frameworks/UnityFramework.framework/UnityFramework<br>Android: lib/{arch}/libil2cpp.so | Compiled C# code (Mach-O / ELF) |
| Metadata | Data/Managed/Metadata/global-metadata.dat | All type/method/string info |
Tool Selection
Il2CppDumper (recommended for metadata v39+)
Use the v39 fork for Unity 6+ builds:
- Repo:
https://github.com/roytu/Il2CppDumper(branch:v39) - Supports metadata v24–v39
- Outputs
script.jsonwith function addresses — ready for IDA/Ghidra import
The original Il2CppDumper (https://github.com/Perfare/Il2CppDumper) only supports up to v29.
Cpp2IL (alternative)
- Repo:
https://github.com/SamboyCoding/Cpp2IL - Supports metadata v39, but dummy DLLs lack
[Address]attributes - Useful for C# source reconstruction, not ideal for IDA import
Step-by-Step Workflow
Step 1: Locate IL2CPP Files
iOS (IPA):
# Unzip IPA
unzip -o app.ipa -d .
# Binary
BINARY="Payload/<AppName>.app/Frameworks/UnityFramework.framework/UnityFramework"
# Metadata
METADATA="Payload/<AppName>.app/Data/Managed/Metadata/global-metadata.dat"
Android (APK):
# Unzip APK
unzip -o app.apk -d .
# Binary (pick target arch)
BINARY="lib/arm64-v8a/libil2cpp.so"
# Metadata
METADATA="assets/bin/Data/Managed/Metadata/global-metadata.dat"
Step 2: Check Metadata Version
# First 8 bytes: magic (4) + version (4), little-endian
xxd -l 8 "$METADATA"
# Expected: af1b b1fa 2700 0000 → magic OK, version = 0x27 = 39
| Version | Unity | Tool |
|---|---|---|
| ≤ 29 | Unity 2021 and earlier | Original Il2CppDumper |
| 31 | Unity 2022 | Original Il2CppDumper (partial) |
| 39 | Unity 6 (6000.x) | roytu/Il2CppDumper v39 fork |
Step 3: Build & Run Il2CppDumper (v39 fork)
# Clone v39 fork
git clone -b v39 https://github.com/roytu/Il2CppDumper.git
# Build
cd Il2CppDumper
DOTNET_ROLL_FORWARD=LatestMajor dotnet build -c Release
# Run (use net8.0 framework)
DOTNET_ROLL_FORWARD=LatestMajor dotnet run \
--project Il2CppDumper/Il2CppDumper.csproj \
-c Release --framework net8.0 \
-- "$BINARY" "$METADATA" output_dir
Notes:
DOTNET_ROLL_FORWARD=LatestMajorallows running on .NET 9/10 even though the project targets .NET 6/8- Exit code 134 is normal in non-interactive mode (caused by
Console.ReadKey()at the end) - On macOS, if the binary gets SIGKILL'd, ad-hoc sign it:
codesign -s - <binary>
Step 4: Verify Output
Successful run produces these files in the output directory:
| File | Size (typical) | Purpose |
|---|---|---|
script.json | 50–100 MB | Function addresses + names + signatures (IDA/Ghidra import) |
dump.cs | 10–30 MB | C# class dump with RVA/VA addresses |
il2cpp.h | 50–100 MB | C struct definitions for type import |
ida_py3.py | ~2 KB | IDA Python import script |
Check script.json format:
{
"ScriptMethod": [
{
"Address": 40865744,
"Name": "ClassName$$MethodName",
"Signature": "ReturnType ClassName__MethodName (args...);",
"TypeSignature": "viii"
}
]
}
Check dump.cs format:
// RVA: 0x1A2B3C4 Offset: 0x1A2B3C4 VA: 0x1A2B3C4
public void MethodName() { }
Step 5: Import into IDA
- Open the native binary in IDA (UnityFramework / libil2cpp.so)
- Place
script.jsonandida_py3.pyin the same directory File → Script file...→ selectida_py3.py- The script reads
script.jsonand renames all functions automatically - Optional:
File → Load file → Parse C header file...→ selectil2cpp.hfor struct types
Step 5 (alt): Import into Ghidra
- Open the binary in Ghidra
- Use the
ghidra.pyorghidra_with_struct.pyscript from Il2CppDumper Window → Script Manager → Runwithscript.jsonin the same directory
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
not a supported version[39] | Using original Il2CppDumper | Switch to roytu/Il2CppDumper v39 fork |
| Exit code 137 (SIGKILL) | macOS unsigned binary | codesign -s - <binary> |
Cannot read keys (exit 134) | Non-interactive console | Ignore — dump completed successfully |
DOTNET_ROLL_FORWARD error | .NET version mismatch | Set DOTNET_ROLL_FORWARD=LatestMajor |
| Empty output | Wrong binary/metadata pair | Verify both files are from the same build |
Output Usage Tips
dump.csis the quickest reference — search for class/method names with RVA addressesscript.jsonAddress values are decimal — convert to hex for IDA:hex(40865744)→0x26F8FD0- Field offsets in
dump.cs(e.g.,// 0x20) are relative to object base, useful for memory inspection with Frida
Related skills
More from p4nda0s/reverse-skills and the wider catalog.

rev-unicorn-debug
Debug and emulate code fragments using the Unicorn engine with environment simulation.

rev-dex-dumper
Dump DEX files from running Android apps for reverse engineering and deobfuscation.

rev-frida
Generate Frida hook scripts for dynamic analysis, runtime tracing, and method interception on Android and native targets.

rev-idapython
IDAPython and IDALib script reference for reverse engineering and binary analysis.

prd-creator
Transform software ideas into comprehensive PRDs and actionable implementation task lists.

documenting-decisions
Mark critical decisions in agent-generated code to focus human review on what matters.