//
// cocos2d::JniHelper::setClassLoaderFrom from 0x7ed938 to 0x7ed9f2 (186 bytes)
//
// 1 xrefs:
// > Java_org_cocos2dx_lib_Cocos2dxHelper_nativeSetApkPath @ 0x7ed14c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:01:01 +0000
//
int __fastcall cocos2d::JniHelper::setClassLoaderFrom(int a1, int a2)
{
int v4; // r0
int v5; // r2
int v6; // r3
int v7; // r5
int v8; // r6
int v9; // r8
int v10; // r0
v4 = (*(int (__fastcall **)(int, int))(*(_DWORD *)a2 + 124))(a2, a1);
v5 = (*(int (__fastcall **)(int, int, const char *, const char *))(*(_DWORD *)a2 + 132))(
a2,
v4,
"getClassLoader",
"()Ljava/lang/ClassLoader;");
if ( !v5 || (v7 = _JNIEnv::CallObjectMethod(a2, a1, v5, v6)) == 0 )
{
v7 = 0;
goto LABEL_9;
}
v8 = (*(int (__fastcall **)(int, int))(*(_DWORD *)a2 + 124))(a2, v7);
if ( !v8 )
{
LABEL_9:
v8 = 0;
LABEL_10:
_android_log_print(3, "JniHelper", "%s", "Failed to cache the app class loader");
if ( !v8 )
goto LABEL_12;
goto LABEL_11;
}
v9 = (*(int (__fastcall **)(int, int, const char *, const char *))(*(_DWORD *)a2 + 132))(
a2,
v8,
"loadClass",
"(Ljava/lang/String;)Ljava/lang/Class;");
if ( !v9 )
goto LABEL_10;
if ( dword_D2F8F4 )
(*(void (__fastcall **)(int))(*(_DWORD *)a2 + 88))(a2);
v10 = (*(int (__fastcall **)(int, int))(*(_DWORD *)a2 + 84))(a2, v7);
dword_D2F8F8 = v9;
dword_D2F8F4 = v10;
LABEL_11:
_JNIEnv::DeleteLocalRef(a2);
LABEL_12:
if ( v7 )
_JNIEnv::DeleteLocalRef(a2);
return _JNIEnv::DeleteLocalRef(a2);
}