Skip to main content
GUIDEReverse Engineering 4 views

[Guide] Unity IL2CPP Static Reverse Engineering: Perfare/Il2CppDumper to Ghidra

To analyze a Unity IL2CPP native binary (GameAssembly.dll on Windows or libil2cpp.so on Android) with full C# class names and signatures inside Ghidra, follow the standard Perfare/Il2CppDumper pipeline:

Step 1: Extract Metadata & Output Files

Run Il2CppDumper against the native binary and <Game>_Data/il2cpp_data/Metadata/global-metadata.dat. This outputs script.json, il2cpp.h, il2cpp_header_to_ghidra.py, and DummyDll/ stubs (inspectable in ILSpy/dnSpy).

Step 2: Convert Header Syntax for Ghidra

Standard il2cpp.h triggers C parser syntax errors in Ghidra unless converted first:

bash
python il2cpp_header_to_ghidra.py

This produces il2cpp_ghidra.h.

Step 3: Import & Parse in Ghidra

  • Import GameAssembly.dll or libil2cpp.so into Ghidra's Code Browser and let Auto-Analysis finish.
  • Open File -> Parse C Source..., add il2cpp_ghidra.h, and click Parse to populate the Data Type Manager.
  • Open Window -> Script Manager, add Il2CppDumper's script directory, run `ghidra_with_struct.py`, and select your generated `script.json` to rename every method RVA and attach type definitions automatically.
Open Sponsor Slot (IN THREAD)
Book Slot

0 replies

Log in to reply or react to threads.