//
// GJAccountManager::onLoginAccountCompleted from 0x5819b4 to 0x581b0a (342 bytes)
//
// 1 xrefs:
// > GJAccountManager::handleIt @ 0x583734
//
// 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 11:52:54 +0000
//
int __fastcall GJAccountManager::onLoginAccountCompleted(GJAccountManager *a1, unsigned __int8 *a2)
{
cocos2d::CCString *v4; // r0
const char *CString; // r6
size_t v6; // r0
_BOOL4 v7; // r6
int result; // r0
int (*v9)(void); // r3
cocos2d::CCString *v10; // r0
const char *v11; // r0
const char *v12; // r9
size_t v13; // r0
_BOOL4 v14; // r6
_BOOL4 v15; // r6
cocos2d::CCArray *v16; // r5
cocos2d::CCString *v17; // r0
int v18; // r4
cocos2d::CCString *v19; // r0
int v20; // r2
int v21; // r3
int v22; // [sp+0h] [bp-14h] BYREF
int v23; // [sp+4h] [bp-10h]
int v24; // [sp+8h] [bp-Ch]
GJAccountManager::removeDLFromActive(a1, "login_account");
v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)0xFFFFFFF4);
v22 = 0;
v23 = 0;
v24 = 0;
CString = (const char *)cocos2d::CCString::getCString(v4);
v6 = strlen(CString);
std::string::__init(&v22, CString, v6);
v7 = sub_58125C(a2, (unsigned __int8 *)&v22);
std::string::~string((int)&v22);
if ( v7 )
{
result = *((_DWORD *)a1 + 77);
if ( !result )
return result;
v9 = *(int (**)(void))(*(_DWORD *)result + 4);
return v9();
}
v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)0xFFFFFFF3);
v11 = (const char *)cocos2d::CCString::getCString(v10);
v22 = 0;
v23 = 0;
v24 = 0;
v12 = v11;
v13 = strlen(v11);
std::string::__init(&v22, v12, v13);
v14 = sub_58125C(a2, (unsigned __int8 *)&v22);
std::string::~string((int)&v22);
if ( v14 )
{
result = *((_DWORD *)a1 + 77);
if ( !result )
return result;
v9 = *(int (**)(void))(*(_DWORD *)result + 4);
return v9();
}
v22 = 0;
v23 = 0;
v24 = 0;
std::string::__init(&v22, "-1", 2u);
v15 = sub_58125C(a2, (unsigned __int8 *)&v22);
std::string::~string((int)&v22);
if ( v15 || (v16 = sub_58183C((cocos2d::CCArray *)a2, ","), cocos2d::CCArray::count(v16) <= 1u) )
{
result = *((_DWORD *)a1 + 77);
goto LABEL_12;
}
v17 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v16, 0);
v18 = cocos2d::CCString::intValue(v17);
v19 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v16, 1u);
v20 = cocos2d::CCString::intValue(v19);
result = *((_DWORD *)a1 + 77);
if ( v18 <= 0 )
{
LABEL_12:
if ( result )
{
v9 = *(int (**)(void))(*(_DWORD *)result + 4);
return v9();
}
return result;
}
v21 = *((_DWORD *)a1 + 70);
if ( !v21 || v21 == v18 )
{
if ( result )
return (**(int (__fastcall ***)(int, int, int))result)(result, v18, v20);
}
else if ( result )
{
v9 = *(int (**)(void))(*(_DWORD *)result + 4);
return v9();
}
return result;
}