Commit Graph

41 Commits

Author SHA1 Message Date
Luke
3439ca912b Implement new GUI and CLI, fix misc. smaller issues (#22)
* Initial commit of new UI c# component

* Initial commit of new UI frontend component

* target WinExe to hide console window in release mode, move ui exe into resources

* force single file publishing and add initial gh workflow for publishing ui

* fix workflow errors

* update dependencies and remove cxxdemangler, as it was outdated

* fix c# single file output due to invalid output path

* smaller tweaks, hack around loops in cpp type layouting

* process other queued exports even if one fails and show error message

* add basic support for processing LC_DYLD_CHAINED_FIXUPS

* ELF loading should not use the file offset for loading the dynamic section

* fix symbol table loading in some modified elfs

* add "start export" button on format selection screen, clear all toasts after selecting an export format

* embed ui executable directly into c# assembly

* only build tauri component in c# release builds

* add il2cpp file (binary, metadata) export to advanced tab

* fix and enable binary ninja fake string segment support

* add support for metadata

* unify logic for getting element type index

* fix new ui not allowing script exports other than ida

* new ui: clear out loaded binary if no IL2CPP images could be loaded

* fix toAddr calls in ghidra script target

* remove dependency on a section being named .text in loaded pe files

* tweak symbol reading a bit and remove sht relocation reading

* add initial support for required forward references in il2cpp types, also fix issues with type names clashing with il2cpp api types

* reduce clang errors for header file, fix better array size struct, emit required forward definitions in header

* expose forward definitions in AppModel, fix issue with method-only used types not being emitted

* remove debug log line

* fix spelling mistakes in gui outputs

* fix il2cpp_array_size_t not being an actual type for later method definitions

* change the default port for new ui dev to 5000

* show current version and hash in new ui footer

* seperate redux ui impl into FrontendCore project

* make inspector version a server api, split up output subtypes and tweak some option names

* add redux CLI based on redux GUI output formats

* replace all Console.WriteLine calls in core inspector with AnsiConsole calls

* add workflow for new cli and add back old gui workflow

* disable aot publish and enable single file for redux cli
2025-08-15 21:13:32 +02:00
Luke
b05c03964a Struct reading and disassembly script overhaul, various misc. loading fixes, bump to .NET 9 (#13)
* Bump projects to .net 9 and update nugets

* add VersionedSerialization + source generator

* migrate versioning to StructVersion class, add handling/detection for 29.2/31.2

* add new struct definitions

* rename serialization methods and add BinaryObjectStreamReader for interop

* Rework metadata struct loading to use new struct versioning

* move 29/31.1/.2 to use tags (-2022,-2023) instead of minor versions

* fix metadata usage validity checks

* rework code registration offsetting a bit and add second 29/31.1 condition

* tweak .1 condition (again)

* 29/31.2 was a psyop

* also remove 29.2 from the readme

* remove loading of packed dlls - this was a very unsafe feature

* support auto-recovering type indices from type handles
fixes loading of memory-dumped v29+ libraries since those replacee their class indices on load with a pointer to the corresponding type

* support loading PEs without an export table

* also read UnresolvedVirtualCallCount on regular v31

* Disable plugin loading for now

* Overhaul disassembler script + add Binary Ninja target (#12)

* Overhaul diassembler scripts:
- No longer defines top level functions
- Split into three classes: StatusHandler (like before), DisassemblerInterface (for interfacing with the used program API), ScriptContext (for definiting general functions that use the disassembler interface)
- Add type annotations to all class methods and remove 2.7 compatibility stuff (Ghidra now supports Python 3 so this is unnecessary anymore)
- Disassembler backends are now responsible for launching metadata/script processing, to better support disassembler differences
- String handling is back in the base ScriptContext class, disassembler interfaces opt into the fake string segment creation and fall back to the old method if it isn't supported

* Add Binary Ninja disassembler script backend
This uses the new backend-controlled execution to launch metadata processing on a background thread to keep the ui responsive

* make binary ninja script use own _BINARYNINJA_ define and add define helpers to header

* Update README to account for new script and binary ninja backend

* implement fake string segment functions for binary ninja but don't advertise support

* also cache API function types in binary ninja backend

* fix ida script and disable folders again

* Fix metadata usage issues caused by it being a value type now

* make TryMapVATR overrideable and implement it for ELFs

* Make field offset reading use TryMapVATR to reduce exceptions

* Fix NRE in Assembly ctor on < v24.2

* Update actions workflow to produce cross-platform CLI binaries, update readme to reflect .net 9 changes

* workflow: only restore packages for projects that are being built

* workflow: tweak caching and fix gui compilation

* workflow: remove double .zip in CLI artifact name

* 29/31.2 don't actually exist, this logic is not needed
2024-11-14 14:32:11 +01:00
LukeFZ
87766f6f96 Add support for metadata version 29.2 and 31 2024-06-24 18:41:14 +02:00
LukeFZ
e9434f4cad Add better il2cpp_array_size_t definition for script outputs in versions post 2017.2.1, fix some other cpp gen issues 2023-12-02 11:22:32 +01:00
LukeFZ
7c8e0eee3e Add new headers 2023-11-29 19:49:26 +01:00
Katy Coe
b4ed297c93 Unity: Add headers for 2018.4.32-33, 2019.4.21-24, 2020.2.4-3.3, 2021.1.0-2 (24.5, 27.2) 2021-04-12 17:15:18 +02:00
Katy Coe
72b26196af Unity: Update headers for 2019.4.19-20, 2020.2.3-4 2021-02-15 15:02:30 +01:00
Katy Coe
712e21e735 Unity: Update version ranges (2018.4.31, 2019.4.18) 2021-01-29 20:37:35 +01:00
Katy Coe
361f5179d5 Unity: Allow version selection from asset file 2021-01-11 02:30:26 +01:00
Katy Coe
382495d0c7 Unity: Fix 'abstract declaration' error in IDA header parsing 2021-01-04 21:00:27 +01:00
Katy Coe
71be0f2af2 Update year in copyright messages 2021-01-04 05:26:43 +01:00
Katy Coe
8ae727852f Unity: Fix crash when comparing open-ended latest version 2020-12-20 23:24:59 +01:00
Katy Coe
37f0610eda Unity: Update for 2018.4.30, 2019.4.16, 2020.1.15-17, 2020.2.0+ 2020-12-19 19:47:14 +01:00
Katy Coe
4e4f794376 IL2CPP: Handle ROT encryption of API exports 2020-12-10 21:25:13 +01:00
Katy Coe
4fb805223b C++: Include metadata-global.dat structs in v27 headers 2020-11-26 21:45:20 +01:00
Katy Coe
479aeb7bcd IL2CPP: Implement Il2CppAssemblyNameDefinition change (metadata v24.4) 2020-11-26 21:42:03 +01:00
Katy Coe
ccf56385d8 C++: Include MemoryInformation.h in Unity headers (#100) 2020-11-26 12:30:21 +01:00
Katy Coe
4a22a33dc3 C++: Fix self-referential structs not working in Ghidra 2020-11-26 11:36:38 +01:00
Katy Coe
65cf69741d Unity: Update headers 2020-11-24 14:06:53 +01:00
Katy Coe
76825f231b C++: Include IL2CPP intrinsics of .NET managed types (#79) 2020-10-07 08:00:42 +02:00
Katy Coe
2723657ee2 C++: Add headers for Unity 2020.2.0a19 (as Unity 2020.2.0) 2020-08-16 00:29:01 +02:00
Katy Coe
f9c236f143 Unity: Add equality implementation for UnityVersionRange, UnityHeaders 2020-08-07 04:56:47 +02:00
Katy Coe
15fb96ba9a Unity: Over-extend LTS version numbers (2018.4.x and 2019.4.x) 2020-08-06 04:55:30 +02:00
Katy Coe
271a85b7f1 C++: Fix incorrect variable declaration of VirtualInvokeData struct for 5.3.6-5.4.6 2020-07-25 16:54:52 +02:00
Katy Coe
87519ba66f Unity: Fix select only matching APIs in discovery instead of all in total version range 2020-07-25 15:54:18 +02:00
Katy Coe
de73cfe8c3 Unity: Add headers for Unity 2020.1.0 2020-07-25 14:55:03 +02:00
Katy Coe
1240fe3647 Unity: Fix types/API header version mismatch when binary is missing exports 2020-07-25 14:50:09 +02:00
Katy Coe
4473a5225c Unity: Update type header names for 2018.4.25 and 2019.4.5 2020-07-25 05:09:47 +02:00
Katy Coe
b075821092 Unity: Fix crash in GetTypeHeaderText() when VersionRange.Max is null (no upper bound) 2020-07-25 04:13:31 +02:00
Katy Coe
44a5fe009a C++: Output il2cpp-api-functions.h with unavailable exports elided 2020-07-24 17:20:37 +02:00
Katy Coe
8bb40d98b2 Unity: Try really hard to find the best IL2CPP API header match for the binary 2020-07-24 17:01:13 +02:00
Katy Coe
deeb8daa97 Unity/C++: Significant re-factoring of Unity header management (see description)
Extract resource handling to UnityResource
Add API header resource helpers
Fix UnityVersion ToString() when Min == Max
Replace fixed list of Il2Cpp header reserved names with parsed names from actual selected headers (solves TypeInfo/MemberInfo problems in 5.3.0-5.3.4 (metadata v16-20))
Use CppDeclarationGenerator when initializing CppTypeCollection to ensure all Il2Cpp header symbols are reserved
Process API headers in CppTypeCollection.FromUnityHeaders
Move #define IS_32BIT handling to UnityHeaders
Update tests
2020-07-22 19:01:33 +02:00
Katy Coe
83e94ebf28 Unity: Fix missing VirtualInvokeData for 5.3.6-5.4.6 2020-07-20 18:56:32 +02:00
Katy Coe
8cd2d4ff4a Unity: Add version range CompareTo, Intersect and handle no version upper bound 2020-07-20 17:06:25 +02:00
Katy Coe
ea91c2b4ec Extract assembly resource management from UnityHeader to ResourceHelper 2020-07-20 07:05:20 +02:00
Katy Coe
964685e44a Extract Unity version range management from UnityHeader to UnityVersionRange 2020-07-20 06:39:29 +02:00
Katy Coe
4cb7f50f13 Update Unity header generation support to latest 2020-07-19 21:26:52 +02:00
Katy Coe
3c4908c470 Fix fatal crash in Unity version parsing for non-English locales 2020-07-12 19:33:04 +02:00
Katy Coe
873a6c98f6 AppModel: First iteration of ApplicationModel API
Integrate with C++ scaffolding
Add new tests
Rename Il2CppModel to TypeModel
Incomplete IDAPython integration
CLI and GUI support
Update README.md
2020-07-09 03:48:50 +02:00
Katy Coe
9ee8065d57 C++: Fix assembly resource location bug 2020-07-04 02:30:50 +02:00
Katy Coe
23db04c369 Minor re-organization 2020-06-30 00:13:18 +02:00