//
// GameLevelManager::onGetGJUserInfoCompleted from 0x84a21c to 0x84a454 (568 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x85bf50
// > ??> @ 0x102b08
//
// 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 12:55:23 +0000
//
__int64 __fastcall GameLevelManager::onGetGJUserInfoCompleted(GameLevelManager *this, __int64 a2, char *a3)
{
const char *v5; // x19
unsigned int SplitIntFromKey; // w24
_BOOL4 v7; // w19
char v8; // w0
__int64 v9; // x0
__int64 v10; // x1
cocos2d::CCDictionary *v11; // x1
GJUserScore *v12; // x23
GJUserScore *v13; // x19
_BOOL4 v14; // w25
cocos2d::CCDictionary *v15; // x1
int v16; // w0
void (__fastcall ***v17)(_QWORD, GJUserScore *); // x0
__int64 v19; // x0
GJFriendRequest *v20; // x0
__int64 v21; // x0
__int64 v22; // [xsp+50h] [xbp+50h] BYREF
__int64 v23; // [xsp+58h] [xbp+58h]
void *v24; // [xsp+60h] [xbp+60h]
v5 = a3 + 1;
if ( (*a3 & 1) != 0 )
v5 = *((const char **)a3 + 2);
GameLevelManager::removeDLFromActive(this, v5);
SplitIntFromKey = GameLevelManager::getSplitIntFromKey(this, v5, 1u);
v22 = 0;
v23 = 0;
v24 = nullptr;
std::string::__init(&v22, &word_117CE08, 2u);
v7 = sub_7FEA60(a2, (__int64)&v22);
if ( (v22 & 1) != 0 )
operator delete(v24);
if ( v7 )
goto LABEL_17;
v8 = *(_BYTE *)a2;
v22 = 0;
v23 = 0;
v24 = nullptr;
if ( (v8 & 1) != 0 )
{
std::string::__init(&v22, *(void **)(a2 + 16), *(_QWORD *)(a2 + 8));
}
else
{
v9 = *(_QWORD *)a2;
v10 = *(_QWORD *)(a2 + 8);
v24 = *(void **)(a2 + 16);
v22 = v9;
v23 = v10;
}
v12 = (GJUserScore *)GameLevelManager::responseToDict((__int64)&v22, 0);
if ( (v22 & 1) != 0 )
operator delete(v24);
v13 = (GJUserScore *)GJUserScore::create(v12, v11);
if ( !v13 )
{
LABEL_17:
v19 = *((_QWORD *)this + 169);
if ( v19 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v19 + 8LL))(v19, SplitIntFromKey);
}
else
{
v14 = 0;
GameLevelManager::storeUserInfo((cocos2d::CCDictionary **)this, v13);
v16 = *((_DWORD *)v13 + 172);
if ( v16 == 4 )
{
v22 = 0;
v23 = 0;
v24 = nullptr;
std::string::__init(&v22, "32", 2u);
v21 = cocos2d::CCDictionary::objectForKey(v12, &v22);
v15 = (cocos2d::CCDictionary *)(unsigned __int8)v22;
v14 = v21 != 0;
if ( (v22 & 1) != 0 )
operator delete(v24);
v16 = *((_DWORD *)v13 + 172);
}
if ( v16 == 3 || v14 )
{
v20 = (GJFriendRequest *)GJFriendRequest::create(v12, v15);
*((_DWORD *)v20 + 80) = SplitIntFromKey;
GameLevelManager::storeFriendRequest((__int64)this, v20);
}
v17 = *((void (__fastcall ****)(_QWORD, GJUserScore *))this + 169);
if ( v17 )
(**v17)(v17, v13);
}
return _stack_chk_guard;
}