//
// GameLevelManager::onGetUserMessagesCompleted from 0x84a454 to 0x84aa20 (1484 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x85c9b8
// > ??> @ 0xc11b0
//
// 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::onGetUserMessagesCompleted(__int64 **this, __int64 a2, char *a3)
{
char *v5; // x28
_BOOL4 v6; // w21
char *v7; // x20
size_t v8; // x0
cocos2d::CCArray *v9; // x21
cocos2d::CCString *v10; // x0
const char *CString; // x0
size_t v12; // x0
cocos2d::CCString *v13; // x0
size_t v14; // x0
unsigned __int64 v15; // x0
__int64 *v16; // x21
__int64 v17; // x1
void (__fastcall *v18)(__int64 *, cocos2d::CCArray **, char *); // x23
cocos2d::CCArray *v19; // x27
const char *v20; // x1
size_t v21; // x0
cocos2d::CCArray *v22; // x24
unsigned int i; // w23
cocos2d::CCString *v24; // x0
const char *v25; // x0
size_t v26; // x0
cocos2d::CCDictionary *v27; // x1
GJUserMessage *v28; // x21
__int64 v29; // x21
char v30; // w0
__int64 v31; // x2
int v32; // w26
int v33; // w21
__int64 v34; // x0
__int64 v35; // x1
__int64 v36; // x0
__int64 v38; // x0
void (__fastcall ***v39)(_QWORD, cocos2d::CCArray *, char *); // x0
char *v40; // [xsp+68h] [xbp+68h]
char *v41; // [xsp+68h] [xbp+68h]
char *v42; // [xsp+68h] [xbp+68h]
char *v43; // [xsp+68h] [xbp+68h]
__int64 v44[2]; // [xsp+70h] [xbp+70h] BYREF
void *v45; // [xsp+80h] [xbp+80h]
cocos2d::CCArray *v46; // [xsp+88h] [xbp+88h] BYREF
size_t v47; // [xsp+90h] [xbp+90h]
void *v48; // [xsp+98h] [xbp+98h]
cocos2d::CCArray *v49; // [xsp+A0h] [xbp+A0h] BYREF
size_t v50; // [xsp+A8h] [xbp+A8h]
void *v51; // [xsp+B0h] [xbp+B0h]
__int64 v52[2]; // [xsp+B8h] [xbp+B8h] BYREF
void *v53; // [xsp+C8h] [xbp+C8h]
__int64 v54; // [xsp+D0h] [xbp+D0h] BYREF
size_t v55; // [xsp+D8h] [xbp+D8h]
void *v56; // [xsp+E0h] [xbp+E0h]
__int64 v57; // [xsp+E8h] [xbp+E8h] BYREF
__int64 v58; // [xsp+F0h] [xbp+F0h]
void *v59; // [xsp+F8h] [xbp+F8h]
__int64 v60; // [xsp+100h] [xbp+100h] BYREF
size_t v61; // [xsp+108h] [xbp+108h]
void *v62; // [xsp+110h] [xbp+110h]
v5 = a3 + 1;
if ( (*a3 & 1) != 0 )
v5 = *((char **)a3 + 2);
GameLevelManager::removeDLFromActive((GameLevelManager *)this, v5);
v60 = 0;
v61 = 0;
v62 = nullptr;
std::string::__init(&v60, &word_117CE08, 2u);
v6 = sub_7FEA60(a2, (__int64)&v60);
if ( (v60 & 1) != 0 )
operator delete(v62);
if ( v6 )
{
LABEL_33:
v36 = (__int64)*(this + 173);
if ( v36 )
(*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)v36 + 8LL))(v36, v5, 0xFFFFFFFFLL);
return _stack_chk_guard;
}
if ( (*(_BYTE *)a2 & 1) != 0 )
{
v7 = *(char **)(a2 + 16);
if ( (atoi(v7) & 0x80000000) == 0 )
goto LABEL_8;
}
else
{
v7 = (char *)(a2 + 1);
if ( (atoi(v7) & 0x80000000) == 0 )
{
LABEL_8:
v60 = 0;
v61 = 0;
v62 = nullptr;
v8 = strlen(v7);
std::string::__init(&v60, v7, v8);
v9 = sub_80CFCC((unsigned __int8 *)&v60, "#");
if ( (v60 & 1) != 0 )
operator delete(v62);
if ( (unsigned int)cocos2d::CCArray::count(v9) > 1 )
{
v10 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v9, 0);
CString = (const char *)cocos2d::CCString::getCString(v10);
v44[0] = 0;
v40 = (char *)CString;
v44[1] = 0;
v45 = nullptr;
v12 = strlen(CString);
std::string::__init(v44, v40, v12);
v13 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v9, 1u);
v41 = (char *)cocos2d::CCString::getCString(v13);
v46 = nullptr;
v47 = 0;
v48 = nullptr;
v14 = strlen(v41);
v15 = std::string::__init((__int64 *)&v46, v41, v14);
v16 = *(this + 173);
if ( v16 )
{
v17 = *v16;
v49 = nullptr;
v50 = 0;
v51 = nullptr;
v18 = *(void (__fastcall **)(__int64 *, cocos2d::CCArray **, char *))(v17 + 24);
if ( ((unsigned __int8)v46 & 1) != 0 )
{
std::string::__init((__int64 *)&v49, v48, v47);
}
else
{
v51 = v48;
v49 = v46;
v50 = v47;
}
v18(v16, &v49, v5);
v15 = (unsigned __int8)v49;
if ( ((unsigned __int8)v49 & 1) != 0 )
operator delete(v51);
}
v19 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)v15);
v20 = (char *)v44 + 1;
if ( (v44[0] & 1) != 0 )
v20 = (const char *)v45;
v42 = (char *)v20;
v52[0] = 0;
v52[1] = 0;
v53 = nullptr;
v21 = strlen(v20);
std::string::__init(v52, v42, v21);
v22 = sub_80CFCC((unsigned __int8 *)v52, "|");
if ( (v52[0] & 1) != 0 )
operator delete(v53);
for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(v22); ++i )
{
v24 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v22, i);
v25 = (const char *)cocos2d::CCString::getCString(v24);
v60 = 0;
v61 = 0;
v62 = nullptr;
v43 = (char *)v25;
v26 = strlen(v25);
std::string::__init(&v60, v43, v26);
v54 = 0;
v55 = 0;
v56 = nullptr;
if ( (v60 & 1) != 0 )
{
std::string::__init(&v54, v62, v61);
}
else
{
v56 = v62;
v54 = v60;
v55 = v61;
}
v28 = (GJUserMessage *)GameLevelManager::responseToDict((__int64)&v54, 0);
if ( (v54 & 1) != 0 )
operator delete(v56);
v29 = GJUserMessage::create(v28, v27);
if ( v29 )
{
cocos2d::CCArray::addObject(v19, (cocos2d::CCObject *)v29);
GameLevelManager::storeUserMessage((__int64)this, (GJUserMessage *)v29);
v30 = *(_BYTE *)(v29 + 376);
v31 = v29 + 376;
v57 = 0;
v58 = 0;
v59 = nullptr;
v32 = *(_DWORD *)(v29 + 324);
v33 = *(_DWORD *)(v29 + 320);
if ( (v30 & 1) != 0 )
{
std::string::__init(&v57, *(void **)(v31 + 16), *(_QWORD *)(v31 + 8));
}
else
{
v34 = *(_QWORD *)v31;
v35 = *(_QWORD *)(v31 + 8);
v59 = *(void **)(v31 + 16);
v57 = v34;
v58 = v35;
}
GameLevelManager::storeUserName(this, v32, v33, (char *)&v57);
if ( (v57 & 1) != 0 )
operator delete(v59);
}
if ( (v60 & 1) != 0 )
operator delete(v62);
}
v60 = 0;
v61 = 0;
v62 = nullptr;
if ( ((unsigned __int8)v46 & 1) != 0 )
{
std::string::__init(&v60, v48, v47);
}
else
{
v62 = v48;
v60 = (__int64)v46;
v61 = v47;
}
GameLevelManager::storeCommentsResult((GameLevelManager *)this, v19, (__int64)&v60, v5);
if ( (v60 & 1) != 0 )
operator delete(v62);
v39 = (void (__fastcall ***)(_QWORD, cocos2d::CCArray *, char *))*(this + 173);
if ( v39 )
(**v39)(v39, v19, v5);
if ( ((unsigned __int8)v46 & 1) != 0 )
operator delete(v48);
if ( (v44[0] & 1) != 0 )
operator delete(v45);
return _stack_chk_guard;
}
goto LABEL_33;
}
}
v38 = (__int64)*(this + 173);
if ( v38 )
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v38 + 8LL))(v38, v5);
return _stack_chk_guard;
}