//
// getCurrentLanguageJNI from 0xb0e8ac to 0xb0ea00 (340 bytes)
//
// 2 xrefs:
// > cocos2d::CCApplication::getCurrentLanguage @ 0xb0ab60
// > ??> @ 0x9d380
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 *__usercall getCurrentLanguageJNI@(__int64 *__return_ptr a1@)
{
__int64 v3; // x22
void *v4; // x0
unsigned int *v5; // x2
int v6; // w1
__int64 v7; // [xsp+48h] [xbp+48h] BYREF
__int64 v8; // [xsp+50h] [xbp+50h] BYREF
__int64 v9; // [xsp+58h] [xbp+58h]
__int64 v10; // [xsp+60h] [xbp+60h]
sub_D153B8((int)a1, &byte_F288A0);
if ( (unsigned __int8)cocos2d::JniHelper::getStaticMethodInfo(
&v8,
"org/cocos2dx/lib/Cocos2dxHelper",
"getCurrentLanguage",
"()Ljava/lang/String;") )
{
v3 = _JNIEnv::CallStaticObjectMethod(v8, v9, v10);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 184LL))(v8, v9);
cocos2d::JniHelper::jstring2string(&v7, v3);
sub_D163D4(a1, &v7);
v4 = (void *)(v7 - 24);
if ( (__int64 *)(v7 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v5 = (unsigned int *)(v7 - 8);
do
v6 = __ldaxr(v5);
while ( __stlxr(v6 - 1, v5) );
}
else
{
v6 = *(_DWORD *)(v7 - 8);
*(_DWORD *)(v7 - 8) = v6 - 1;
}
if ( v6 <= 0 )
operator delete(v4);
}
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 184LL))(v8, v3);
}
return a1;
}