//
// GameLevelManager::onGetGJUserInfoCompleted from 0x14015a030 to 0x14015a1b5 (389 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x14014361b
// > ??> @ 0x1406ca9e0
//
// 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
//
// Hidden C++ exception states: #wind=2
void __fastcall GameLevelManager::onGetGJUserInfoCompleted(GameLevelManager *a1, const void **a2, const char *a3)
{
const char *v6; // rbp
GameLevelManager *v7; // rcx
__int64 SplitIntFromKey; // rbp
const void *v9; // rcx
unsigned __int64 v10; // r14
size_t v11; // r8
__int64 v12; // rax
cocos2d::CCDictionary *v13; // r15
GJUserScore *v14; // rax
struct cocos2d::CCObject *v15; // r14
UserInfoDelegate *m_userInfoDelegate; // rcx
__int64 m_accountID; // rax
GJFriendRequest *v18; // rax
UserInfoDelegate *v19; // rcx
__int128 Buf2; // [rsp+38h] [rbp-50h] BYREF
__int64 v21; // [rsp+48h] [rbp-40h]
__int64 v22; // [rsp+50h] [rbp-38h]
v6 = a3;
if ( *((_QWORD *)a3 + 3) > 0xFu )
v6 = *(const char **)a3;
GameLevelManager::removeDLFromActive(a1, v6);
SplitIntFromKey = GameLevelManager::getSplitIntFromKey(v7, v6, 1);
Buf2 = 0;
v21 = 2;
v22 = 15;
strcpy((char *)&Buf2, "-1");
v9 = a2;
if ( (unsigned __int64)a2[3] > 0xF )
v9 = *a2;
v10 = (unsigned __int64)a2[2];
v11 = v10;
if ( v10 > 2 )
v11 = 2;
if ( !memcmp(v9, &Buf2, v11) && v10 == 2
|| (v12 = sub_14003BDB0((__int64)&Buf2, (__int64)a2),
v13 = (cocos2d::CCDictionary *)GameLevelManager::responseToDict(v12, 0),
v14 = GJUserScore::create(v13),
(v15 = v14) == nullptr) )
{
m_userInfoDelegate = a1->m_userInfoDelegate;
if ( m_userInfoDelegate )
m_userInfoDelegate->getUserInfoFailed(m_userInfoDelegate, SplitIntFromKey);
}
else
{
m_accountID = v14->m_accountID;
if ( (int)m_accountID > 0 )
cocos2d::CCDictionary::setObject(a1->m_storedUserInfo, v15, m_accountID);
if ( v15[13].m_nTag == 3 )
{
v18 = GJFriendRequest::create(v13);
v18->m_accountID = SplitIntFromKey;
if ( (int)SplitIntFromKey > 0 )
cocos2d::CCDictionary::setObject(a1->m_friendRequests, v18, SplitIntFromKey);
}
v19 = a1->m_userInfoDelegate;
if ( v19 )
v19->getUserInfoFinished(v19, (GJUserScore *)v15);
}
sub_14003A830((__int64)a2);
sub_14003A830((__int64)a3);
}