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...
IsInstSealed:适用于sealed class或者struct,由于这两种类型不会有子类,直接判断Il2CppClass是否相等即可。 IsInstClass:由于C#只支持单继承,所以针对确定的class可以优化,优化的方法还是蛮巧妙的,通过一个typeHierarchy数组按继承的远近存放其父类的Il2CppClass指针,由于每个类在数组的下标是确定的(比如System.Object肯定...
s_TypeInfoDefinitionTable = (Il2CppClass**)IL2CPP_CALLOC(s_GlobalMetadataHeader->typeDefinitionsCount / sizeof(Il2CppTypeDefinition), sizeof(Il2CppClass*)); s_MethodInfoDefinitionTable = (const MethodInfo**)IL2CPP_CALLOC(s_GlobalMetadataHeader->methodsCount / sizeof(Il2Cp...
publicclassMyClass{privateintaddValue=1;publicintAddOne(intinputValue){returninputValue+addValue;}}intinput=5;MyClasstarget=newMyClass();varfunctionPtr=(void*)typeof(MyClass).GetMethod("AddOne").MethodHandle.Value;varresult=FuncIL2CPP.Generic<int,MyClass,Tint1>(target,input,functionPtr);Debug...
Get types, methods, fields and so on from Unity Il2Cpp binary file - LithiumCarbonate/Il2CppDumper
DEFINE_IL2CPP_FUN(constPropertyInfo*, il2cpp_class_get_property_from_name, (Il2CppClass * klass,constchar*name)); DEFINE_IL2CPP_FUN(FieldInfo*, il2cpp_class_get_field_from_name, (Il2CppClass * klass,constchar*name)); DEFINE_IL2CPP_FUN(constMethodInfo*, il2cpp_class_get_methods, (Il2Cpp...
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...
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\Haaaaaaaaax\frida\bridge_install_web\node_modules\frida-il2cpp-bridge\dist\index.js:276)...
return il2cpp::vm::Array::NewCached(il2cpp_defaults.method_info_class, 0); klass = startklass = vm::Class::FromIl2CppType(type->type); // <-- klass refklass = vm::Class::FromIl2CppType(reftype->type); iter = NULL; while ((method = vm::Class::GetMethods(klass,...