Il2CppDumper icon indicating copy to clipboard operation
Il2CppDumper copied to clipboard

[Request] Support generating headers for il2cpp version 21

Open ubergeek77 opened this issue 2 years ago • 4 comments

Il2CppDumper version: v6.7.8
Target Unity version: 5.4.0f3

I have an older game I would like to decompile. It uses Unity version 5.4.0f3 and il2cpp version 21. I need to generate the headers from this game (il2cpp.h). Unfortunately, Il2CppDumper can only generate headers from il2cpp version 22 and up.

The game is an Android game (Apollo Justice: Ace Attorney), which uses a 32-bit ARM binary.

Here is the ARM binary and global-metadata.dat: il2cpp_bin_and_metadata.zip

Il2CppDumper does work on this binary, it just can't generate the headers. Here is the output of Il2CppDumper when run on these files:

>Il2CppDumper.exe libil2cpp.so global-metadata.dat
Initializing metadata...
Metadata Version: 21
Initializing il2cpp file...
Applying relocations...
Il2Cpp Version: 21
Searching...
CodeRegistration : c4acd0
MetadataRegistration : c55420
Dumping...
Done!
Generate struct...
WARNING: This il2cpp version [21] does not support generating .h files
Done!
Generate dummy dll...
Done!
Press any key to exit...

ubergeek77 avatar Apr 08 '22 01:04 ubergeek77

The reason why there is no version 21 and below is because the structure of the old version is completely different from the new version, and more code needs to be added if support is required. Also these versions are so old, I'm surprised there are still games using it, I probably wouldn't consider adding support. In addition, I think you can consider using Il2CppInspector, although it has not been updated for a long time, but it should work normally on lower versions.

Perfare avatar Apr 08 '22 02:04 Perfare

Ah, I see. Thanks anyway!

I actually did use Inspector, and it seemed to work fine for this game, but the header file it created cannot be used in Ghidra, it produces errors. I was hoping to get a different header file so that it could load into Ghidra.

ubergeek77 avatar Apr 08 '22 02:04 ubergeek77

@Perfare Il2CppInspector creates header files and Python scripts that don't work. Since the only actively developed alternative to it is your program, can you please add support for older Il2Cpp binaries? I, too, want to mod Apollo Justice - Ace Attorney for Android, but none of the availbale tools had helped me so far.

RingyRing avatar May 21 '22 12:05 RingyRing

@Perfare Il2CppInspector creates header files and Python scripts that don't work. Since the only actively developed alternative to it is your program, can you please add support for older Il2Cpp binaries? I, too, want to mod Apollo Justice - Ace Attorney for Android, but none of the availbale tools had helped me so far.

If ghirdra parsing giving your error instead of simply stucking,you can try remove the conflict entry in the header, though this may lose some type information,but this works for me.

eebssk1 avatar Feb 03 '23 08:02 eebssk1