while (auto method = il2cpp_class_get_methods(klass, &iter)) { auto pointer = method->methodPointer; if (pointer) { const string &methodInfo = getMethodInfo(method); //hook all method auto param_count = il2cpp_method_get_param_count(method); if (param_count > 0) { HookUtils::Hooke...
阅读源码,通过il2cpp_class_get_methods->Class::GetMethods->Class::SetupMethods跟踪到SetupMethodsLocked: constMethodInfo*il2cpp_class_get_methods(Il2CppClass*klass,void**iter)//导出函数很好找{returnClass::GetMethods(klass,iter);}constMethodInfo*Class::GetMethods(Il2CppClass*klass,void**iter){...i...
DEFINE_IL2CPP_FUN(Il2CppClass*, il2cpp_class_get_interfaces, (Il2CppClass * klass,void* *iter)); DEFINE_IL2CPP_FUN(constPropertyInfo*, il2cpp_class_get_properties, (Il2CppClass * klass,void* *iter)); DEFINE_IL2CPP_FUN(constPropertyInfo*, il2cpp_class_get_property_from_name, (Il2CppCla...
IsInstSealed:适用于sealed class或者struct,由于这两种类型不会有子类,直接判断Il2CppClass是否相等即可。 IsInstClass:由于C#只支持单继承,所以针对确定的class可以优化,优化的方法还是蛮巧妙的,通过一个typeHierarchy数组按继承的远近存放其父类的Il2CppClass指针,由于每个类在数组的下标是确定的(比如System.Object肯定...
[Local::executable_name.exe ]-> Il2Cpp.dump("dump.cs") il2cpp: dumping mscorlib... il2cpp: couldn't resolve export il2cpp_class_get_methods at r (D:\Stuff\Haaaaaaaaax\frida\bridge_install_web\node_modules\frida-il2cpp-bridge\dist\index.js:590) at get classGetMethods (D:\Stuff\H...
继续搜索对method->methodPointer的修改,在Class.cpp文件中的Class::SetupMethodsLocked(Il2CppClass *klass, const il2cpp::os::FastAutoLock& lock)方法下成功找到了赋值语句。该函数的作用即通过metadata构造类的所有MethodInfo,而MethodInfo对象则包含了方法函数指针。
const PropertyInfo *il2cpp_class_get_property_from_name(Il2CppClass *klass, const char *name); FieldInfo *il2cpp_class_get_field_from_name(Il2CppClass *klass, const char *name); const MethodInfo *il2cpp_class_get_methods(Il2CppClass *a1, void **a2); const MethodInfo *il2cpp_class_get_...
j_il2cpp_runtime_class_init_0(UnityEngine_Object_TypeInfo); v28 = UnityEngine_Object__Instantiate_object_(PrefabNote, Method_UnityEngine_Object_Instantiate_GameObject___); if ( !v28 ) break; v29 = v28; v30 = UnityEngine_GameObject__get_transform(v28, 0LL); ...
s_TypeInfoDefinitionTable=(Il2CppClass**)IL2CPP_CALLOC(s_GlobalMetadataHeader->typeDefinitionsCount/sizeof(Il2CppTypeDefinition), sizeof(Il2CppClass*)); s_MethodInfoDefinitionTable=(const MethodInfo**)IL2CPP_CALLOC(s_GlobalMetadataHeader->methodsCount/sizeof(Il2CppMethodDefinition), sizeof(MethodInfo...
更新(2023-04-10) 问题 排查 查看IL2CPP代码 确定执行流程 构造复现工程 调试与分析 修复 链接 更新(2023-04-10) Unity 2020.3.47已修复该问题:IL2CPP: Fixed race condition when creating generic class metadata. 问题 游戏新版本上线后,在 Xcode Organizer 看到了