//
// GameLevelManager::deleteComments from 0x4be194 to 0x4be3e0 (588 bytes)
//
// 1 xrefs:
// > InfoLayer::confirmBulkDelete @ 0x53e7c4
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:50:20 +0000
//
GameManager *__fastcall GameLevelManager::deleteComments(
GameManager *result,
const char *a2,
_DWORD *a3,
unsigned __int8 *a4,
_DWORD *a5)
{
GameManager *v7; // r6
int v8; // r5
unsigned int v9; // r5
int v10; // r7
cocos2d::CCObject *v11; // r0
cocos2d::CCObject *v12; // r8
int v13; // r7
int v14; // r3
cocos2d::CCString *v15; // r0
char *CString; // r0
cocos2d::CCString *v17; // r0
char *v18; // r0
cocos2d::CCString *v19; // r0
char *v20; // r0
char *v21; // r1
size_t v22; // r2
const char *v23; // r9
size_t v24; // r0
int v26; // [sp+20h] [bp-44h] BYREF
size_t v27; // [sp+24h] [bp-40h]
char *v28; // [sp+28h] [bp-3Ch]
_DWORD v29[3]; // [sp+2Ch] [bp-38h] BYREF
int v30[3]; // [sp+38h] [bp-2Ch] BYREF
int v31[3]; // [sp+44h] [bp-20h] BYREF
int v32; // [sp+50h] [bp-14h] BYREF
int v33; // [sp+54h] [bp-10h]
int v34; // [sp+58h] [bp-Ch]
v7 = result;
if ( *a3 != a3[1] && ((unsigned int)a2 <= 1 || (unsigned int)(a2 - 6) <= 1) )
{
v8 = *((_DWORD *)result + 187);
v32 = 0;
v33 = 0;
v34 = 0;
std::string::__init(&v32, "bulkDeleteComments", 0x12u);
v9 = cocos2d::CCDictionary::objectForKey(v8, &v32);
result = (GameManager *)std::string::~string((int)&v32);
if ( !v9 )
{
v10 = *((_DWORD *)v7 + 187);
v11 = (cocos2d::CCObject *)cocos2d::CCNode::create(result);
v32 = 0;
v33 = 0;
v34 = 0;
v12 = v11;
std::string::__init(&v32, "bulkDeleteComments", 0x12u);
cocos2d::CCDictionary::setObject(v10, v12);
std::string::~string((int)&v32);
v26 = 0;
v27 = 0;
v28 = nullptr;
while ( v9 < -1431655765 * ((a3[1] - *a3) >> 2) )
{
v13 = *a3 + 12 * v9;
if ( (v26 & 1) != 0 )
v14 = v27;
else
v14 = (int)(unsigned __int8)v26 >> 1;
if ( v14 )
std::string::append(&v26, ";");
v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i,%i",
*(const char **)(v13 + 4),
*(_DWORD *)(v13 + 8));
CString = (char *)cocos2d::CCString::getCString(v15);
std::string::append(&v26, CString);
++v9;
}
GameLevelManager::getBasePostString((GameLevelManager *)v29);
std::string::append(v29, "&secret=");
v17 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&dword_54 + 3,
"mfd",
"2893",
103,
98,
&a1i2r3e45s789g[9]);
v18 = (char *)cocos2d::CCString::getCString(v17);
std::string::append(v29, v18);
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"&cType=%i", a2);
v20 = (char *)cocos2d::CCString::getCString(v19);
std::string::append(v29, v20);
std::string::append(v29, "&items=");
if ( (v26 & 1) != 0 )
{
v21 = v28;
v22 = v27;
}
else
{
v22 = (int)(unsigned __int8)v26 >> 1;
v21 = (char *)&v26 + 1;
}
std::string::append(v29, v21, v22);
GameLevelManager::appendModReason((int)v7, v29, a4, a5);
if ( (v29[0] & 1) != 0 )
v23 = (const char *)v29[2];
else
v23 = (char *)v29 + 1;
memset(v30, 0, sizeof(v30));
std::string::__init(v30, "https://www.boomlings.com/database/deleteGJComments.php", 0x37u);
memset(v31, 0, sizeof(v31));
v24 = strlen(v23);
std::string::__init(v31, v23, v24);
v32 = 0;
v33 = 0;
v34 = 0;
std::string::__init(&v32, "bulkDeleteComments", 0x12u);
GameLevelManager::ProcessHttpRequest(v7, v30, (int)v31, (int)&v32, 15);
std::string::~string((int)&v32);
std::string::~string((int)v31);
std::string::~string((int)v30);
std::string::~string((int)v29);
return (GameManager *)std::string::~string((int)&v26);
}
}
return result;
}