//
// GameLevelManager::createAndGetCommentsFull from 0x84aa20 to 0x84af2c (1292 bytes)
//
// 3 xrefs:
// > GameLevelManager::createAndGetLevelComments @ 0x84af94
// > GameLevelManager::createAndGetAccountComments @ 0x84b4f0
// > ??> @ 0xc95f8
//
// 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
//
cocos2d::CCArray *__fastcall GameLevelManager::createAndGetCommentsFull(
_QWORD *a1,
char *a2,
int a3,
unsigned __int8 a4,
int a5)
{
int v6; // w27
char *v7; // x19
char v8; // t1
size_t v9; // x0
cocos2d::CCArray *v10; // x23
unsigned int v11; // w22
cocos2d::CCString *v12; // x0
const char *CString; // x0
size_t v14; // x0
GJComment *v15; // x0
cocos2d::CCDictionary *v16; // x1
__int64 v17; // x21
cocos2d::CCArray *v19; // x21
cocos2d::CCString *v20; // x0
size_t v21; // x0
cocos2d::CCString *v22; // x0
size_t v23; // x0
GJComment *v24; // x0
cocos2d::CCDictionary *v25; // x1
GJUserScore *v26; // x0
cocos2d::CCDictionary *v27; // x1
__int64 v28; // x28
cocos2d::CCObject *v29; // x0
char v30; // w0
int v31; // w1
__int64 v32; // x2
int v33; // w28
__int64 v34; // x0
__int64 v35; // x1
int v37; // [xsp+6Ch] [xbp+6Ch]
cocos2d::CCArray *v40; // [xsp+80h] [xbp+80h]
char *v42; // [xsp+88h] [xbp+88h]
char *v43; // [xsp+88h] [xbp+88h]
char *v44; // [xsp+88h] [xbp+88h]
__int64 v45; // [xsp+98h] [xbp+98h] BYREF
size_t v46; // [xsp+A0h] [xbp+A0h]
void *v47; // [xsp+A8h] [xbp+A8h]
__int64 v48; // [xsp+B0h] [xbp+B0h] BYREF
size_t v49; // [xsp+B8h] [xbp+B8h]
void *v50; // [xsp+C0h] [xbp+C0h]
__int64 v51; // [xsp+C8h] [xbp+C8h] BYREF
size_t v52; // [xsp+D0h] [xbp+D0h]
void *v53; // [xsp+D8h] [xbp+D8h]
__int64 v54; // [xsp+E0h] [xbp+E0h] BYREF
size_t v55; // [xsp+E8h] [xbp+E8h]
void *v56; // [xsp+F0h] [xbp+F0h]
__int64 v57; // [xsp+F8h] [xbp+F8h] BYREF
__int64 v58; // [xsp+100h] [xbp+100h]
void *v59; // [xsp+108h] [xbp+108h]
__int64 v60; // [xsp+110h] [xbp+110h] BYREF
size_t v61; // [xsp+118h] [xbp+118h]
void *v62; // [xsp+120h] [xbp+120h]
v6 = a4;
v40 = (cocos2d::CCArray *)cocos2d::CCArray::create(_stack_chk_guard);
v8 = *a2;
v7 = a2 + 1;
if ( (v8 & 1) != 0 )
v7 = *((char **)a2 + 2);
v60 = 0;
v61 = 0;
v62 = nullptr;
v9 = strlen(v7);
std::string::__init(&v60, v7, v9);
v10 = sub_80CFCC((unsigned __int8 *)&v60, "|");
if ( (v60 & 1) != 0 )
operator delete(v62);
v11 = 0;
if ( (unsigned int)cocos2d::CCArray::count(v10) )
{
while ( 1 )
{
v12 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v10, v11);
CString = (const char *)cocos2d::CCString::getCString(v12);
v45 = 0;
v46 = 0;
v47 = nullptr;
v42 = (char *)CString;
v14 = strlen(CString);
std::string::__init(&v45, v42, v14);
if ( v6 )
break;
v19 = sub_80CFCC((unsigned __int8 *)&v45, ":");
if ( (unsigned int)cocos2d::CCArray::count(v19) > 1 )
{
v20 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v19, 0);
v43 = (char *)cocos2d::CCString::getCString(v20);
v48 = 0;
v49 = 0;
v50 = nullptr;
v21 = strlen(v43);
std::string::__init(&v48, v43, v21);
v22 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v19, 1u);
v44 = (char *)cocos2d::CCString::getCString(v22);
v60 = 0;
v61 = 0;
v62 = nullptr;
v23 = strlen(v44);
std::string::__init(&v60, v44, v23);
v51 = 0;
v52 = 0;
v53 = nullptr;
if ( (v48 & 1) != 0 )
{
std::string::__init(&v51, v50, v49);
}
else
{
v53 = v50;
v51 = v48;
v52 = v49;
}
v24 = (GJComment *)GameLevelManager::responseToDict((__int64)&v51, 1u);
v17 = GJComment::create(v24, v25);
if ( (v51 & 1) != 0 )
{
operator delete(v53);
v54 = 0;
v55 = 0;
v56 = nullptr;
if ( (v60 & 1) != 0 )
goto LABEL_46;
LABEL_25:
v56 = v62;
v54 = v60;
v55 = v61;
}
else
{
v54 = 0;
v55 = 0;
v56 = nullptr;
if ( (v60 & 1) == 0 )
goto LABEL_25;
LABEL_46:
std::string::__init(&v54, v62, v61);
}
v26 = (GJUserScore *)GameLevelManager::responseToDict((__int64)&v54, 1u);
v28 = GJUserScore::create(v26, v27);
if ( (v54 & 1) != 0 )
operator delete(v56);
if ( v28 )
{
if ( v28 != *(_QWORD *)(v17 + 448) )
{
cocos2d::CCObject::retain((cocos2d::CCObject *)v28);
v29 = *(cocos2d::CCObject **)(v17 + 448);
if ( v29 )
cocos2d::CCObject::release(v29);
*(_QWORD *)(v17 + 448) = v28;
}
v30 = *(_BYTE *)(v28 + 320);
v31 = *(_DWORD *)(v17 + 372);
v32 = v28 + 320;
v57 = 0;
v58 = 0;
v59 = nullptr;
v37 = v31;
v33 = *(_DWORD *)(v28 + 376);
if ( (v30 & 1) != 0 )
{
std::string::__init(&v57, *(void **)(v32 + 16), *(_QWORD *)(v32 + 8));
}
else
{
v34 = *(_QWORD *)v32;
v35 = *(_QWORD *)(v32 + 8);
v59 = *(void **)(v32 + 16);
v57 = v34;
v58 = v35;
}
GameLevelManager::storeUserName(a1, v37, v33, (char *)&v57);
if ( (v57 & 1) != 0 )
operator delete(v59);
}
if ( (v60 & 1) != 0 )
operator delete(v62);
if ( (v48 & 1) != 0 )
operator delete(v50);
if ( !v17 )
goto LABEL_16;
if ( !*(_DWORD *)(v17 + 380) )
*(_DWORD *)(v17 + 380) = a3;
LABEL_13:
if ( *(_DWORD *)(v17 + 436) != 3 )
*(_DWORD *)(v17 + 436) = a5;
cocos2d::CCArray::addObject(v40, (cocos2d::CCObject *)v17);
}
LABEL_16:
++v11;
if ( (v45 & 1) != 0 )
operator delete(v47);
if ( v11 >= (unsigned int)cocos2d::CCArray::count(v10) )
return v40;
}
v60 = 0;
v61 = 0;
v62 = nullptr;
if ( (v45 & 1) != 0 )
{
std::string::__init(&v60, v47, v46);
}
else
{
v62 = v47;
v60 = v45;
v61 = v46;
}
v15 = (GJComment *)GameLevelManager::responseToDict((__int64)&v60, 1u);
v17 = GJComment::create(v15, v16);
if ( (v60 & 1) != 0 )
operator delete(v62);
if ( !v17 )
goto LABEL_16;
*(_DWORD *)(v17 + 388) = a3;
goto LABEL_13;
}
return v40;
}