Commit Graph

90 Commits

Author SHA1 Message Date
Katy Coe
72ddaef7b1 IL2CPP: Prepare Code/Metadata struct data for de-obfuscation 2020-12-04 14:38:06 +01:00
Katy Coe
7289001933 IL2CPP: Add Unity 2021.1 TODOs 2020-11-26 21:42:36 +01:00
Katy Coe
479aeb7bcd IL2CPP: Implement Il2CppAssemblyNameDefinition change (metadata v24.4) 2020-11-26 21:42:03 +01:00
Katy Coe
c07c13be24 IL2CPP: Auto-detect re-arranged struct field obfuscation (#44, #98) 2020-11-25 12:17:20 +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
54ac9d7c1a IL2CPP: Fix crash when loading Il2CppCodeGenModule with no concrete methods (#58) 2020-08-22 03:30:17 +02:00
Katy Coe
2024a3bfac AppModel: Add WordSizeBytes; tidy up a bit 2020-08-17 02:49:01 +02:00
Katy Coe
dcafd81ed2 JSON: Write all exports, not just API export symbols 2020-08-16 22:26:42 +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
ec6066aa1d Model: Handle generic type definition fetch for metadata v27 2020-08-16 01:13:27 +02:00
Katy Coe
641f502ab8 IL2CPP: Reconstruct CustomAttributesGenerators for metadata v27 2020-08-16 00:09:14 +02:00
Katy Coe
abac509fbd IL2CPP: Correctly detect Il2CppCodeRegistration and Il2CppMetadataRegistration for metadata v27 2020-08-15 23:15:59 +02:00
Katy Coe
1f738a60c6 IL2CPP: Load metadata v27; mark broken areas with TODO 2020-08-15 06:28:48 +02:00
Katy Coe
0d9c01ecaa IL2CPP: Update structures for compatibility with metadata v27 2020-08-15 06:27:00 +02:00
Katy Coe
75819255fd IL2CPP: Add silent mode to loader 2020-08-09 18:52:23 +02:00
Katy Coe
00c2e8ad44 Unify symbol table format and implement for Elf and Mach-O 2020-08-09 00:30:18 +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
a621e20b62 Metadata: Add static Sizeof helper 2020-07-27 21:11:43 +02:00
Katy Coe
3fd97649e6 IL2CPP: Ignore API exports starting "il2cpp_z_" 2020-07-21 16:19:47 +02:00
Katy Coe
ccb401bb12 IL2CPP: Add Binary.GetAPIExports() 2020-07-20 17:09:19 +02:00
Katy Coe
7209fa74a5 IL2CPP: Remove unused Metadata.MetadataUsages property 2020-07-18 05:05:35 +02:00
Katy Coe
a3a0c17ee1 Dramatically improve startup speed when not using APK/IPA 2020-06-30 00:03:37 +02:00
Robert Xiao
3ccbab2461 Add/modify copyright notices 2020-06-29 22:10:45 +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
Robert Xiao
c9d65e5f2d Get 2019.3.7f1+ working by adding new '24.3' version
In 2019.3.7f1, the following fields were added to
Il2CppCodeRegistration:

     uint32_t interopDataCount;
     Il2CppInteropData* interopData;
+    uint32_t windowsRuntimeFactoryCount;
+    Il2CppWindowsRuntimeFactoryTableEntry* windowsRuntimeFactoryTable;
     uint32_t codeGenModulesCount;
     const Il2CppCodeGenModule** codeGenModules;

These two fields overlap the old codeGenModules fields, causing failures.
The current fix is simply to bump the version to 24.3 if these fields are
detected in order to get the correct codeGenModules pointer. Long term, a
better detection mechanism (probably based on examining the name string
pointer in codeGenModules[0]) will be necessary. However, this is pending
more samples of 2019.3.7+ for testing.
2020-06-16 23:30:53 +02:00
Robert Xiao
4f074837b7 Fix fieldOffsetsArePointers logic on 64-bit builds
The logic for fieldOffsetsArePointers was always reading 32-bit units
even on 64-bits. When fieldOffsetsArePointers is true, fieldOffsets is
declared as int32_t**, so each element *must* be a pointer and therefore
word-sized (64 bits on 64-bit machines). So it doesn't make sense to
only read 32-bit words for this test.

This fixes metadata extraction for 64-bit builds from Il2Cpp versions
5.3.7f1, 5.3.8f2, 5.4.1f1, 5.4.2f2, 5.4.3f1, 5.4.4f1, 5.4.5f1 and
5.4.6f3. Notably, 5.4.0f3 is an unusual outlier which uses int32_t * for
fieldOffsets.
2020-06-16 23:30:53 +02:00
Robert Xiao
02fab932ae referencedAssemblies was added in v5.3.3 (metadata 20)
According to the headers I have available, Unity v5.3.2f1 (metadata 19)
lacks the referencedAssemblies{Offset,Count} fields in
Il2CppGlobalMetadataHeader. These appear to have been added some time
between that version and 5.3.3f1 (metadata 20).

Changing these fields makes the Inspector work properly on the output from
Il2Cpp from Unity v5.3.2f1.
2020-06-16 23:30:53 +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
245a95b15b IL2CPP: Allow code at address zero to be evaluated (part of #21) 2020-02-13 18:22:38 +01: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