Add support for parsing and interpreting VTables

This prepares for a future PR where we add types to the IDA script
output.
This commit is contained in:
Robert Xiao
2020-04-07 05:05:21 -07:00
committed by Katy
parent 5224429b0a
commit d426dad820
3 changed files with 40 additions and 0 deletions

View File

@@ -53,6 +53,9 @@ namespace Il2CppInspector
// One invoker specifies a return type and argument list. Multiple methods with the same signature can be invoked with the same invoker
public ulong[] MethodInvokePointers { get; private set; }
// Version 16 and below: method references for vtable
public uint[] VTableMethodReferences { get; private set; }
// Generic method specs for vtables
public Il2CppMethodSpec[] MethodSpecs { get; private set; }
@@ -245,6 +248,10 @@ namespace Il2CppInspector
// >=22: unresolvedVirtualCallPointers
// >=23: interopData
if (Image.Version < 19) {
VTableMethodReferences = image.ReadMappedArray<uint>(MetadataRegistration.methodReferences, (int)MetadataRegistration.methodReferencesCount);
}
// Generic type and method specs (open and closed constructed types)
MethodSpecs = image.ReadMappedArray<Il2CppMethodSpec>(MetadataRegistration.methodSpecs, (int) MetadataRegistration.methodSpecsCount);