Tutorial How to use il2cpp.h, script.json & stringliteral.json files from Il2CppDumper

AndnixSH

PMT Elite Modder
Original poster
Staff member
Modding-Team
Jun 27, 2017
4,540
302,783
1,213
Modding World
When you dump il2cpp games using Il2CppDumper, you will get the following files:

- il2cpp.h: Structure information header file
- script.json: For ida.py/ida_py3.py and ghidra.py
- stringliteral.json: Contains all stringLiteral information

The scripts are in the same folder of the Il2CppDumper executeable, if you extracted all. Otherwise, you can get them from Il2CppDumper releases. We only need following scripts for Android games

ida.py and ida_py3.py: Script for IDA to read script.json file
ida_with_struct.py and ida_with_struct_py3.py: Script for IDA to read script.json file and il2cpp.h file to apply structure information. It helps IDA load faster
ghidra.py: Script for Ghidra to read script.json file
ghidra_with_struct.py: Script for Ghidra to read script.json file and il2cpp.h file to apply structure information. It helps Gridra load faster

IDA Pro
The first thing to do is to make sure you have Python installed. You need Python 2 if using IDA 7.3 or below, and Python 3 if using IDA 7.4 or above (Correct me if i'm wrong)

Open IDA and load the il2cpp binary file straight forward

While the binary is loading, you can click File -> Script file... and load the .py script already. Navigate to the il2cppdumper directory and open one of the py files for your IDA version

1608928484162.png


ida.py or ida_py3.py: Script for IDA to read json file
ida_with_struct.py or ida_with_struct_py3.py: Script for IDA to read json file and read il2cpp.h file and apply structure information. It helps IDA load things faster

1608928514260.png


Note: If the .py files are not shown, check the dropdown like the screenshot above. If it only shows Script files (*.idc), means python hasn't been installed correctly or enviorment path as not been set. Please make sure you have installed Python Correctly. It must show Script files (*.idc, *py)

Wait for the script to load. If you got bad declaration warning, just click OK. You can check "Don't display this message again" if the warning is shown again

1608928524909.png


After that, you have now function names to search

1608928546515.png


Do not load stringliteral.json manually, it is automatically loaded

Ghidra
Python 3 needs to be installed on the system in order to use Python scripting in Ghidra.

Open Ghidra and load the il2cpp binary file straight forward

While the binary is loading, click the green Play button to open the Script Manager

1608928560356.png


Click List icon to open Bundle Manager

1608928565643.png


Click plus button to open file selection dialog

1608929074597.png


Navigate to the Il2CppDumper location that contains ghidra.py file, select the Il2CppDumper folder or other desired location and click OK

1608929085848.png


Your directory will be added to Bundle Manager.

1608929112688.png


Now close it

Search ghidra.py, select it on the list and click Play

1608929099457.png


The script will run and ask you to select script.json, select it and click Open. The type is not filtered but notice the title that it says script.json

1608929125414.png


Wait for it to load...

1608929133979.png


After that, you have now function names

1608929139011.png


Using ghidra_with_struct.py
If you want to use ghidra_with_struct.py, you first need to convert il2cpp.h to ghidra using il2cpp_header_to_ghidra.py. This script is broken, so download my modified script and replace it in the il2cppdumper location you have just selected https://github.com/AndnixSH/Il2CppDumper-GUI-1/raw/patch-1/Il2CppDumper/il2cpp_header_to_ghidra.py

Open Script Manager (The green Play button), and run select il2cpp_header_to_ghidra.py

Image 2023 05 23 18 40 31.png


Choose il2cpp.h file

Image 2023 05 23 18 50 32.png


If successful, the file il2cpp_ghidra.h will be generated

Image 2023 05 23 20 33 01.png


Open Script Manager again, and run select ghidra_with_struct.py

Image 2023 05 23 20 04 38.png


Select script.json file

Image 2023 05 23 20 21 13.png


Since it doesn't ask for il2cpp.h or il2cpp_ghidra.h, unlike in IDA script, i'm not certain if it detects il2cpp_ghidra.h or not. I'm not familar with Ghidra so I can't really tell. Feel free to comment if you have any infomation about it
 

Attachments

Last edited:

sadeghose

Platinian
Apr 3, 2021
14
3
3
39
Iran
سسلام ببخشید من به فارسی تایپ میکنم
من میخاستم بدونم آیا راهی وجود دارد پول بازی awp mode online v1.8.0 را هک کرد و بیشتر بشود من تمام اینترنت را گشتم و هکی برای پول پیدا نکردم و اگر هم نسخهای قبل بود من ممنون میشم جواب منو بدید گوشی من روت شده نیست و من در ایران هستم و بدلیل تحریم دسترسی ما به اینترنت کمی محدود شده است شاید به همین دلیل اگر نسخه مود پول و صلاح نامحدود در صورت موجود بودن را من پیدا نمی توانم بکنم .
Langueh persian
راستی گوشی من اندروید۱۰ هست و
 

PMT LEGEND

Platinian
Mar 4, 2021
8
0
1
18
INDIA
Screenshot_20211106_202116.jpg


While i try to load ida.py in ida pro it gives me this error...How to fix this,plz reply.
I have python 2.6 installed and ida version 6+.Plz help...
 

PMT LEGEND

Platinian
Mar 4, 2021
8
0
1
18
INDIA
But in the early update of il2cpp dumper where script.py is generated is working fine.But this ida.py says that there is no attribute as ask_file.
 

AndnixSH

PMT Elite Modder
Original poster
Staff member
Modding-Team
Jun 27, 2017
4,540
302,783
1,213
Modding World

seltix5

Rookie
Apr 16, 2022
1
0
1
34
PT
thanks for the guide!!!!!! this stuff is hard to find! toke me hours :s
btw, do you know more about the "ghidra_with_struct.py" or how to use "il2cpp.h" with "il2cpp_header_to_ghidra.py" ?
Thanks!
 

M1den

Platinian
Nov 16, 2022
15
1
3
20
Moscow
I have a forsit, uti ida 7.7 et ego non video ida lima tractus py, quamvis ego installed python 2.7.18