//
// cocos2d::JniHelper::setClassLoaderFrom from 0xd80cc0 to 0xd80e5c (412 bytes)
//
// 2 xrefs:
// > Java_org_cocos2dx_lib_Cocos2dxHelper_nativeSetApkPath @ 0xd7ffd8
// > ??> @ 0xd5c40
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:08:10 +0000
//
__int64 __fastcall cocos2d::JniHelper::setClassLoaderFrom(__int64 a1, __int64 a2)
{
__int64 v4; // x22
__int64 v5; // x2
__int64 v6; // x21
__int64 v7; // x23
__int64 v8; // x24
__int64 v9; // x0
v4 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a2 + 248LL))(a2, a1);
v5 = (*(__int64 (__fastcall **)(__int64, __int64, const char *, const char *))(*(_QWORD *)a2 + 264LL))(
a2,
v4,
"getClassLoader",
"()Ljava/lang/ClassLoader;");
if ( !v5 || (v6 = _JNIEnv::CallObjectMethod(a2, a1, v5)) == 0 )
{
v6 = 0;
LABEL_12:
__android_log_print(3, "JniHelper", "%s", "Failed to cache the app class loader");
if ( !v6 )
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a2 + 184LL))(a2, v4);
goto LABEL_9;
}
v7 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a2 + 248LL))(a2, v6);
if ( !v7 )
goto LABEL_12;
v8 = (*(__int64 (__fastcall **)(__int64, __int64, const char *, const char *))(*(_QWORD *)a2 + 264LL))(
a2,
v7,
"loadClass",
"(Ljava/lang/String;)Ljava/lang/Class;");
if ( v8 )
{
if ( qword_1560938 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)a2 + 176LL))(a2);
v9 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a2 + 168LL))(a2, v6);
qword_1560940 = v8;
qword_1560938 = v9;
}
else
{
__android_log_print(3, "JniHelper", "%s", "Failed to cache the app class loader");
}
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a2 + 184LL))(a2, v7);
LABEL_9:
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a2 + 184LL))(a2, v6);
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a2 + 184LL))(a2, v4);
}