可以通过如下方法获得Il2CppImageDefinition数组,并且进行遍历。
Il2CppGlobalMetadataHeader
*
header
=
(Il2CppGlobalMetadataHeader
)ptr;
if
(header
-
>sanity!
0xFAB11BAF
|| header
>stringLiteralOffset!
sizeof(Il2CppGlobalMetadataHeader))
{
printf(
"invalid file..\n"
);
return
0
;
}
int
image_count
>imagesSize
/
sizeof(Il2CppImageDefinition);
for
(
i
;i<image_count;i
+
)
const Il2CppImageDefinition
image
&image_arr[i];
static const char
GetStringFromIndex(StringIndex index)
(const char
)(((Il2CppGlobalMetadataHeader
)ptr)
>stringOffset
ptr
index);
static const Il2CppTypeDefinition
GetTypeDefinitionFromIndex(TypeDefinitionIndex index)
(const Il2CppTypeDefinition
)(ptr
((Il2CppGlobalMetadataHeader
>typeDefinitionsOffset)
index;
"image: %s\n"
,GetStringFromIndex(image
>nameIndex));
j
;j<image
>typeCount;j
const Il2CppTypeDefinition
type
GetTypeDefinitionFromIndex(image
>typeStart
j);
"class: %s:%s\n"
,GetStringFromIndex(
>namespaceIndex),GetStringFromIndex(
static const Il2CppMethodDefinition
GetMethodDefinitionFromIndex(MethodIndex index)
(const Il2CppMethodDefinition
>methodsOffset
ptr)
static const Il2CppFieldDefinition
GetFieldDefinitionFromIndex(FieldIndex index)
(const Il2CppFieldDefinition
>fieldsOffset)
uint32_t GetMethodPointer(const Il2CppImageDefinition
image,uint32_t token)
;i<CodeRegistration
>codeGenModulesCount;i
const Il2CppCodeGenModule
module
CodeRegistration
>codeGenModules[i];
(!strcmp(module
>moduleName,GetStringFromIndex(image
>nameIndex)))
>methodPointers[GetTokenRowId(token)
1
];
"invalid!\n"
static TypeDefinitionIndex GetIndexForTypeDefinitionInternal(const Il2CppTypeDefinition
typeDefinition)
typeDefinitions
>typeDefinitionsOffset);
ptrdiff_t index
typeDefinition
typeDefinitions;
(TypeDefinitionIndex)index;
uint32_t GetFieldOffset(TypeDefinitionIndex typeIndex,uint32_t index)
MetadataRegistration
>fieldOffsets[typeIndex][index];
[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法