Commit Graph

32 Commits

Author SHA1 Message Date
LukeFZ
8055ed1cdb add support for metadata 2025-07-21 17:03:20 +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
4ce4d0e799 backport 29/31 version fixes from new versioning branch 2024-08-18 23:20:49 +02:00
LukeFZ
87766f6f96 Add support for metadata version 29.2 and 31 2024-06-24 18:41:14 +02:00
LukeFZ
a6d9291303 add classes for ver 29, fix some stuff for v24 2023-11-29 21:22:51 +01:00
Katy Coe
0844d4b6bd IL2CPP: Fix regression in Metadata.Sizeof relating to #148 2021-04-12 18:59:33 +02:00
Katy Coe
5c66889e52 IL2CPP: Abstract metadata string decryption to plugin 2021-01-12 12:16:01 +01:00
Katy Coe
71be0f2af2 Update year in copyright messages 2021-01-04 05:26:43 +01:00
Katy Coe
0ce0bbe74d Plugins: Add PreProcessBinary, PostProcessBinary, PostProcessAppModel 2020-12-29 21:32:54 +01:00
Katy Coe
e929d8d97e Plugins: Add LoadPipelineStarting / LoadPipelineEnding, rename IsHandled to FullyProcessed 2020-12-25 22:29:31 +01:00
Katy Coe
e7bcd41d84 GUI: Tidy up status messages a bit 2020-12-22 03:18:32 +01:00
Katy Coe
3e27cd25e9 Plugins: Simplify event data; add GetStrings and GetStringLiterals 2020-12-21 22:54:01 +01:00
Katy Coe
fbc8e0950c IL2CPP: Use mapped objects for Sizeof 2020-12-21 22:03:43 +01:00
Katy Coe
c00b474f33 IL2CPP: Change metadata and binary to derive from BinaryObjectStream 2020-12-21 06:37:29 +01:00
Katy Coe
c6e9e26111 Plugins: Add PluginEventInfo and IPostProcessMetadata 2020-12-20 23:24:09 +01:00
Katy Coe
735dc2824b Plugins: Add PostProcessMetadata hook 2020-12-19 20:50:37 +01:00
Katy Coe
95db3ad19b IL2CPP: Fix potential corruption after last string when saving decrypted strings 2020-12-11 16:48:59 +01:00
Katy Coe
b2ea6101b5 IL2CPP: Use BinaryObjectWriter to save decrypted strings 2020-12-10 18:02:52 +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
90fa9cf193 IL2CPP: Add IsModified flags to Metadata and Binary 2020-12-09 17:34:21 +01:00
Katy Coe
3556697939 IL2CPP: Add assembly hash and public key string indices to index list 2020-12-08 16:56:10 +01:00
Katy Coe
47ff61a996 IL2CPP: Fix not including final encrypted string 2020-12-06 17:49:27 +01:00
Katy Coe
515365e9e9 Add progress callbacks to Il2CppBinary and Il2CppInspector 2020-12-06 17:33:07 +01:00
Katy Coe
12e9492161 IL2CPP: Automatically decrypt XORed strings 2020-12-06 16:51:14 +01:00
Katy Coe
3cebb0f4ab IL2CPP: Reconstruct scrambled Il2CppGenericInst** in Il2CppMetadataRegistration 2020-12-05 22:49:16 +01:00
Katy Coe
479aeb7bcd IL2CPP: Implement Il2CppAssemblyNameDefinition change (metadata v24.4) 2020-11-26 21:42:03 +01:00
Katy Coe
1f738a60c6 IL2CPP: Load metadata v27; mark broken areas with TODO 2020-08-15 06:28:48 +02:00
Katy Coe
a621e20b62 Metadata: Add static Sizeof helper 2020-07-27 21:11:43 +02:00
Katy Coe
7209fa74a5 IL2CPP: Remove unused Metadata.MetadataUsages property 2020-07-18 05:05:35 +02:00
Katy Coe
0f2fff6e70 Tidy up error handling slightly 2020-06-16 23:08:15 +02:00
Katy Coe
e971cb8502 Refactor solution layout 2020-02-06 02:51:42 +01:00