{"id":15039664,"url":"https://github.com/samboycoding/cpp2il","last_synced_at":"2025-04-23T20:54:55.801Z","repository":{"id":38349537,"uuid":"192676329","full_name":"SamboyCoding/Cpp2IL","owner":"SamboyCoding","description":"Work-in-progress tool to reverse unity's IL2CPP toolchain.","archived":false,"fork":false,"pushed_at":"2025-04-03T22:09:23.000Z","size":82730,"stargazers_count":1887,"open_issues_count":33,"forks_count":222,"subscribers_count":39,"default_branch":"development","last_synced_at":"2025-04-04T13:06:50.418Z","etag":null,"topics":["analysis","decompiler","il2cpp","il2cpp-metadata","reverse-engineering","static-analysis","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamboyCoding.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"SamboyCoding","ko_fi":"Samboy063","custom":["https://www.paypal.me/sambyass"]}},"created_at":"2019-06-19T06:56:00.000Z","updated_at":"2025-04-04T10:14:44.000Z","dependencies_parsed_at":"2023-02-16T02:30:35.413Z","dependency_job_id":"6688843d-4beb-42cf-ac29-368444d53469","html_url":"https://github.com/SamboyCoding/Cpp2IL","commit_stats":{"total_commits":1050,"total_committers":31,"mean_commits":33.87096774193548,"dds":0.5304761904761905,"last_synced_commit":"5a919d98cd4f692ca9dbc2016b6ab73633070495"},"previous_names":[],"tags_count":320,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamboyCoding%2FCpp2IL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamboyCoding%2FCpp2IL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamboyCoding%2FCpp2IL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamboyCoding%2FCpp2IL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamboyCoding","download_url":"https://codeload.github.com/SamboyCoding/Cpp2IL/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248465293,"owners_count":21108243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analysis","decompiler","il2cpp","il2cpp-metadata","reverse-engineering","static-analysis","unity"],"created_at":"2024-09-24T20:43:34.202Z","updated_at":"2025-04-11T18:59:26.956Z","avatar_url":"https://github.com/SamboyCoding.png","language":"C#","readme":"# Cpp2IL\n\n[![NuGet](https://img.shields.io/nuget/v/Samboy063.Cpp2IL.Core)](https://www.nuget.org/packages/Samboy063.Cpp2IL.Core/)\n[![Coverage Status](https://coveralls.io/repos/github/SamboyCoding/Cpp2IL/badge.svg?branch=development)](https://coveralls.io/github/SamboyCoding/Cpp2IL?branch=development)\n\n### Need Help? Join [the discord](https://discord.gg/XdggT7XZXm)!\n\nWIP Tool to reverse Unity's IL2CPP build process back to the original managed DLLs.\n\nThe information below almost entirely applies to the CLI application available on github releases. For documentation on\nusing the \"core\" module - which the CLI is just a wrapper around - in your own projects,\nsee [README_CORE.md](Cpp2IL.Core/README_CORE.md)\n\nUses [LibCpp2IL](LibCpp2IL) for the initial parsing and loading of metadata structures. LibCpp2IL is obtainable from the\nbuild artifacts if you want to do something yourself with IL2CPP metadata, and is released under the MIT license. The\nlink above will take you to the documentation for LibCpp2IL.\n\n### Development Branch Notes\n\nCpp2IL is currently undergoing a major rewrite. This branch represents work in progress, and is subject to change.\n\nCI builds for developers can be obtained from [My Nuget Feed](https://nuget.samboy.dev/). \n\nThe command-line interface has been simplified, going from a lot of command line options to a concept of output formats\nand processing layers. However, a lot of these formats and layers are not yet implemented, so functionality is limited\ncompared to the previously released versions.\n\n#### Obvious Changes:\n\nMany options, such as `--analysis-level`, `--skip-analysis`, etc, have been removed. Ignoring the fact that analysis is not yet implemented, these options will not be coming back.\nAnalysis will be off by default, and will be enabled via the usage of a processing layer. \n\nEqually, options like `--supress-attributes`, which previously suppressed the Cpp2ILInjected attributes, have been replaced with a process layer - this one is actually implemented,\nand is called `attributeinjector`. You can enable this layer using the `--use-processor` option, and you can list other options using `--list-processors`. \n\nMetadata dumps and method dumps will be their own output format too, instead of both being default-on, and controlled via a dedicated option. Currently this means you'll need to run\nCpp2IL multiple times if you want both dumps, though this may change in the future if we add support for outputting to multiple formats simultaneously. Like processing layers,\noutput formats can be listed via the `--list-output-formats` option, and are selected via the `--output-as` option.\n\n#### Less obvious changes:\n\nUnder the hood, the application has been almost completely rewritten. Primarily, this was necessary due to the degree Cpp2IL was dependent on the Mono.Cecil library, which had some\nlimitations. When we looked into switching, we realised how reliant we were on the library. This is no longer the case - the application is written around LibCpp2IL types and \nthe new Analysis Context objects, and the Mono.Cecil library is no longer used, having been replaced with AsmResolver.DotNet. \n\nOn top of that, we are currently in the process of reimplementing analysis based around an intermediate representation called ISIL (Instruction-Set-Independent Language), which\nwill allow for much easier support of new instruction sets. The ISIL is then converted into a Control Flow Graph, which can be analysed more intelligently than a raw disassembly.\n\nWe're also working on a Plugin system which will allow third-party developers to write plugins to add support for custom instruction sets, binary formats, and eventually load \nobfuscated or encrypted metadata or binary files. \n\n## Command Line Options\n\n### Basic Usage\n\nThe simplest usage of this application is for a windows x86 or x64 unity game. In that case you can just\nrun `Cpp2IL-Win.exe --game-path=C:\\Path\\To\\Your\\Game`\nand Cpp2IL will detect your unity version, locate the files it needs, and dump the output into a cpp2il_out folder\nwherever you ran the command from.\n\nAssuming you have a single APK file (not an APKM or XAPK), and are running at least cpp2il 2021.4.0, you can use the\nsame argument as above but pass in the path to the APK, and cpp2il will extract the files it needs from the APK.\n\n### Supported Command Line Option Listing\n\n|        Option         |       Argument Example        |                                                                                         Description                                                                                          |\n|:---------------------:|:-----------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n|      --game-path      |        C:\\Path\\To\\Game        |                                                                        Specify the path to the game folder. Required.                                                                        |\n|      --exe-name       |           TestGame            |                                Specify the name of the game's exe file in case auto detection fails (because there are other exe files in the game directory)                                |\n|       --verbose       |           \u0026lt;None\u003e           |                                                                         Log more information about what we are doing                                                                         |\n|   --list-processors   |           \u0026lt;None\u003e           |                                                                         List available processing layers, then exit.                                                                         |\n|    --use-processor    |       attributeinjector       |                                 Select a processing layer to use, which can change the raw data prior to outputting. This option can appear multiple times.                                  |\n|  --processor-config   |           key=value           |                           Provide configuration options to the selected processing layers. These will be documented by the plugin which adds the processing layer.                           |\n| --list-output-formats |           \u0026lt;None\u003e           |                                                                          List available output formats, then exit.                                                                           |\n|      --output-as      |           dummydll            |                                                                          Specify the output format you wish to use.                                                                          |\n|      --output-to      |          cpp2il_out           |                     Root directory to output to. This path will be passed to the selected output format, which may then create subdirectories etc. within this location.                     |\n| --wasm-framework-file | C:\\Path\\To\\webgl.framework.js | Only used in conjunction with WASM binaries. Some of these have obfuscated exports but they can be recovered via a framework.js file, which you can provide the path to using this argument. |\n\n## Release Structure\n\nEvery single commit is built to a CI build using Github Actions - the action file can be found in the .github folder,\nif you want to reproduce the builds yourself. Be aware these may not be the most stable - while there are tests to\nensure compatibility with a range of games, sometimes things do break! These are versioned by the commit they were built\nfrom.\n\nThe release files can be downloaded from the Actions tab if you are signed into GitHub, or you can use the following links,\nwhich always point to the latest successful CI build. Note that the .NET Framework build is provided for compatibility with \nwine/proton.\n\n- [Windows Native Build](https://nightly.link/SamboyCoding/Cpp2IL/workflows/dotnet-core/development/Cpp2IL-net9-win-x64.zip)\n- [Linux Native Build](https://nightly.link/SamboyCoding/Cpp2IL/workflows/dotnet-core/development/Cpp2IL-net9-linux-x64.zip)\n- [Mac Native Build](https://nightly.link/SamboyCoding/Cpp2IL/workflows/dotnet-core/development/Cpp2IL-net9-osx-x64.zip)\n- [.NET Framework 4.7.2 Windows Build](https://nightly.link/SamboyCoding/Cpp2IL/workflows/dotnet-core/development/Cpp2IL-Netframework472-Windows.zip)\n\n\nOn top of this, I manually release \"milestone\" release builds whenever I think a major set of improvements have been made. These\nare NOT marked as pre-releases on github, and should (at least in theory) be stable and suitable for use on a range of\ngames.\n\n## Terminal Colors and Debug Logging\n\nFrom the first milestone build 2021.0, and onwards, Cpp2IL now outputs more rigidly-structured data to the console. This\nincludes log levels (VERB, INFO, WARN, FAIL) and associated colours (Grey for VERB, Blue for INFO, Yellow for WARN, Red\nfor FAIL).\n\nAs of milestone 2021.1, if Cpp2IL is able to detect that you're running in Wine/Proton, these ANSI colour codes are\ndisabled, as they are not supported by wine and look awful.\n\nVERB messages will only be logged if Cpp2IL is launched with the `--verbose` option, and it would be helpful if you\ncould report issues with this flag enabled. For normal operation, they shouldn't be needed, unless you're curious.\n\nIf you do not wish for the output to be coloured, set the Environment Variable `NO_COLOR=true`.\n\n## Credits\n\nThis application is built primarily using .NET 9.0, but a .NET Framework 4.7.2 build is also published for legacy purposes.\n\nIt uses the following libraries, for which I am very thankful:\n\n(All are MIT licensed aside from XUnit which is Apache 2.0+MIT)\n\n- [iced](https://github.com/icedland/iced) disassembler for x86\n- [Capstone.NET](https://github.com/ds5678/Capstone.NET) for ARMv8 and ARMv7 disassembly, though its usage is deprecated in favor of:\n- My own [Disarm](https://github.com/SamboyCoding/Disarm) library for fully-managed ARMv8/ARM64 disassembly.\n- My own WasmDisassembler library for WebAssembly disassembly. This can be found in the `WasmDisassembler` subdirectory.\n- [Pastel](https://github.com/silkfire/Pastel) for the console colours.\n- [CommandLineParser](https://github.com/commandlineparser/commandline) so I didn't need to write one myself.\n- [AsmResolver](https://github.com/Washi1337/AsmResolver) for any output formats which produce managed .NET assemblies.\n- [xUnit](https://github.com/xunit/xunit) for the unit tests.\n- [AssetRipper.CIL](https://github.com/AssetRipper/AssetRipper.CIL) for filling stub method bodies with IL that decompiles cleanly. \n- [AssetRipper.Primitives](https://github.com/AssetRipper/AssetRipper.Primitives) for unity version handling.\n\nThe net472 build uses the following additional libraries:\n- [System.ValueTuple](https://www.nuget.org/packages/System.ValueTuple/) for value tuples in .NET Framework.\n- [PolySharp](https://github.com/Sergio0694/PolySharp/) (licensed under the MIT license) for polyfilling newer runtime features in .NET Framework.\n\nSome plugins also use additional libraries:\n- The OrbisPkg plugin uses [LibOrbisPkg](https://github.com/maxton/LibOrbisPkg), which is licensed under the LGPL, version 3.\n- The ControlFlowGraph plugin uses [DotNetGraph](https://github.com/vfrz/DotNetGraph), which is licensed under the MIT license, for creating dot files.\n- The Pdb plugin uses [AssetRipper.Bindings.MsPdbCore](https://github.com/AssetRipper/AssetRipper.Bindings.MsPdbCore), which is licensed under the MIT license.\n\nCpp2IL is (very loosely, at this point) based off of [Il2CppDumper](https://github.com/Perfare/Il2CppDumper), which I forked\nin 2018 and removed a lot of code, rewrote a lot, and added a lot more. But at its core, it's still got some dumper left\nin it, mostly in LibCpp2IL.\n\nIt contains bits and pieces from [Il2CppInspector](https://github.com/djkaty/Il2CppInspector/), taken with permission\nfrom djKaty, and I'd like to express my gratitude to her here for her invaluable help.\n\nI'd like to thank the Audica Modding community and Discord for the initial inspiration for this project, lots of support\nin the early days, and feature requests these days.\n\nAnd finally, check out some other cool projects which link in with this one. Of course, I\nmentioned [Il2CppInterop](https://github.com/BepInEx/Il2CppInterop/)\nfurther up, but also check out [MelonLoader](https://github.com/LavaGang/MelonLoader/), which uses Cpp2IL for Dummy DLL\ngeneration.\n","funding_links":["https://github.com/sponsors/SamboyCoding","https://ko-fi.com/Samboy063","https://www.paypal.me/sambyass"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamboycoding%2Fcpp2il","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamboycoding%2Fcpp2il","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamboycoding%2Fcpp2il/lists"}