//
// GameLevelManager::deleteLevelControls from 0x8357e4 to 0x835af4 (784 bytes)
//
// 2 xrefs:
// > PlatformerControlsPopup::FLAlert_Clicked @ 0xcfbe70
// > ??> @ 0xb53f0
//
// 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:10 +0000
//
__int64 __fastcall GameLevelManager::deleteLevelControls(GameLevelManager *this, unsigned int a2)
{
_QWORD *v4; // x0
__int64 v5; // x3
unsigned int v6; // w23
__int64 v8; // x23
cocos2d::CCObject *v9; // x0
cocos2d::CCString *v10; // x0
__int64 CString; // x0
cocos2d::CCString *v12; // x0
size_t v13; // x0
const char *v14; // x1
size_t v15; // x0
const char *v16; // x1
size_t v17; // x0
char *v18; // [xsp+48h] [xbp+48h]
char *v19; // [xsp+48h] [xbp+48h]
char *v20; // [xsp+48h] [xbp+48h]
_QWORD v21[2]; // [xsp+50h] [xbp+50h] BYREF
void *v22; // [xsp+60h] [xbp+60h]
__int64 v23[2]; // [xsp+68h] [xbp+68h] BYREF
void *v24; // [xsp+78h] [xbp+78h]
__int64 v25[2]; // [xsp+80h] [xbp+80h] BYREF
void *v26; // [xsp+90h] [xbp+90h]
__int64 v27[2]; // [xsp+98h] [xbp+98h] BYREF
void *v28; // [xsp+A8h] [xbp+A8h]
__int64 v29[2]; // [xsp+B0h] [xbp+B0h] BYREF
void *v30; // [xsp+C0h] [xbp+C0h]
std::to_string(v29, a2);
v4 = std::string::insert(v29, 0, "lctrldel_", 9u);
v5 = v4[1];
v21[0] = *v4;
v21[1] = v5;
v22 = (void *)v4[2];
*v4 = 0;
v4[1] = 0;
v4[2] = 0;
if ( (v29[0] & 1) != 0 )
operator delete(v30);
v6 = 0;
if ( !cocos2d::CCDictionary::objectForKey(*((_QWORD *)this + 136), v21) )
{
v8 = *((_QWORD *)this + 136);
v9 = (cocos2d::CCObject *)cocos2d::CCNode::create(nullptr);
cocos2d::CCDictionary::setObject(v8, v9);
GameLevelManager::getBasePostString(v23);
v10 = (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(v10);
v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&levelID=%i&secret=%s",
(const char *)a2,
CString);
v18 = (char *)cocos2d::CCString::getCString(v12);
v13 = strlen(v18);
std::string::append((__int64)v23, v18, v13);
v25[0] = 0;
v25[1] = 0;
v26 = nullptr;
std::string::__init(v25, "https://www.boomlings.com/database/deleteGJLevelControls.php", 0x3Cu);
v14 = (char *)v23 + 1;
if ( (v23[0] & 1) != 0 )
v14 = (const char *)v24;
v19 = (char *)v14;
v27[0] = 0;
v27[1] = 0;
v28 = nullptr;
v15 = strlen(v14);
std::string::__init(v27, v19, v15);
v16 = (char *)v21 + 1;
if ( (v21[0] & 1) != 0 )
v16 = (const char *)v22;
v20 = (char *)v16;
v29[0] = 0;
v29[1] = 0;
v30 = nullptr;
v17 = strlen(v16);
std::string::__init(v29, v20, v17);
GameLevelManager::ProcessHttpRequest(this, v25, (__int64)v27, (char *)v29, 29);
if ( (v29[0] & 1) != 0 )
operator delete(v30);
if ( (v27[0] & 1) != 0 )
operator delete(v28);
if ( (v25[0] & 1) != 0 )
operator delete(v26);
v6 = 1;
if ( (v23[0] & 1) != 0 )
operator delete(v24);
}
if ( (v21[0] & 1) != 0 )
operator delete(v22);
return v6;
}