Cpp2IL Versions Save

Work-in-progress tool to reverse unity's IL2CPP toolchain.

2022.1.0-pre-release.6

1 year ago

LibCpp2IL

  • Added support for Mach-O files
  • Fixed exception related to generic types on v27
  • Added support for v29.1
  • Fixed loading of binaries that contain more than 200 managed modules
  • Optimised the time it takes to load relocations from an ELF file
  • Added more relocation support to ELF files, allowing some binaries that previously wouldn't load to do so.
  • Added the ability to track the total size used by various structures in a binary or metadata file.
  • Fixed some functions which would fail to be located in WASM files.

Cpp2IL.Core

  • Made some previously-internal APIs public. Thanks to @ds5678 in #104
  • Added a utility method to generate a stacktrace from a list of pointers
  • More ISIL work by @gompoc
  • Added a hook for output formats when they get selected, before il2cpp data is loaded
  • Added a logging system for plugins.
  • Removed all initial disassembly from Arm64 binaries, making loading them much quicker.

Cpp2IL command-line application

  • Turned down the build trimming level to allow plugins to load - this has resulted in slightly larger binaries for all artifacts apart from the .NET Framework Zip.

Processing Layers

  • Added a new stablenamer processing layer which renames obfuscated types (only, currently, methods eventually) to names that can be used in c# source code
  • Added a deobfuscation map processing layer which applies name overrides from a csv file

Output Formats

  • DummyDll:
    • Initialize out parameters in method stubs. Thanks to @ds5678 in #113
  • Added (as a plugin) a buildreport output format which provides information useful to game developers.

Please note that plugins are provided only for the non-netframework (platform-specific) versions of the application, and must be placed in a Plugins directory next to the executable.

2022.0.5

2 years ago

I should really learn to stop saying "this is the last release".

LibCpp2IL

  • Fixed an oversight where already-decompressed NSO files could not be loaded

Attribute Restoration

  • Runs for method parameters too now, allowing restoration of params behavior.

2022.0.4

2 years ago

This is hopefully the last release in the 2022.0.x series to fix a few small issues and support Mach-O (MacOS) binaries.

Attribute Restoration

  • Fixed a chunk of unoptimized code which caused --simple-attribute-restoration to perform poorly. It should be a lot faster now.

Analysis

  • A couple more band-aid fixes to prevent DllSaveExceptions. Note this likely means more methods will refuse to export, even in unsafe mode. Nothing I really can do about this in the constraints I have, a proper fix will come with the rewrite (eventually).

LibCpp2IL

  • Added experimental support for Mach-O binaries.
  • Increased (again!) the sanity limits when detecting CodeRegistration, and made them be ignored if only one valid address was located.
  • Fixed a missing lock when reading string literals which could cause random data (string or otherwise) to be returned instead of the correct literal.

2022.1.0-pre-release.5

2 years ago

Cpp2IL.Core

  • Processing layers
    • AttributeInjector: Fixed an issue where attributes would not be injected on V29 (Unity 2021.2+) games.

LibCpp2IL

  • Ported all remaining instances of reflection-based structure loading to virtual-method-based
  • Updated the sanity checks on the code registration struct locator, which should reduce location failures.
  • Fixed an issue where string literals could be read incorrectly due to a missing lock. Thanks to unproductive on Discord for reporting this!

2022.1.0-pre-release.4

2 years ago

This is another pre-release build of the rewrite branch, which brings some big performance and correctness improvements, support for custom attributes on parameters (crucially, this brings support for params arrays), and fixes some bugs.

General

LibCpp2IL

  • Switched the data reader from reflection-based to virtual method based, reducing load times to as low as 25% of what they were.
  • Cherry-picked a big performance boost on v27+ games from the new-analysis branch.
  • Optimised the algorithm used to find code registration on unity versions >= 2019
  • Added support for the rearranged il2cpptype bitfield on v27.2+ (2020.1.0+)

Core

  • Analysis Contexts: Don't attempt to get method bodies for abstract or interface methods, even if they appear to have a valid pointer.
  • Analysis Contexts: Added a ParameterAnalysisContext, fixing support for params arrays in methods, and closing #95. Thanks to @js6pak for pointing this out.
  • v29 custom attribute parser: Fixed reading of custom attributes containing arrays of enums, closing #77 and #89

Output Formats

  • DummyDll:
    • Fixed how a default value of null was output in parameter and field definitions.
    • Fixed an exception that could occur if a custom attribute had a type argument with a null value
    • Stopped outputting type sizing information on enum types, closing #65.
    • We now copy MethodImplAttributes from the il2cpp metadata.
  • ISIL Dump:
    • Added a basic ISIL dump output format.

2022.0.3

2 years ago

Literally just a reupload of 2022.0.2 with a newer version number to trick ML 0.5.4 into "updating".

Ignore this.

2022.1.0-pre-release.3

2 years ago

Once again, built using AsmResolver upcoming version

Version bump because I missed something obvious.

Processing layers

Attribute Injector:

  • Fix method address attribute not being applied to all methods.

2022.1.0-pre-release.2

2 years ago

This release is built against an in-development build of the upcoming 4.10.0 release of AsmResolver.DotNet, in case you are trying to build it yourself.

Output formats

DummyDLL:

  • Fix nested type references (upstream in AsmResolver)
  • Generate assembly definitions in parallel
  • Optimize type signature importing

Processing layers

Attribute injector:

  • Fix field offset attribute not being applied to all fields

Internal Changes

  • Analysis: Convert directly to ISIL, do not build a control flow graph first

2022.1.0-preview1

2 years ago

This is the first preview release of the rewrite. Considering I wanted to get this done by January, having an initial preview by Mid-March isn't ideal, but it's better than nothing.

It's not really possible for me to write changenotes here because so much has changed - but there's an attempt at a summary in the README of the development branch, which I recommend you read if you're curious.

Note that this release does not include any sort of analysis behavior, but it is, I believe, suitable for use with Il2CppAssemblyUnhollower.

It's also considerably faster (up to a 50% reduction in execution time) at doing the same tasks than any previous build.

Also note that the Linux builds have changed from net6-ubuntu to net6-linux.

This release is not published to nuget, but CI builds can be obtained from my nuget feed.

2022.0.2

2 years ago

This is a minor bugfix and improvement release

WasmDisassembler

  • Some changes to the WasmInstruction struct to conform to microsoft's updated guidelines.

LibCpp2IL

  • Updated LibCpp2ILMain.Reset() to also dispose of the binary and metadata files and underlying streams.
  • Added support for what I've dubbed metadata version 24.15, unity 2018.4.34-2018.4.36, which removes a single field in AssemblyNameDefinition.
  • Added an initial backtrack to v27+ code registration via codegen module list, to hopefully reduce the excessive time spent here.
    • This comes with a buffer which should be large enough in almost all cases (I've not seen any games which break due to this change), but this could cause issues - let me know if CodeRegistration location errors arise from this change.

Cpp2IL.Core

  • Updated the Capstone library to a fork which uses proper packaging, until the main one gets an update with this change.
    • This should fix errors when running on linux and mac!
    • Thanks to @js6pak for PRing a fix both to capstone and here.
  • Renamed Cpp2ILApi.ResetInternalState to DisposeAndCleanupAll and made it public, so you can clear out the memory usage (or at least, most of it, in the event I missed something) once you've finished using Cpp2IL.