//
// GameLevelManager::getLevelComments from 0x8233b4 to 0x823844 (1168 bytes)
//
// 3 xrefs:
// > InfoLayer::updateUserScoreFinished @ 0x907c24
// > InfoLayer::loadPage @ 0x90ac34
// > ??> @ 0xca198
//
// 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:02 +0000
//
__int64 __fastcall GameLevelManager::getLevelComments(
GameLevelManager *a1,
const char *a2,
unsigned int a3,
unsigned int a4,
unsigned int a5,
int a6)
{
unsigned int v10; // w25
char *v12; // x1
char *v13; // x1
cocos2d::CCString *v14; // x0
__int64 CString; // x0
cocos2d::CCString *v16; // x0
size_t v17; // x0
cocos2d::CCString *v18; // x0
size_t v19; // x0
GameManager *v20; // x0
GameManager *v21; // x0
char *v22; // x24
GameManager *v23; // x0
cocos2d::CCString *v24; // x0
size_t v25; // x0
const char *v26; // x1
size_t v27; // x0
const char *v28; // x1
size_t v29; // x0
cocos2d::CCString *v31; // x0
size_t v32; // x0
char *v33; // [xsp+68h] [xbp+68h]
char *v34; // [xsp+68h] [xbp+68h]
char *v35; // [xsp+68h] [xbp+68h]
char *v36; // [xsp+68h] [xbp+68h]
char *v37; // [xsp+68h] [xbp+68h]
char *v38; // [xsp+68h] [xbp+68h]
__int64 v39; // [xsp+78h] [xbp+78h] BYREF
size_t v40; // [xsp+80h] [xbp+80h]
char *v41; // [xsp+88h] [xbp+88h]
__int64 v42[2]; // [xsp+90h] [xbp+90h] BYREF
void *v43; // [xsp+A0h] [xbp+A0h]
__int64 v44; // [xsp+A8h] [xbp+A8h] BYREF
size_t v45; // [xsp+B0h] [xbp+B0h]
void *v46; // [xsp+B8h] [xbp+B8h]
__int64 v47; // [xsp+C0h] [xbp+C0h] BYREF
size_t v48; // [xsp+C8h] [xbp+C8h]
void *v49; // [xsp+D0h] [xbp+D0h]
__int64 v50[2]; // [xsp+D8h] [xbp+D8h] BYREF
void *v51; // [xsp+E8h] [xbp+E8h]
__int64 v52; // [xsp+F0h] [xbp+F0h] BYREF
size_t v53; // [xsp+F8h] [xbp+F8h]
void *v54; // [xsp+100h] [xbp+100h]
v10 = (unsigned int)a2;
GameLevelManager::getCommentKey(a2, &v39);
v12 = (char *)&v39 + 1;
if ( (v39 & 1) != 0 )
v12 = v41;
if ( !GameLevelManager::isDLActive(a1, v12) )
{
v13 = (char *)&v39 + 1;
if ( (v39 & 1) != 0 )
v13 = v41;
GameLevelManager::addDLToActive(a1, v13);
GameLevelManager::getBasePostString(v42);
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)off_50 + 7,
"mfd",
"2893",
103,
98,
"7");
CString = cocos2d::CCString::getCString(v14);
v16 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&page=%i&total=%i&secret=%s&mode=%i",
(const char *)a3,
a4,
CString,
a5);
v33 = (char *)cocos2d::CCString::getCString(v16);
v17 = strlen(v33);
std::string::append((__int64)v42, v33, v17);
if ( a6 == 1 )
std::string::append((__int64)v42, "&userID=", 8u);
else
std::string::append((__int64)v42, "&levelID=", 9u);
v18 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)v10);
v34 = (char *)cocos2d::CCString::getCString(v18);
v19 = strlen(v34);
v20 = (GameManager *)std::string::append((__int64)v42, v34, v19);
switch ( a6 )
{
case 3:
v31 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"&cType=%i", &byte_6);
break;
case 4:
v31 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"&cType=%i", &byte_7);
break;
case 5:
v31 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"&cType=%i", byte_8);
break;
default:
goto LABEL_11;
}
v38 = (char *)cocos2d::CCString::getCString(v31);
v32 = strlen(v38);
v20 = (GameManager *)std::string::append((__int64)v42, v38, v32);
LABEL_11:
v21 = (GameManager *)GameManager::sharedState(v20);
if ( (unsigned __int8)GameManager::getGameVariable(v21, "0088") )
LODWORD(v22) = 20;
else
v22 = &byte_9[1];
v23 = (GameManager *)GameManager::sharedState((GameManager *)&byte_9[1]);
if ( (unsigned __int8)GameManager::getGameVariable(v23, "0094") )
{
LODWORD(v22) = 2 * (_DWORD)v22;
}
else if ( (_DWORD)v22 == 10 )
{
if ( a6 != 1 )
goto LABEL_17;
goto LABEL_39;
}
v24 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&count=%i",
(const char *)(unsigned int)v22);
v35 = (char *)cocos2d::CCString::getCString(v24);
v25 = strlen(v35);
std::string::append((__int64)v42, v35, v25);
if ( a6 != 1 )
{
LABEL_17:
v26 = "https://www.boomlings.com/database/getGJComments21.php";
LABEL_18:
v36 = (char *)v26;
v44 = 0;
v45 = 0;
v46 = nullptr;
v27 = strlen(v26);
std::string::__init(&v44, v36, v27);
v47 = 0;
v48 = 0;
v49 = nullptr;
if ( (v44 & 1) != 0 )
{
std::string::__init(&v47, v46, v45);
}
else
{
v49 = v46;
v47 = v44;
v48 = v45;
}
v28 = (char *)v42 + 1;
if ( (v42[0] & 1) != 0 )
v28 = (const char *)v43;
v37 = (char *)v28;
v50[0] = 0;
v50[1] = 0;
v51 = nullptr;
v29 = strlen(v28);
std::string::__init(v50, v37, v29);
v52 = 0;
v53 = 0;
v54 = nullptr;
if ( (v39 & 1) != 0 )
{
std::string::__init(&v52, v41, v40);
}
else
{
v54 = v41;
v52 = v39;
v53 = v40;
}
GameLevelManager::ProcessHttpRequest(a1, &v47, (__int64)v50, (char *)&v52, 12);
if ( (v52 & 1) != 0 )
operator delete(v54);
if ( (v50[0] & 1) != 0 )
operator delete(v51);
if ( (v47 & 1) != 0 )
operator delete(v49);
if ( (v44 & 1) != 0 )
operator delete(v46);
if ( (v42[0] & 1) != 0 )
operator delete(v43);
goto LABEL_34;
}
LABEL_39:
v26 = "https://www.boomlings.com/database/getGJCommentHistory.php";
goto LABEL_18;
}
LABEL_34:
if ( (v39 & 1) != 0 )
operator delete(v41);
return _stack_chk_guard;
}