Skip to content

Releases: SamboyCoding/Cpp2IL

Milestone Preview: 2022.1.0 #19

08 Dec 15:33
edbb994
Compare
Choose a tag to compare
Pre-release

A huge thank you goes out to everyone who contributed for this release - pretty much none of this is my work!

All Projects

  • A bunch of dependency updates, including updating Cpp2IL to .NET 9.0 (from .NET 7.0).

Cpp2Il Command-Line

  • Added support for specifying a macOS bundle file with --game-path. Thanks to @yeah-its-gloria in #383.

Cpp2IL Core

  • Improved ISIL support for x64, including the first calling convention resolver. Thanks to @Alluseri in #333, @BadRyuner in #335, @MrUser3 in #344, and @ds5678 in #353.
  • Made a bunch of changes to WASM signature calculations (the code which maps C# method signatures to WASM parameter types)
  • Improvements to ConcreteGenericMethodAnalysisContext by @ds5678 in #352
  • Added methods to resolve an il2cpp definition to its analysis context. Thanks to @ds5678 in #364 and #376
  • Cleaned up duplicate properties in MethodAnalysisContext's API. Thanks to @ds5678 in #354
  • Added a new output format: wasm_name_section, which outputs a binary file which can be appended to a wasm file, which will provide debugging symbols in e.g. the browser's dev tools. Thanks to @thegu5 in #388.
  • Diffable-CS: Fixed an exception when outputting a non-printable char default value. Thanks to @MrUser127 in #386.
  • DummyDll: Properly emit metadata for explicit interface implementations. Thanks to @ds5678 in #346 and #368.

LibCpp2IL

  • Fixed definition of Il2CppRGCTXDefinition in metadata versions > 27.1. Thanks to @lifeengines in #339
  • Fixed an exception in the metadata reader when trying to read an array of length 0. Thanks to @commonuserlol in #345
  • Made some improvements to the API for fields, allowing resolution of a field's declaring type. Thanks to @ds5678 in #347 and #348

StrippedCodeRegSupport Plugin

  • Fixed an issue which may have caused the plugin to fail when it shouldn't have. Thanks to @ds5678 in #381

PDB Plugin

  • Added. This plugin provides a rudimentary PDB output format using the official MsPdbCore library. Thanks to @ds5678 in #382.

Milestone Preview: 2022.1.0 #18

01 Sep 13:58
Compare
Choose a tag to compare
Pre-release

This release is mainly just a maintenance one to address the v29.2 issue.

Cpp2IL.Core

  • Trim .winmd extension by @chuck6900 in #327
  • Clean type namespace before being used as a path by @thegu5 in #329
  • Began work on adding some unit testing to core so we can be more sure of not breaking things
    • Including some CFG unit tests from @gompoc
  • Fixed some exceptions that would occur when injecting a method with parameters.
  • Properly support 2023.2 and 6000.0 UnmanagedCallersOnly metadata on methods.
  • Made Cpp2IlApi.ResetInternalState() public so that you can load multiple games in the same process more easily (still only one at a time, but you can clean up old ones and load a new one properly now)

LibCpp2IL

  • Removed non-existent "v29.2" support which caused loading games on Unity 2023.2 and some early 6000.0 versions to fail.

Milestone Preview: 2022.1.0 #17

19 Aug 12:49
Compare
Choose a tag to compare
Pre-release

Cpp2IL Command Line

  • Fixed more trimming issues which caused plugins, especially the stripped code reg plugin, to fail to load on the net7 builds.

Plugins

  • Added a Control Flow Graph plugin which adds a cfg output format which allows writing .dot graph files for all methods in the binary.

Cpp2IL.Core

  • Added support for performing control-flow analysis of generated ISIL. This is the next big step in a working decompiler to IL. Huge thanks to @gompoc (this was #318)
  • Optimized IsilImmediateOperand.ToString by avoiding exceptions as control flow.
  • Implemented more x86 -> ISIL conversions
  • Added a block processing layer system that works in tandem with the control flow graph analysis system. Currently, strings, unambiguous method calls, and type metadata are resolved via this system.
  • Fixed a bug in the Arm64 instruction set which could lead to attempts to get the method body for some methods disassembling the entire remainder of the binary 4 bytes at a time. This manifested as the application getting stuck processing an assembly.
  • Optimized the call analysis and native method detection processing layers to only get ISIL, instead of fully analyzing methods. Thanks to @ds5678 in #324.

LibCpp2IL

  • Fixed an issue with multiple exported functions at the same address in Mach-O binaries. Thanks to @gabriel-nsiqueira in #316
  • Fixed a thread safety issue in Il2CppBinary.ReadPointerAtVirtualAddress which could cause fields in structures to be corrupted when read from multithreaded code.

Milestone Preview: 2022.1.0 #16

02 Aug 14:10
Compare
Choose a tag to compare
Pre-release

LibCpp2IL

  • Misc WASM fixes for finding code/meta reg pointers more reliably

CPP2IL Core

  • Misc Improvements to ISIL generation for ARM64, including some contributions from @IIIImmmyyy in #313 and a fix for a case where an exception could be thrown during call analysis etc.
  • Fixes to type analysis contexts by @ds5678 in #304
  • Fixes to injected type constructors by @thegu5 in #307
  • Added a "low memory mode" which periodically forces a GC in strategic places where a lot of garbage is created, to try to keep total heap usage down. Should especially help with native method detection and call analysis.
    • Also just reduced the memory usage of native method detection and call analysis in general by up to 50%.
  • Improvements to diffable-cs handling of default values, primitive types, field RVAs, and generating valid c# source code in property and event semantic methods

CPP2IL Command-Line Wrapper

  • Implemented support for Core's "low memory mode" via --low-memory-mode and also made this flag disable CPP2IL's GC workload tuning to further reduce memory usage at the cost of execution time.
  • Fixed net7 published builds stripping helper functions in Cpp2ILPlugin class which caused the StrippedCodeReg plugin (ironically) to not work.

New Contributors

Milestone Preview: 2022.1.0 #15

25 Jun 21:42
Compare
Choose a tag to compare
Pre-release

LibCpp2IL

  • Fix two off by one issues in ElfFile. by @hpmv in #284
  • Some small fixes for certain WASM files
  • Support for IL2CPP metadata version 29.2 (Unity 2023.2 and later) and 31 (some late 2022.3 patch versions, possibly more in the future)

CPP2IL Core

  • Publicize AttributeInjectionUtils by @thegu5 in #285
  • Implemented some basic Arm64 ISIL support, including:
    • Better Arm64 ISIL conversion by @BadRyuner in #299
    • Add Not Implemented Instructions when building Arm64 ISIL by @ds5678 in #294
  • Generate MemberTypeParameters for Generic Methods by @ds5678 in #289
  • Handle short assembly names by @ds5678 in #290
  • New Invalid ISIL Instruction by @ds5678 in #293
  • Include the Return Type in Call Analysis Attributes by @ds5678 in #288
  • A critical bugfix for DummyDll output formats when referencing generic instantiations of value types (e.g. Nullable<T> for any T)

CPP2IL Command-Line Wrapper

CPP2IL GUI

  • Removed, by @ds5678 in #295
    • The GUI didn't work and was a failed experiment anyway.

New Contributors

Milestone Preview: 2022.1.0 #14

12 Jan 01:26
Compare
Choose a tag to compare
Pre-release

This is a bugfix release

Cpp2IL Core

  • Fixed an issue which resulted in incorrect type analysis contexts being created for ref type signatures, resulting in, for example, out parameters in dummy dlls being decompiled incorrectly as [Out] ParamType paramName instead of out ParamType paramName.

No packages other than core have been updated.

Milestone Preview: 2022.1.0 #13

02 Jan 00:54
3d6a81f
Compare
Choose a tag to compare
Pre-release

Yes, I know it's 2024 and the version number is still 2022.1

Happy 2024! It's been a while (almost a year!) since any super large changes came down the pipeline, so here's another release with various fixes and improvements. Specifically:

Cpp2IL Command Line Application

  • Improved verbose logging around resolution of paths within the provided game-path, to help diagnose issues with locating required files.
  • Fixed broken net7 builds
  • Fixed compilation errors when trying to build with .NET 8 SDK
  • Fixed processing layers running in reverse order to that in which they were passed in via arguments*

Cpp2IL Core

  • Diffable C# Output Format: Fixed an exception that could occur when generating diffable C# forms of custom attributes.
  • Looser filtering on <Module> type name to resolve an issue with some games (notably, Synth Riders). Thanks to @bookdude13 in #233!
  • Fixed an issue with end-of-method pointer calculation going outside the bounds of the binary. If this happens, Cpp2IL will fall back to an alternative calculation method*
  • Resolved some issues with invalid IL being generated in empty method bodies, by way of switching to AssetRipper.CIL for method filling*
  • Added detection of auto-properties and modified the generated IL to output them as actual auto-properties*
  • Fixed incorrect metadata in output dlls related to indexer properties*
  • Implemented discovery and output of native methods (e.g. IL2CPP exception throw helpers) so that information on them can be output*
  • Various improvements to @ds5678's Call Analysis processing layer, including:
    • Full type signatures for generic types*
    • Full method signatures*
    • Support for the new native method discovery*
    • Changing various Type fields to be object fields so that the same field can be re-used for Types and Type Names (where a direct Type reference isn't possible)*
  • Four new output types for dummy dlls*:
    • dll_default is the old dummydll (dummydll will still work and is an alias of dll_default)
    • dll_empty generates completely empty method bodies. Note these will likely not decompile cleanly, but may be desirable for programmatic use.
    • dll_throw_null fills all methods with throw null;.
    • dll_il_recovery will eventually be used for IL recovery like classic CPP2IL, but currently is an alias of dll_throw_null.

LibCpp2IL

  • WASM: Fixed an issue with reading wasm binaries which could result in errors relating to reading beyond the end of a stream.
  • WASM: Fixed an issue with calculating function pointers in WASM binaries.
  • WASM: Fixed an issue with incorrect field offsets in WASM binaries.
  • ELF: Properly handle addresses outside of file-backed regions. Thanks to @LukeFZ in #240!
  • MACH-O: Add support for loading the exported function list.
  • Removed LibCpp2ILUtils.VersionAwareSizeOf, because it used reflection to determine the size of structs, which was slow and didn't work with trimming.
  • Further increased the sanity limit for finding the Il2CppMetadataRegistration struct on metadata version 27 (Unity 2020.2) and later

All Projects

  • Dependency updates, including notably some changes to utilities pulled in from AssetRipper*
  • Miscellanous fixes to ensure proper NativeAOT/Trimming support*

Plugins

  • New plugin: Cpp2IL.Plugin.StrippedCodeRegSupport.
    • Some games have now been observed in the wild, often compiled using "master" compilation settings, which inline the entire Il2CppCodeRegistration struct. This results in errors like "failed to find pCodegenModules!". Using this plugin can allow loading these games, albeit without any information on generic types.
  • As a reminder, plugins are loaded from a Plugins directory in the current working directory. Also, the OrbisPkg plugin requires separate downloading of LibOrbisPkg and the dll to also be placed in the Plugins directory.

* Any changelog entry noted with an asterisk was contributed by @ds5678 via pull requests. Thanks for all the hard work!

Full Changelog: 2022.1.0-pre-release.12...2022.1.0-pre-release.13

Milestone Preview: 2022.1.0 #12

23 Feb 21:10
Compare
Choose a tag to compare
Pre-release

This is a minor release to address a couple issues

LibCpp2IL

  • Increased the sanity limit when searching for pCodegenModules from 250 -> 400
  • Added support for reading Mach-O export tables

Cpp2IL Core

  • Fixed an issue with reading chars from v29 attribute blobs
  • DummyDll: Fixed invalid dll metadata on structs with explicit layout

Because this is a small/unplanned release, net7 support is still not fixed so those binaries are absent.

Milestone Preview: 2022.1.0 #11

04 Feb 19:10
Compare
Choose a tag to compare
Pre-release

All projects

  • Dependency updates, including to .NET 7

Cpp2IL Command-line

  • The single-file executables are now built using .NET 7

Cpp2IL Core

  • Call analysis improvements (#165, thanks @ds5678!)
  • Fixed custom attribute blobs in dummydll output format (#172, thanks @ds5678!)
  • MethodAnalysisContext improvements (#182, thanks @ds5678!)
  • Some ISIL updates and refactoring, again thanks to @ds5678
  • Avoid a crash on invalid method pointers
  • Improved IL in dummy dll methods bodies (thanks @ds5678!)
  • Ensured that the __Generated DummyDLL has the .dll extension, which it previously didn't.

Standalone/single-file binaries have been removed because the net7 port broke them, they'll be back in the next release.

Milestone Preview: 2022.1.0 #10

12 Dec 13:52
be0b7ce
Compare
Choose a tag to compare
Pre-release

Cpp2IL

  • Fixed Linux GamePath handling