//
// sub_D80B8C from 0xd80b8c to 0xd80c90 (260 bytes)
//
// 4 xrefs:
// > cocos2d::JniHelper::getClassID @ 0xd80edc
// > cocos2d::JniHelper::getStaticMethodInfo @ 0xd810e4
// > cocos2d::JniHelper::getMethodInfo @ 0xd8129c
// > cocos2d::JniHelper::jstring2string @ 0xd81388
//
// 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 sub_D80B8C(cocos2d::JniHelper *a1)
{
__int64 JavaVM; // x0
int v3; // w0
unsigned int v4; // w20
cocos2d::JniHelper *v6; // x0
__int64 v7; // x0
JavaVM = cocos2d::JniHelper::getJavaVM(a1);
v3 = (*(__int64 (__fastcall **)(__int64, cocos2d::JniHelper *, __int64))(*(_QWORD *)JavaVM + 48LL))(JavaVM, a1, 65540);
if ( v3 == -2 )
{
v6 = (cocos2d::JniHelper *)pthread_key_create((pthread_key_t *)&dword_1560930, (void (*)(void *))sub_D80C90);
v7 = cocos2d::JniHelper::getJavaVM(v6);
if ( ((*(__int64 (__fastcall **)(__int64, cocos2d::JniHelper *, _QWORD))(*(_QWORD *)v7 + 32LL))(v7, a1, 0)
& 0x80000000) != 0 )
{
v4 = 0;
__android_log_print(3, "JniHelper", "%s", "Failed to get the environment using AttachCurrentThread()");
}
else
{
v4 = 1;
if ( !pthread_getspecific(dword_1560930) )
pthread_setspecific(dword_1560930, a1);
}
return v4;
}
v4 = 1;
if ( !v3 )
return v4;
__android_log_print(3, "JniHelper", "%s", "Failed to get the environment using GetEnv()");
return 0;
}