//
// GameLevelManager::deleteServerLevel from 0x140234980 to 0x140234dd5 (1109 bytes)
//
// 2 xrefs:
// > LevelInfoLayer::startServerDelete @ 0x1404232cb
// > ??> @ 0x14091bf8c
//
// 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:31 +0000
//
// Hidden C++ exception states: #wind=6
void __fastcall GameLevelManager::deleteServerLevel(__int64 a1, int a2, __int64 a3, __int64 a4)
{
cocos2d::CCString *v7; // rax
const char *CString; // rax
const char *v9; // rsi
size_t v10; // rdi
size_t v11; // r8
__int64 v12; // rbx
void *v13; // r8
size_t v14; // r8
__int64 v15; // rbx
__int64 v16; // rax
void *v17; // rcx
cocos2d::CCString *v18; // rax
const char *v19; // rax
size_t v20; // r8
_QWORD *v21; // r14
__int64 v22; // rcx
void **v23; // r8
cocos2d::CCString *v24; // rax
char *v25; // rax
size_t v26; // r8
__int64 v27; // rcx
size_t v28; // r8
_QWORD *v29; // rdx
size_t v30; // r8
void *v31; // rcx
void *v32; // rcx
__int128 v34; // [rsp+48h] [rbp-B8h] BYREF
__int64 v35; // [rsp+58h] [rbp-A8h]
__int64 v36; // [rsp+60h] [rbp-A0h]
__int128 v37; // [rsp+68h] [rbp-98h] BYREF
__int64 v38; // [rsp+78h] [rbp-88h]
__int64 v39; // [rsp+80h] [rbp-80h]
__int128 *v40; // [rsp+88h] [rbp-78h]
void *Block[2]; // [rsp+98h] [rbp-68h] BYREF
__int128 v42; // [rsp+A8h] [rbp-58h]
void *v43[2]; // [rsp+B8h] [rbp-48h] BYREF
__int128 v44; // [rsp+C8h] [rbp-38h]
_QWORD Src[4]; // [rsp+D8h] [rbp-28h] BYREF
void *v46[2]; // [rsp+F8h] [rbp-8h]
__m128i si128; // [rsp+108h] [rbp+8h]
v7 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8);
CString = cocos2d::CCString::getCString(v7);
v9 = CString;
*(_OWORD *)Block = 0;
v42 = 0;
v10 = -1;
v11 = -1;
do
++v11;
while ( CString[v11] );
sub_14003D230(Block, CString, v11);
v12 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 1200), Block);
if ( *((_QWORD *)&v42 + 1) > 0xFu )
{
v13 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v42 + 1) + 1LL) >= 0x1000 )
{
v13 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v13 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v13);
}
if ( !v12 )
{
*(_OWORD *)Block = 0;
v42 = 0;
v14 = -1;
do
++v14;
while ( v9[v14] );
sub_14003D230(Block, v9, v14);
v15 = *(_QWORD *)(a1 + 1200);
v16 = cocos2d::CCNode::create();
cocos2d::CCDictionary::setObject(v15, v16, Block);
if ( *((_QWORD *)&v42 + 1) > 0xFu )
{
v17 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v42 + 1) + 1LL) >= 0x1000 )
{
v17 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v17 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v17);
}
v18 = cocos2d::CCString::createWithFormat("%c%s%s%c%c%s", 87, "mfv", "2898", 103, 99, "9");
v19 = cocos2d::CCString::getCString(v18);
*(_OWORD *)v43 = 0;
v44 = 0;
v20 = -1;
do
++v20;
while ( v19[v20] );
sub_14003D230(v43, v19, v20);
*(_OWORD *)v46 = 0;
v21 = sub_14003D460(0x40u);
v46[0] = v21;
si128 = _mm_load_si128((const __m128i *)&xmmword_1408366D0);
strcpy((char *)v21, "https://www.boomlings.com/database/deleteGJLevelUser20.php");
GameLevelManager::getBasePostString(v22, Src);
v23 = v43;
if ( *((_QWORD *)&v44 + 1) > 0xFu )
v23 = (void **)v43[0];
v24 = cocos2d::CCString::createWithFormat("&levelID=%i&secret=%s", a2, (const char *)v23);
v25 = (char *)cocos2d::CCString::getCString(v24);
v26 = -1;
do
++v26;
while ( v25[v26] );
sub_140044D80(Src, v25, v26);
GameLevelManager::appendModReason(v27, Src, a3, a4);
v40 = &v34;
*(_OWORD *)Block = 0;
v42 = 0u;
v28 = -1;
do
++v28;
while ( v9[v28] );
sub_14003D230(Block, v9, v28);
v29 = Src;
if ( Src[3] > 0xFu )
v29 = (_QWORD *)Src[0];
v34 = 0;
v35 = 0;
v36 = 0;
v30 = -1;
do
++v30;
while ( *((_BYTE *)v29 + v30) );
sub_14003D230(&v34, v29, v30);
v37 = 0;
v38 = 0;
v39 = 0;
do
++v10;
while ( *((_BYTE *)v21 + v10) );
sub_14003D230(&v37, v21, v10);
GameLevelManager::ProcessHttpRequest(
(cocos2d::CCActionManager **)a1,
(__int64)&v37,
(const char *)&v34,
(const char *)Block,
7u);
sub_14003D310((__int64)Src);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v31 = v46[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v31 = *((void **)v46[0] - 1);
if ( (unsigned __int64)((char *)v46[0] - (char *)v31 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v31);
}
if ( *((_QWORD *)&v44 + 1) > 0xFu )
{
v32 = v43[0];
if ( (unsigned __int64)(*((_QWORD *)&v44 + 1) + 1LL) >= 0x1000 )
{
v32 = *((void **)v43[0] - 1);
if ( (unsigned __int64)((char *)v43[0] - (char *)v32 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v32);
}
}
}