//
// GameLevelManager::deleteLevelControls from 0x140259650 to 0x14025991d (717 bytes)
//
// 2 xrefs:
// > PlatformerControlsPopup::FLAlert_Clicked @ 0x140452034
// > ??> @ 0x14091c6b8
//
// This function is hookable on this platform (idp: pc, 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 11:28:45 +0000
//
// Hidden C++ exception states: #wind=6
__int64 __fastcall GameLevelManager::deleteLevelControls(__int64 a1, int a2)
{
_QWORD *v4; // rax
__int64 v5; // rax
unsigned __int8 v6; // bl
__int64 v7; // rbx
__int64 v8; // rax
__int64 v9; // rcx
cocos2d::CCString *v10; // rax
const char *CString; // rax
cocos2d::CCString *v12; // rax
char *v13; // rax
size_t v14; // rbx
size_t v15; // r8
void **v16; // rdx
size_t v17; // r8
_QWORD *v18; // rdx
void *v19; // rcx
int Reserved; // [rsp+20h] [rbp-99h]
int v22; // [rsp+28h] [rbp-91h]
__int128 v23; // [rsp+48h] [rbp-71h] BYREF
__int64 v24; // [rsp+58h] [rbp-61h]
__int64 v25; // [rsp+60h] [rbp-59h]
__int128 v26; // [rsp+68h] [rbp-51h] BYREF
__int64 v27; // [rsp+78h] [rbp-41h]
__int64 v28; // [rsp+80h] [rbp-39h]
__int128 *v29; // [rsp+88h] [rbp-31h]
void *Block[2]; // [rsp+98h] [rbp-21h] BYREF
__int128 v31; // [rsp+A8h] [rbp-11h]
__int128 v32; // [rsp+B8h] [rbp-1h] BYREF
__int64 v33; // [rsp+C8h] [rbp+Fh]
__int64 v34; // [rsp+D0h] [rbp+17h]
_QWORD Src[4]; // [rsp+D8h] [rbp+1Fh] BYREF
v4 = sub_1400D2750(&v32, a2);
v5 = sub_140059D70(v4, 0, "lctrldel_", 9u);
*(_OWORD *)Block = 0;
v31 = 0;
*(_OWORD *)Block = *(_OWORD *)v5;
v31 = *(_OWORD *)(v5 + 16);
*(_QWORD *)(v5 + 16) = 0;
*(_QWORD *)(v5 + 24) = 15;
*(_BYTE *)v5 = 0;
sub_14003D310((__int64)&v32);
if ( cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 1200), Block) )
{
v6 = 0;
}
else
{
v7 = *(_QWORD *)(a1 + 1200);
v8 = cocos2d::CCNode::create();
cocos2d::CCDictionary::setObject(v7, v8, Block);
GameLevelManager::getBasePostString(v9, Src);
v22 = 98;
Reserved = 103;
v10 = cocos2d::CCString::createWithFormat(
"%c%s%s%c%c%s",
87,
"mfd",
"2893",
Reserved,
v22,
(const char *)&word_14070D040);
CString = cocos2d::CCString::getCString(v10);
v12 = cocos2d::CCString::createWithFormat("&levelID=%i&secret=%s", a2, CString);
v13 = (char *)cocos2d::CCString::getCString(v12);
v14 = -1;
v15 = -1;
do
++v15;
while ( v13[v15] );
sub_140044D80(Src, v13, v15);
v29 = &v32;
v16 = Block;
if ( *((_QWORD *)&v31 + 1) > 0xFu )
v16 = (void **)Block[0];
v26 = 0;
v27 = 0;
v28 = 0;
v17 = -1;
do
++v17;
while ( *((_BYTE *)v16 + v17) );
sub_14003D230(&v26, v16, v17);
v18 = Src;
if ( Src[3] > 0xFu )
v18 = (_QWORD *)Src[0];
v32 = 0;
v33 = 0;
v34 = 0;
do
++v14;
while ( *((_BYTE *)v18 + v14) );
sub_14003D230(&v32, v18, v14);
v23 = 0;
*(_QWORD *)&v23 = sub_14003D460(0x40u);
v24 = 60;
v25 = 63;
strcpy((char *)v23, "https://www.boomlings.com/database/deleteGJLevelControls.php");
GameLevelManager::ProcessHttpRequest(
(cocos2d::CCActionManager **)a1,
(__int64)&v23,
(const char *)&v32,
(const char *)&v26,
0x1Du);
v6 = 1;
sub_14003D310((__int64)Src);
}
if ( *((_QWORD *)&v31 + 1) > 0xFu )
{
v19 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v31 + 1) + 1LL) >= 0x1000 )
{
v19 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v19 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v19);
}
return v6;
}