Git Product home page Git Product logo

il2cppdumper-yuanshen's Introduction

Il2CppDumper

Modified version of Il2CppDumper allows you to dump methods of UserAssembly.dll of the game Genshin Impact

NOTICE: The global-metadata.dat of the game Genshin Impact has been encrypted, you need to dump decrypted file from memory before use this tool.

中文说明请戳这里

Unity il2cpp reverse engineer

Features

  • Complete DLL restore (except code), can be used to extract MonoBehaviour and MonoScript
  • Supports ELF, ELF64, Mach-O, PE, NSO and WASM format
  • Supports Unity 5.3 - 2020
  • Supports generate IDA and Ghidra scripts to help IDA and Ghidra better analyze il2cpp files
  • Supports generate structures header file
  • Supports Android memory dumped libil2cpp.so file to bypass protection
  • Support bypassing simple PE protection

Usage

Run Il2CppDumper.exe and choose the il2cpp executable file and global-metadata.dat file, then enter the information as prompted

The program will then generate all the output files in current working directory

Command-line

Il2CppDumper.exe <executable-file> <global-metadata> <output-directory>

Outputs

DummyDll

Folder, containing all restored dll files

Use dnSpy, ILSpy or other .Net decompiler tools to view

Can be used to extract Unity MonoBehaviour and MonoScript, for UtinyRipper, UABE

ida.py

For IDA

ida_with_struct.py

For IDA, read il2cpp.h file and apply structure information in IDA

il2cpp.h

structure information header file

ghidra.py

For Ghidra

script.json

For ida.py and ghidra.py

stringliteral.json

Contains all stringLiteral information

Configuration

All the configuration options are located in config.json

Available options:

  • DumpMethod, DumpField, DumpProperty, DumpAttribute, DumpFieldOffset, DumpMethodOffset, DumpTypeDefIndex

    • Whether to output these information to dump.cs
  • GenerateDummyDll, GenerateScript

    • Whether to generate these things
  • ForceIl2CppVersion, ForceVersion

    • 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)

Common errors

ERROR: Metadata file supplied is not valid metadata file.

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.

If your file is libil2cpp.so and you have a rooted Android phone, you can try my other project Riru-Il2CppDumper, it can bypass this protection.

ERROR: Can't use auto mode to process file, try manual mode.

Please note that the executable file for the PC platform is GameAssembly.dll or *Assembly.dll

You can open a new issue and upload the file, I will try to solve.

ERROR: This file may be protected.

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, it can bypass almost all protections.

Credits

il2cppdumper-yuanshen's People

Contributors

hermesclient avatar kagurazakasanae avatar khang06 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

il2cppdumper-yuanshen's Issues

Il2CppDumper-yuanshen

stringDecryptionBlob = File.ReadAllBytes("D:\genshinimpactre\decryption_blob.bin");
decryption_blob.bin 怎么获取?

Need help

Can you help me with dumping global-metadata.dat?
I will pay if u need

EOF error while reading interfaceIndices

System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
  at System.IO.MemoryStream.InternalReadInt32 () [0x00032]
    in <a17fa1457c5d44f2885ac746c1764ea5>:0 
  at (wrapper remoting-invoke-with-check) System.IO.MemoryStream.InternalReadInt32()
  at System.IO.BinaryReader.ReadInt32 () [0x00015]
    in <a17fa1457c5d44f2885ac746c1764ea5>:0 
  at Il2CppDumper.BinaryStream.ReadInt32 () [0x00000]
    in [...]/Il2CppDumper-YuanShen/Il2CppDumper/IO/BinaryStream.cs:42 
  at Il2CppDumper.BinaryStream.ReadPrimitive (System.Type type) [0x000fc]
    in [...]/Il2CppDumper-YuanShen/Il2CppDumper/IO/BinaryStream.cs:109 
  at Il2CppDumper.BinaryStream.ReadClass[T] () [0x00017]
    in [...]/Il2CppDumper-YuanShen/Il2CppDumper/IO/BinaryStream.cs:142 
  at Il2CppDumper.BinaryStream.ReadClassArray[T] (System.Int64 count) [0x0000e]
    in [...]/Il2CppDumper-YuanShen/Il2CppDumper/IO/BinaryStream.cs:201 
  at Il2CppDumper.BinaryStream.ReadClassArray[T] (System.UInt64 addr, System.Int64 count) [0x00009]
    in [...]/Il2CppDumper-YuanShen/Il2CppDumper/IO/BinaryStream.cs:209 
  at Il2CppDumper.Metadata..ctor (System.IO.Stream stream) [0x001ab]
    in [...]/Il2CppDumper-YuanShen/Il2CppDumper/Il2Cpp/Metadata.cs:87 
  at Il2CppDumper.Program.Init (System.String il2cppPath, System.String metadataPath, Il2CppDumper.Metadata& metadata, Il2CppDumper.Il2Cpp& il2Cpp) [0x00013]
    in [...]/Il2CppDumper-YuanShen/Il2CppDumper/Program.cs:122 
  at Il2CppDumper.Program.Main (System.String[] args) [0x001d6]
    in [...]/Il2CppDumper-YuanShen/Il2CppDumper/Program.cs:97 

A breakpoint at line 87 (Metadata.cs) shows that header.interfacesOffset is at 188555283 (0xB3D2013).

Game version: 1.1.0 (timestamp 2020-11-03)

globalmetadata读写研究

感谢宝藏话题
pc版的gameassembly.dll 里面有个closeZStream,createZStream头,中间夹着所有il2cpp,再以readZStream,writeZStream结尾,这些stream流是一种普遍的加密方法吗= =? 或者有人知道哪里有相关学习资料吗
我试着抓包和砸壳20200818的0.9版本(看看是不是可以找到他们的一些疏忽),然而得到的脱壳ipa使用IL2cppdumper依然无法使用,这种读写globalmetadata的方法以前从没见过,orz
★:偷偷查阅关闭的话题已发现惊喜╰(°▽°)╯就是想讨论下这个读写方法叫啥名字,偷学一下- -、

Help

Sir can u make tutorial how to use this, i cant understand because there so many file and i cant see exe file

弱弱的问问, 1.2 版本命令行错误

弱弱的问问, 1.2 版本命令行错误

`
Initializing metadata...
System.OverflowException: 算术运算导致溢出。
在 Il2CppDumper.BinaryStream.ReadClassArray[T](Int64 count) 位置 C:\Users\Administrator\Downloads\Il2CppDumper-YuanShen-master\Il2CppDumper\IO\BinaryStream.cs:行号 198
在 Il2CppDumper.BinaryStream.ReadClassArray[T](UInt64 addr, Int64 count) 位置 C:\Users\Administrator\Downloads\Il2CppDumper-YuanShen-master\Il2CppDumper\IO\BinaryStream.cs:行号 209
在 Il2CppDumper.Metadata..ctor(Stream stream) 位置 C:\Users\Administrator\Downloads\Il2CppDumper-YuanShen-master\Il2CppDumper\Il2Cpp\Metadata.cs:行号 87
在 Il2CppDumper.Program.Init(String il2cppPath, String metadataPath, Metadata& metadata, Il2Cpp& il2Cpp) 位置 C:\Users\Administrator\Downloads\Il2CppDumper-YuanShen-master\Il2CppDumper\Program.cs:行号 122
在 Il2CppDumper.Program.Main(String[] args) 位置 C:\Users\Administrator\Downloads\Il2CppDumper-YuanShen-master\Il2CppDumper\Program.cs:行号 97
Press any key to exit...

`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.