//
// GameLevelManager::deleteComments from 0x830798 to 0x830c20 (1160 bytes)
//
// 2 xrefs:
// > InfoLayer::confirmBulkDelete @ 0x90a2dc
// > ??> @ 0xdd6e0
//
// 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:08 +0000
//
__int64 __fastcall GameLevelManager::deleteComments(
cocos2d::CCObject *a1,
unsigned int a2,
__int64 *a3,
char *a4,
__int64 *a5)
{
__int64 v9; // x19
__int64 v10; // x19
cocos2d::CCNode *v11; // x0
__int64 v12; // x22
cocos2d::CCObject *v13; // x19
__int64 v14; // x19
__int64 v15; // x0
__int64 v16; // x23
unsigned __int64 v17; // x22
__int64 v18; // x19
size_t v19; // x1
cocos2d::CCString *v20; // x0
size_t v21; // x0
cocos2d::CCString *v22; // x0
size_t v23; // x0
cocos2d::CCString *v24; // x0
size_t v25; // x0
char *v26; // x1
size_t v27; // x2
char *v28; // x19
size_t v29; // x0
char *CString; // [xsp+88h] [xbp+88h]
char *v33; // [xsp+88h] [xbp+88h]
char *v34; // [xsp+88h] [xbp+88h]
__int64 v35; // [xsp+90h] [xbp+90h] BYREF
size_t v36; // [xsp+98h] [xbp+98h]
void *v37; // [xsp+A0h] [xbp+A0h]
__int64 v38[2]; // [xsp+A8h] [xbp+A8h] BYREF
void *v39; // [xsp+B8h] [xbp+B8h]
__int64 v40[2]; // [xsp+C0h] [xbp+C0h] BYREF
void *v41; // [xsp+D0h] [xbp+D0h]
__int64 v42[2]; // [xsp+D8h] [xbp+D8h] BYREF
void *v43; // [xsp+E8h] [xbp+E8h]
cocos2d::CCNode *v44; // [xsp+F0h] [xbp+F0h] BYREF
__int64 v45; // [xsp+F8h] [xbp+F8h]
void *v46; // [xsp+100h] [xbp+100h]
if ( *a3 != a3[1] && (a2 - 6 <= 1 || a2 <= 1) )
{
v9 = *((_QWORD *)a1 + 136);
v44 = nullptr;
v45 = 0;
v46 = nullptr;
std::string::__init((__int64 *)&v44, "bulkDeleteComments", 0x12u);
v10 = cocos2d::CCDictionary::objectForKey(v9, &v44);
v11 = (cocos2d::CCNode *)(unsigned __int8)v44;
if ( ((unsigned __int8)v44 & 1) != 0 )
{
operator delete(v46);
if ( v10 )
return _stack_chk_guard;
}
else if ( v10 )
{
return _stack_chk_guard;
}
v12 = *((_QWORD *)a1 + 136);
v13 = (cocos2d::CCObject *)cocos2d::CCNode::create(v11);
v44 = nullptr;
v45 = 0;
v46 = nullptr;
std::string::__init((__int64 *)&v44, "bulkDeleteComments", 0x12u);
cocos2d::CCDictionary::setObject(v12, v13);
if ( ((unsigned __int8)v44 & 1) != 0 )
operator delete(v46);
v14 = *a3;
v15 = a3[1];
v35 = 0;
v36 = 0;
v37 = nullptr;
if ( 0xAAAAAAAAAAAAAAABLL * ((v15 - v14) >> 2) )
{
v16 = 0;
v17 = 0;
do
{
v18 = v14 + v16;
v19 = (unsigned __int8)v35 >> 1;
if ( (v35 & 1) != 0 )
v19 = v36;
if ( v19 )
std::string::append((__int64)&v35, ";", 1u);
v20 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i,%i",
(const char *)*(unsigned int *)(v18 + 4),
*(unsigned int *)(v18 + 8));
CString = (char *)cocos2d::CCString::getCString(v20);
v21 = strlen(CString);
std::string::append((__int64)&v35, CString, v21);
v14 = *a3;
++v17;
v16 += 12;
}
while ( v17 < 0xAAAAAAAAAAAAAAABLL * ((a3[1] - *a3) >> 2) );
}
GameLevelManager::getBasePostString(v38);
std::string::append((__int64)v38, "&secret=", 8u);
v22 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)off_50 + 7,
"mfd",
"2893",
103,
98,
"7");
v33 = (char *)cocos2d::CCString::getCString(v22);
v23 = strlen(v33);
std::string::append((__int64)v38, v33, v23);
v24 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"&cType=%i", (const char *)a2);
v34 = (char *)cocos2d::CCString::getCString(v24);
v25 = strlen(v34);
std::string::append((__int64)v38, v34, v25);
std::string::append((__int64)v38, "&items=", 7u);
if ( (v35 & 1) != 0 )
{
v26 = (char *)v37;
v27 = v36;
}
else
{
v27 = (unsigned __int8)v35 >> 1;
v26 = (char *)&v35 + 1;
}
std::string::append((__int64)v38, v26, v27);
GameLevelManager::appendModReason((int)a1, (__int64)v38, a4, a5);
v28 = (char *)v38 + 1;
if ( (v38[0] & 1) != 0 )
v28 = (char *)v39;
v40[0] = 0;
v40[1] = 0;
v41 = nullptr;
std::string::__init(v40, "https://www.boomlings.com/database/deleteGJComments.php", 0x37u);
v42[0] = 0;
v42[1] = 0;
v43 = nullptr;
v29 = strlen(v28);
std::string::__init(v42, v28, v29);
v44 = nullptr;
v45 = 0;
v46 = nullptr;
std::string::__init((__int64 *)&v44, "bulkDeleteComments", 0x12u);
GameLevelManager::ProcessHttpRequest(a1, v40, (__int64)v42, (char *)&v44, 15);
if ( ((unsigned __int8)v44 & 1) != 0 )
operator delete(v46);
if ( (v42[0] & 1) != 0 )
operator delete(v43);
if ( (v40[0] & 1) != 0 )
operator delete(v41);
if ( (v38[0] & 1) != 0 )
operator delete(v39);
if ( (v35 & 1) != 0 )
operator delete(v37);
}
return _stack_chk_guard;
}