2016-12-30 15:29:45 -03:00
# Il2CppDumper
2017-04-11 03:37:13 -03:00
2018-03-05 02:29:53 -03:00
[![Build status ](https://ci.appveyor.com/api/projects/status/anhqw33vcpmp8ofa?svg=true )](https://ci.appveyor.com/project/Perfare/il2cppdumper/branch/master/artifacts)
2017-04-14 22:18:02 -03:00
2018-07-10 17:58:28 -04:00
中文说明请戳[这里](README.zh-CN.md)
2020-02-12 17:40:09 -03:00
Unity il2cpp reverse engineer
2018-03-05 02:29:53 -03:00
## Features
2020-02-12 17:40:09 -03:00
* Complete DLL restore (except code), can be used to extract `MonoBehaviour` and `MonoScript`
2020-04-09 22:55:34 -04:00
* Supports ELF, ELF64, Mach-O, PE, NSO and WASM format
2021-12-27 13:54:53 -03:00
* Supports Unity 5.3 - 2021.2
2020-02-12 17:40:09 -03:00
* Supports generate IDA and Ghidra scripts to help IDA and Ghidra better analyze il2cpp files
2020-04-09 22:55:34 -04:00
* Supports generate structures header file
2020-07-22 18:09:31 -04:00
* Supports Android memory dumped `libil2cpp.so` file to bypass protection
* Support bypassing simple PE protection
2018-03-05 02:29:53 -03:00
## Usage
2020-02-12 17:40:09 -03:00
Run `Il2CppDumper.exe` and choose the il2cpp executable file and `global-metadata.dat` file, then enter the information as prompted
2018-03-05 02:29:53 -03:00
2020-02-12 17:40:09 -03:00
The program will then generate all the output files in current working directory
2017-10-25 18:30:24 -03:00
2020-02-12 17:40:09 -03:00
### Command-line
2018-03-05 02:29:53 -03:00
2020-02-12 17:40:09 -03:00
```
2020-06-20 11:15:57 -04:00
Il2CppDumper.exe < executable-file > < global-metadata > < output-directory >
2020-02-12 17:40:09 -03:00
```
2018-03-05 02:29:53 -03:00
2020-02-12 17:40:09 -03:00
### Outputs
2019-04-26 07:37:18 -04:00
2020-02-12 17:40:09 -03:00
#### DummyDll
2017-10-25 18:30:24 -03:00
2020-02-12 17:40:09 -03:00
Folder, containing all restored dll files
2018-03-05 02:29:53 -03:00
2020-02-12 17:40:09 -03:00
Use [dnSpy ](https://github.com/0xd4d/dnSpy ), [ILSpy ](https://github.com/icsharpcode/ILSpy ) or other .Net decompiler tools to view
2018-03-05 02:29:53 -03:00
2020-02-12 17:40:09 -03:00
Can be used to extract Unity `MonoBehaviour` and `MonoScript` , for [UtinyRipper ](https://github.com/mafaca/UtinyRipper ), [UABE ](https://7daystodie.com/forums/showthread.php?22675-Unity-Assets-Bundle-Extractor )
2018-03-05 02:29:53 -03:00
2020-02-12 17:40:09 -03:00
#### ida.py
2018-03-05 02:29:53 -03:00
2020-02-12 17:40:09 -03:00
For IDA
2018-03-05 02:29:53 -03:00
2020-02-27 07:57:34 -03:00
#### ida_with_struct.py
For IDA, read il2cpp.h file and apply structure information in IDA
#### il2cpp.h
structure information header file
2020-02-12 17:40:09 -03:00
#### ghidra.py
2017-10-25 18:30:24 -03:00
2020-02-12 17:40:09 -03:00
For Ghidra
2017-10-25 18:30:24 -03:00
2022-03-18 18:27:16 -03:00
#### binaryninja3_py3.py
For BinaryNinja
2021-12-05 20:08:36 -03:00
#### ghidra_wasm.py
For Ghidra, work with [ghidra-wasm-plugin ](https://github.com/nneonneo/ghidra-wasm-plugin )
2020-02-22 15:31:34 -03:00
#### script.json
For ida.py and ghidra.py
2019-11-06 09:15:03 -03:00
#### stringliteral.json
Contains all stringLiteral information
2018-03-05 02:29:53 -03:00
### Configuration
2018-01-07 18:10:00 -03:00
2018-03-05 02:29:53 -03:00
All the configuration options are located in `config.json`
2019-11-06 09:15:03 -03:00
2018-03-05 02:29:53 -03:00
Available options:
2018-12-17 23:55:46 -03:00
* `DumpMethod` , `DumpField` , `DumpProperty` , `DumpAttribute` , `DumpFieldOffset` , `DumpMethodOffset` , `DumpTypeDefIndex`
2019-11-14 21:43:52 -03:00
* Whether to output these information to dump.cs
2018-03-05 02:29:53 -03:00
2020-06-20 11:15:57 -04:00
* `GenerateDummyDll` , `GenerateScript`
* Whether to generate these things
2019-11-06 09:15:03 -03:00
2018-03-06 02:01:51 -03:00
* `ForceIl2CppVersion` , `ForceVersion`
2019-11-14 21:43:52 -03:00
* If `ForceIl2CppVersion` is `true` , the program will use the version number specified in `ForceVersion` to choose parser for il2cpp binaries (does not affect the choice of metadata parser). This may be useful on some older il2cpp version (e.g. the program may need to use v16 parser on il2cpp v20 (Android) binaries in order to work properly)
2018-03-05 02:29:53 -03:00
## Common errors
2017-11-03 06:14:59 -03:00
#### `ERROR: Metadata file supplied is not valid metadata file.`
2020-02-12 17:40:09 -03:00
Make sure you choose the correct file. Sometimes games may obfuscate this file for content protection purposes and so on. Deobfuscating of such files is beyond the scope of this program, so please **DO NOT** file an issue regarding to deobfuscating.
2020-07-22 18:09:31 -04:00
If your file is `libil2cpp.so` and you have a rooted Android phone, you can try my other project [Riru-Il2CppDumper ](https://github.com/Perfare/Riru-Il2CppDumper ), it can bypass this protection.
2020-02-12 17:40:09 -03:00
#### `ERROR: Can't use auto mode to process file, try manual mode.`
2018-03-05 02:29:53 -03:00
2020-07-22 18:14:40 -04:00
Please note that the executable file for the PC platform is `GameAssembly.dll` or `*Assembly.dll`
2020-07-22 18:09:31 -04:00
You can open a new issue and upload the file, I will try to solve.
2018-03-05 02:29:53 -03:00
2020-02-12 17:40:09 -03:00
#### `ERROR: This file may be protected.`
2018-03-05 02:29:53 -03:00
2020-07-22 18:09:31 -04:00
Il2CppDumper detected that the executable file has been protected, use `GameGuardian` to dump `libil2cpp.so` from the game memory, then use Il2CppDumper to load and follow the prompts, can bypass most protections.
If you have a rooted Android phone, you can try my other project [Riru-Il2CppDumper ](https://github.com/Perfare/Riru-Il2CppDumper ), it can bypass almost all protections.
2019-11-06 09:15:03 -03:00
## Credits
- Jumboperson - [Il2CppDumper ](https://github.com/Jumboperson/Il2CppDumper )