inspect_il2cpp_metadataHow to REA Unity IL2CPP Games: global-metadata.dat, GameAssembly & Ghidra Seeds
Deconstruct Ahead-Of-Time (AOT) compiled Unity games and mobile apps: decode global-metadata.dat (versions 24-39), link method tokens to GameAssembly.dll or libil2cpp.so, and export Ghidra analysis seeds without running the game.
In this official REA guide for Unity IL2CPP Games & Binaries, AI coding agents (Claude Code, Cursor, Windsurf) execute 'rea inspect-il2cpp-metadata ./global-metadata.dat --binary ./libil2cpp.so --ghidra-seeds seeds.json --json' to safely extract file layout, symbols, and code logic without launching unverified binaries.
The Problem & Target Artifact
Mobile game penetration testing or desktop Unity game modding: The game's executable is stripped of all C# symbols. You have global-metadata.dat and GameAssembly.dll/libil2cpp.so, and need to find the PlayerEconomy and AntiCheat functions.
Natural Language Agent Instructions
Copy and paste this prompt directly into your AI coding agent when REA is registered via Model Context Protocol (MCP):
Use REA to inspect this Unity game's global-metadata.dat and libil2cpp.so. Find all methods under the Game.Security namespace, resolve their native code addresses, and generate Ghidra analysis seeds.Run REA Analysis Command
Execute the following command in your terminal or inspect the MCP JSON-RPC call executed by your agent:
rea inspect-il2cpp-metadata ./global-metadata.dat --binary ./libil2cpp.so --ghidra-seeds seeds.json --jsonWhat REA Extracts & Returns
Resolved Method Token & Address Mapping
The verified findings and synthesized clean-room structures generated from this investigation:
{
"type": "Game.Security.LicenseManager",
"method": "CheckLicenseStatus",
"token": "0x06000210",
"native_address": "0x0042a180",
"rva": "0x0002a180",
"image": "Assembly-CSharp.dll",
"relocation_status": "R_AARCH64_RELATIVE resolved"
}Relocation-Aware Module Alignment Without Symbols
In stripped IL2CPP binaries, function names are replaced with memory pointers. Position-independent ELF/PE binaries store zero in pointer slots and keep target offsets in dynamic relocation tables (DT_RELA). REA's parser writes relocation targets into a private in-memory copy, finds module records via declared NUL-terminated image name pointers, and matches token row indices directly to native code addresses.