50 Commits

Author SHA1 Message Date
LukeFZ
a88e91451a add (untested) support for metadata v38 2025-08-22 04:53:00 +02:00
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
5b1d9c67d1 Add name mangling to Methods/MethodInfo/TypeInfo/TypeRef, remove Boxing from ValueTypes when used as the this parameter, fix crashes when a module has no attributes 2023-12-06 20:09:35 +01:00
LukeFZ
7120970ece Use actual size of static array initializers 2023-12-01 08:14:12 +01:00
LukeFZ
40201d6e84 Load tokens from AttributeDataRanges for v29 2023-11-30 21:38:06 +01:00
LukeFZ
ef1a5d1e83 Add BlobReader, fix Il2CppType for 27.2+ 2023-11-30 13:31:37 +01:00
LukeFZ
a4528e5f55 Add FieldRva MetadataUsage type and fix current heuristic 2023-11-30 05:15:01 +01:00
LukeFZ
a24fcb50bd use different late binding and image scan implementations 2023-11-29 21:34:49 +01:00
LukeFZ
8ffc7e0021 Add stuff for v29 2023-11-29 21:32:43 +01:00
Katy Coe
538078fcea IL2CPP: Add core plugin update reminder on failure 2021-01-12 12:10:07 +01:00
Katy Coe
52f477698e IL2CPP: Fix off-by-1 pointer error in non-PE x86/64 files (#123) 2021-01-11 19:13:28 +01:00
Katy Coe
71be0f2af2 Update year in copyright messages 2021-01-04 05:26:43 +01:00
Katy Coe
14e80c3022 IL2CPP: Add statusCallback to LoadFromPackage and LoadFromFile 2020-12-26 22:41:38 +01:00
Katy Coe
e929d8d97e Plugins: Add LoadPipelineStarting / LoadPipelineEnding, rename IsHandled to FullyProcessed 2020-12-25 22:29:31 +01:00
Katy Coe
4b53969ba0 IL2CPP: Don't read lock archive files when loading 2020-12-22 04:50:12 +01:00
Katy Coe
e058c39f19 Plugins: Add IPostProcessPackage 2020-12-22 03:17:49 +01:00
Katy Coe
b9409e7425 Plugins: Add hook TODOs 2020-12-21 23:02:32 +01:00
Katy Coe
70d0795c44 IL2CPP: Fix regression in buildLateBindingMetadataUsages() (v27) 2020-12-21 06:38:09 +01:00
Katy Coe
c00b474f33 IL2CPP: Change metadata and binary to derive from BinaryObjectStream 2020-12-21 06:37:29 +01:00
Katy Coe
9af53561cf IL2CPP: Improve buildLateBindingMetadataUsages performance 2020-12-20 23:24:26 +01:00
Katy Coe
a3a06d807a IL2CPP: Fix edge case where max metadata dest index can be greater than usagesCount (#110) 2020-12-15 16:13:24 +01:00
Katy Coe
061886f10c PE: Add LoadLibrary DLL unpacker load strategy 2020-12-14 02:53:26 +01:00
Katy Coe
08c1559222 API: Allow passing of load options to binary loaders 2020-12-11 22:44:48 +01:00
Katy Coe
39f2bca841 IL2CPP: Write decrypted strings back to metadata 2020-12-09 22:46:54 +01:00
Katy Coe
f6eed36284 IL2CPP: Add APIs to save processed metadata and binary to disk 2020-12-09 19:43:29 +01:00
Katy Coe
21fa006085 Support XAPKs and ZIPs containing APKs 2020-12-08 18:57:48 +01:00
Katy Coe
515365e9e9 Add progress callbacks to Il2CppBinary and Il2CppInspector 2020-12-06 17:33:07 +01:00
Katy Coe
479aeb7bcd IL2CPP: Implement Il2CppAssemblyNameDefinition change (metadata v24.4) 2020-11-26 21:42:03 +01:00
Katy Coe
2afdc8b421 CLI/GUI: Support AAB files 2020-09-17 10:00:47 +02:00
Leo Jääskeläinen
0e3b80b502 Support AAB file format 2020-09-17 07:37:14 +02:00
Katy Coe
a6c693d771 Don't lock metadata and binary files for shared read 2020-09-14 12:29:07 +02:00
Katy Coe
4261b5b2d1 Handle split APK packages + CLI support 2020-09-11 16:38:05 +02:00
Katy Coe
2024a3bfac AppModel: Add WordSizeBytes; tidy up a bit 2020-08-17 02:49:01 +02:00
Katy Coe
c9bd4187c2 IL2CPP: Fix metadata usage detection for v27 for 32-bit binaries 2020-08-16 21:47:59 +02:00
Katy Coe
246809c0a4 IL2CPP: Implement metadata usages for metadata v27 2020-08-16 04:18:17 +02:00
Katy Coe
5f7218f7df IL2CPP: Encoded tokens in metadata v27 must be shifted right 1 bit 2020-08-16 02:35:33 +02:00
Katy Coe
641f502ab8 IL2CPP: Reconstruct CustomAttributesGenerators for metadata v27 2020-08-16 00:09:14 +02:00
Katy Coe
1f738a60c6 IL2CPP: Load metadata v27; mark broken areas with TODO 2020-08-15 06:28:48 +02:00
Katy Coe
75819255fd IL2CPP: Add silent mode to loader 2020-08-09 18:52:23 +02:00
Katy Coe
9ee316e8b2 APK: Add multi-architecture (multiple binaries) support 2020-08-07 19:09:25 +02:00
Katy Coe
2459bcb4a6 IL2CPP: Add registration structs search via data heuristics 2020-07-27 21:16:44 +02:00
Katy Coe
a3a0c17ee1 Dramatically improve startup speed when not using APK/IPA 2020-06-30 00:03:37 +02:00
Katy Coe
5baf8cdc2d IL2CPP: Add APK and IPA package extraction API
Add LoadFromStream, LoadFromPackage, GetStreamsFromPackage
2020-06-18 16:43:48 +02:00
Robert Xiao
5d57b76735 Move index decoding to MetadataUsage
This reduces code duplication between metadata usage index decoding and
vtable method index decoding.
2020-06-17 08:18:15 +02:00
Robert Xiao
d426dad820 Add support for parsing and interpreting VTables
This prepares for a future PR where we add types to the IDA script
output.
2020-06-17 08:18:15 +02:00
Katy Coe
b9dffd3500 Allow divergent metadata/binary versions
Il2CppInspector reports the highest version of the two
2020-06-16 23:27:51 +02:00
Katy Coe
0f2fff6e70 Tidy up error handling slightly 2020-06-16 23:08:15 +02:00
Katy Coe
46bf6f2413 IL2CPP: Don't crash on assemblies with zero attributes (issue #19) 2020-02-10 08:44:43 +01:00
Katy Coe
e971cb8502 Refactor solution layout 2020-02-06 02:51:42 +01:00