//
// GameLevelManager::onGetUserListCompleted from 0x84ef78 to 0x84f56c (1524 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x85c9fc
// > ??> @ 0xef200
//
// 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:25 +0000
//
__int64 __fastcall GameLevelManager::onGetUserListCompleted(GameLevelManager *a1, __int64 a2, char *a3)
{
char *v4; // x28
size_t v5; // x0
_BOOL4 v6; // w21
size_t v7; // x0
_BOOL4 v8; // w21
unsigned int v9; // w24
_BOOL4 v10; // w21
const char *v11; // x0
cocos2d::CCArray *v12; // x0
char *v13; // x21
size_t v14; // x0
cocos2d::CCArray *v15; // x25
unsigned int i; // w22
cocos2d::CCString *v17; // x0
const char *CString; // x0
size_t v19; // x0
GJUserScore *v20; // x0
cocos2d::CCDictionary *v21; // x1
__int64 v22; // x21
int v23; // w27
int v24; // w26
__int64 v25; // x1
__int64 v26; // x0
__int64 v28; // x0
size_t v29; // x0
_BOOL4 v30; // w21
__int64 v31; // x19
size_t v32; // x0
void (__fastcall ***v33)(_QWORD, cocos2d::CCArray *, _QWORD); // x0
cocos2d::CCArray *v34; // [xsp+68h] [xbp+68h]
char *v36; // [xsp+78h] [xbp+78h]
__int64 v37; // [xsp+80h] [xbp+80h] BYREF
size_t v38; // [xsp+88h] [xbp+88h]
void *v39; // [xsp+90h] [xbp+90h]
__int64 v40; // [xsp+98h] [xbp+98h] BYREF
size_t v41; // [xsp+A0h] [xbp+A0h]
void *v42; // [xsp+A8h] [xbp+A8h]
__int64 v43; // [xsp+B0h] [xbp+B0h] BYREF
__int64 v44; // [xsp+B8h] [xbp+B8h]
void *v45; // [xsp+C0h] [xbp+C0h]
v4 = a3 + 1;
if ( (*a3 & 1) != 0 )
v4 = *((char **)a3 + 2);
v40 = 0;
v41 = 0;
v42 = nullptr;
v5 = strlen(v4);
std::string::__init(&v40, v4, v5);
v43 = 0;
v44 = 0;
v45 = nullptr;
std::string::__init(&v43, "get_friends", 0xBu);
v6 = sub_7FEA60((__int64)&v40, (__int64)&v43);
if ( (v43 & 1) != 0 )
operator delete(v45);
if ( (v40 & 1) != 0 )
operator delete(v42);
if ( v6 )
{
v9 = 0;
goto LABEL_11;
}
v40 = 0;
v41 = 0;
v42 = nullptr;
v7 = strlen(v4);
std::string::__init(&v40, v4, v7);
v43 = 0;
v44 = 0;
v45 = nullptr;
std::string::__init(&v43, "get_following", 0xDu);
v8 = sub_7FEA60((__int64)&v40, (__int64)&v43);
if ( (v43 & 1) == 0 )
{
if ( (v40 & 1) == 0 )
goto LABEL_10;
LABEL_52:
v9 = 3;
operator delete(v42);
if ( v8 )
goto LABEL_11;
goto LABEL_53;
}
operator delete(v45);
if ( (v40 & 1) != 0 )
goto LABEL_52;
LABEL_10:
v9 = 3;
if ( v8 )
goto LABEL_11;
LABEL_53:
v40 = 0;
v41 = 0;
v42 = nullptr;
v29 = strlen(v4);
std::string::__init(&v40, v4, v29);
v43 = 0;
v44 = 0;
v45 = nullptr;
std::string::__init(&v43, "get_muted", 9u);
v30 = sub_7FEA60((__int64)&v40, (__int64)&v43);
if ( (v43 & 1) != 0 )
operator delete(v45);
if ( (v40 & 1) != 0 )
operator delete(v42);
if ( v30 )
v9 = 4;
else
v9 = 1;
LABEL_11:
GameLevelManager::removeDLFromActive(a1, v4);
v43 = 0;
v44 = 0;
v45 = nullptr;
std::string::__init(&v43, &word_117CE08, 2u);
v10 = sub_7FEA60(a2, (__int64)&v43);
if ( (v43 & 1) != 0 )
operator delete(v45);
if ( v10 )
{
LABEL_39:
v26 = *((_QWORD *)a1 + 171);
if ( v26 )
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v26 + 8LL))(v26, v9, 0xFFFFFFFFLL);
return _stack_chk_guard;
}
v11 = (const char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v11 = *(const char **)(a2 + 16);
v12 = (cocos2d::CCArray *)atoi(v11);
if ( ((unsigned int)v12 & 0x80000000) != 0 )
{
v28 = *((_QWORD *)a1 + 171);
if ( v28 )
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v28 + 8LL))(v28, v9, 4294967294LL);
}
else
{
v34 = (cocos2d::CCArray *)cocos2d::CCArray::create(v12);
v13 = (char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v13 = *(char **)(a2 + 16);
v43 = 0;
v44 = 0;
v45 = nullptr;
v14 = strlen(v13);
std::string::__init(&v43, v13, v14);
v15 = sub_80CFCC((unsigned __int8 *)&v43, "|");
if ( (v43 & 1) != 0 )
operator delete(v45);
for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(v15); ++i )
{
v17 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v15, i);
CString = (const char *)cocos2d::CCString::getCString(v17);
v37 = 0;
v38 = 0;
v39 = nullptr;
v36 = (char *)CString;
v19 = strlen(CString);
std::string::__init(&v37, v36, v19);
v40 = 0;
v41 = 0;
v42 = nullptr;
if ( (v37 & 1) != 0 )
{
std::string::__init(&v40, v39, v38);
}
else
{
v42 = v39;
v40 = v37;
v41 = v38;
}
v20 = (GJUserScore *)GameLevelManager::responseToDict((__int64)&v40, 0);
v22 = GJUserScore::create(v20, v21);
if ( (v40 & 1) != 0 )
{
operator delete(v42);
if ( v9 == 1 )
{
LABEL_46:
*(_DWORD *)(v22 + 688) = 2;
goto LABEL_29;
}
}
else if ( v9 == 1 )
{
goto LABEL_46;
}
if ( v9 == 3 )
{
*(_BYTE *)(v22 + 720) = 1;
}
else if ( v9 == 4 )
{
*(_BYTE *)(v22 + 723) = 1;
}
else
{
*(_DWORD *)(v22 + 688) = 1;
}
LABEL_29:
if ( *(int *)(v22 + 376) > 0 && *(int *)(v22 + 372) > 0 )
{
cocos2d::CCArray::addObject(v34, (cocos2d::CCObject *)v22);
v23 = *(_DWORD *)(v22 + 372);
v24 = *(_DWORD *)(v22 + 376);
v43 = 0;
v44 = 0;
v45 = nullptr;
if ( (*(_BYTE *)(v22 + 320) & 1) != 0 )
{
std::string::__init(&v43, *(void **)(v22 + 336), *(_QWORD *)(v22 + 328));
}
else
{
v25 = *(_QWORD *)(v22 + 328);
v43 = *(_QWORD *)(v22 + 320);
v44 = v25;
v45 = *(void **)(v22 + 336);
}
GameLevelManager::storeUserName(a1, v23, v24, (char *)&v43);
if ( (v43 & 1) != 0 )
operator delete(v45);
}
if ( (v37 & 1) != 0 )
operator delete(v39);
}
if ( !(unsigned int)cocos2d::CCArray::count(v34) )
goto LABEL_39;
v43 = 0;
v44 = 0;
v31 = *((_QWORD *)a1 + 130);
v45 = nullptr;
v32 = strlen(v4);
std::string::__init(&v43, v4, v32);
cocos2d::CCDictionary::setObject(v31, v34);
if ( (v43 & 1) != 0 )
operator delete(v45);
v33 = *((void (__fastcall ****)(_QWORD, cocos2d::CCArray *, _QWORD))a1 + 171);
if ( v33 )
(**v33)(v33, v34, v9);
}
return _stack_chk_guard;
}