//
// GameLevelManager::deleteComment from 0x10056dbc0 to 0x10056e327 (1895 bytes)
//
// 5 xrefs:
// > CommentCell::onDelete @ 0x10023e718
// > GameLevelManager::deleteLevelComment @ 0x10056dbbb
// > GameLevelManager::deleteAccountComment @ 0x10056e43e
// > sub_1009A3A20 @ 0x1009a3afc
// > sub_1009A3B10 @ 0x1009a3c63
//
// 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 12:32:14 +0000
//
void __fastcall GameLevelManager::deleteComment(__int64 a1, int a2, int a3, int a4)
{
__int64 v6; // rax
char *CString; // r15
void *v8; // rbx
size_t v9; // rax
std::string::size_type v10; // r14
char *data; // r12
int v12; // ebx
char *v13; // r13
size_t v14; // r15
__int64 v15; // rbx
__int64 v16; // rbx
void *v17; // r14
size_t v18; // rax
std::string::size_type v19; // r12
char *v20; // r15
__int64 v21; // r14
size_t v22; // rbx
const char *v23; // r15
__int64 v24; // rax
__int64 v25; // rax
const std::string::value_type *v26; // rax
__int64 v27; // rax
const std::string::value_type *v28; // rax
const char *v29; // r12
__int64 v30; // rax
const std::string::value_type *v31; // rax
__int64 v32; // rax
const std::string::value_type *v33; // rax
__int64 v34; // rax
const std::string::value_type *v35; // rax
size_t v36; // rax
size_t v37; // rbx
char *v38; // r14
size_t v39; // rax
size_t v40; // rbx
char *v41; // r14
size_t v42; // r15
size_t v43; // rax
size_t v44; // rbx
char *v45; // r14
size_t v46; // r15
void **p_data; // rax
size_t v48; // r15
size_t v49; // rax
size_t v50; // rbx
char *v51; // r14
size_t v52; // r15
char v53; // [rsp+0h] [rbp-100h]
char v54; // [rsp+0h] [rbp-100h]
char v55; // [rsp+0h] [rbp-100h]
char v56; // [rsp+0h] [rbp-100h]
void *v57; // [rsp+10h] [rbp-F0h]
std::string v58; // [rsp+18h] [rbp-E8h] BYREF
std::string v59; // [rsp+30h] [rbp-D0h] BYREF
_QWORD v60[2]; // [rsp+48h] [rbp-B8h] BYREF
void *v61; // [rsp+58h] [rbp-A8h]
__int128 v62; // [rsp+60h] [rbp-A0h] BYREF
void *v63; // [rsp+70h] [rbp-90h]
_QWORD v64[2]; // [rsp+78h] [rbp-88h] BYREF
void *v65; // [rsp+88h] [rbp-78h]
__int128 v66; // [rsp+90h] [rbp-70h] BYREF
void *v67; // [rsp+A0h] [rbp-60h]
int v68; // [rsp+A8h] [rbp-58h]
int v69; // [rsp+ACh] [rbp-54h]
__int64 v70; // [rsp+B0h] [rbp-50h]
void *__src; // [rsp+B8h] [rbp-48h]
std::string __dst[2]; // [rsp+C0h] [rbp-40h] BYREF
v68 = a2;
v6 = sub_10088E820("delcomment_%i_%i_%i", v53);
CString = (char *)cocos2d::CCString::getCString(v6);
v70 = a1;
v8 = *(void **)(a1 + 1088);
v9 = strlen(CString);
if ( v9 >= 0xFFFFFFFFFFFFFFF8LL )
goto LABEL_85;
v10 = v9;
v69 = a4;
if ( v9 >= 0x17 )
{
__src = v8;
v12 = a3;
v13 = CString;
v14 = 26;
if ( (v9 | 7) != 0x17 )
v14 = (v9 | 7) + 1;
data = (char *)operator new(v14);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)data;
__dst[0].__r_.__value_.__r.__words[0] = v14 + 1;
CString = v13;
a3 = v12;
v8 = __src;
__dst[0].__r_.__value_.__l.__size_ = v10;
goto LABEL_8;
}
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v9);
data = __dst[0].__r_.__value_.__s.__data_;
if ( v9 )
LABEL_8:
memmove(data, CString, v10);
data[v10] = 0;
v15 = cocos2d::CCDictionary::objectForKey((__int64)v8, (char *)__dst);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst[0].__r_.__value_.__l.__data_);
if ( !v15 )
{
v16 = *(_QWORD *)(v70 + 1088);
v17 = cocos2d::CCNode::create();
v18 = strlen(CString);
if ( v18 < 0xFFFFFFFFFFFFFFF8LL )
{
v19 = v18;
__src = CString;
if ( v18 >= 0x17 )
{
v57 = v17;
v21 = v16;
v22 = 26;
if ( (v18 | 7) != 0x17 )
v22 = (v18 | 7) + 1;
v20 = (char *)operator new(v22);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v20;
__dst[0].__r_.__value_.__r.__words[0] = v22 + 1;
v16 = v21;
v17 = v57;
__dst[0].__r_.__value_.__l.__size_ = v19;
}
else
{
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v18);
v20 = __dst[0].__r_.__value_.__s.__data_;
if ( !v18 )
goto LABEL_20;
}
memmove(v20, __src, v19);
LABEL_20:
v20[v19] = 0;
cocos2d::CCDictionary::setObject(v16, (__int64)v17, (char *)__dst);
v23 = (const char *)__src;
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst[0].__r_.__value_.__l.__data_);
GameLevelManager::getBasePostString(__dst);
v24 = sub_10088E820("%c%s%s%c%c%s", (char)"7");
cocos2d::CCString::getCString(v24);
v25 = sub_10088E820("&commentID=%i&secret=%s", v54);
v26 = (const std::string::value_type *)cocos2d::CCString::getCString(v25);
std::string::append(__dst, v26);
if ( a3 == 6 )
goto LABEL_27;
if ( !a3 )
{
std::string::append(__dst, "&levelID=");
v27 = sub_10088E820("%i", v55);
v28 = (const std::string::value_type *)cocos2d::CCString::getCString(v27);
std::string::append(__dst, v28);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
v29 = __dst[0].__r_.__value_.__l.__data_;
else
v29 = __dst[0].__r_.__value_.__s.__data_;
goto LABEL_39;
}
if ( (unsigned int)(a3 - 7) <= 1 )
{
LABEL_27:
std::string::append(__dst, "&levelID=");
v30 = sub_10088E820("%i", v55);
v31 = (const std::string::value_type *)cocos2d::CCString::getCString(v30);
std::string::append(__dst, v31);
std::string::append(__dst, "&cType=");
}
else
{
std::string::append(__dst, "&cType=");
v32 = sub_10088E820("%i", v55);
v33 = (const std::string::value_type *)cocos2d::CCString::getCString(v32);
std::string::append(__dst, v33);
std::string::append(__dst, "&targetAccountID=");
}
v34 = sub_10088E820("%i", v56);
v35 = (const std::string::value_type *)cocos2d::CCString::getCString(v34);
std::string::append(__dst, v35);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
v29 = __dst[0].__r_.__value_.__l.__data_;
else
v29 = __dst[0].__r_.__value_.__s.__data_;
if ( a3 == 6 || (unsigned int)(a3 - 7) <= 1 )
{
LABEL_39:
v58.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x40u);
v58.__r_.__value_.__r.__words[0] = 65;
v58.__r_.__value_.__l.__size_ = 56;
strcpy(v58.__r_.__value_.__l.__data_, "https://www.boomlings.com/database/deleteGJComment20.php");
v39 = strlen(v29);
if ( v39 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v40 = v39;
if ( v39 >= 0x17 )
{
v42 = 26;
if ( (v39 | 7) != 0x17 )
v42 = (v39 | 7) + 1;
v41 = (char *)operator new(v42);
v61 = v41;
v60[0] = v42 | 1;
v60[1] = v40;
v23 = (const char *)__src;
}
else
{
LOBYTE(v60[0]) = 2 * v39;
v41 = (char *)v60 + 1;
if ( !v39 )
{
LABEL_47:
v41[v40] = 0;
v43 = strlen(v23);
if ( v43 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v44 = v43;
if ( v43 >= 0x17 )
{
v46 = 26;
if ( (v43 | 7) != 0x17 )
v46 = (v43 | 7) + 1;
v45 = (char *)operator new(v46);
v63 = v45;
*(_QWORD *)&v62 = v46 | 1;
*((_QWORD *)&v62 + 1) = v44;
v23 = (const char *)__src;
}
else
{
LOBYTE(v62) = 2 * v43;
v45 = (char *)&v62 + 1;
if ( !v43 )
{
LABEL_55:
v45[v44] = 0;
GameLevelManager::ProcessHttpRequest(v70, &v58, (__int64)v60, &v62, 0xEu);
if ( (v62 & 1) != 0 )
{
operator delete(v63);
if ( (v60[0] & 1) == 0 )
{
LABEL_57:
if ( (*(_BYTE *)&v58.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_63:
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst[0].__r_.__value_.__l.__data_);
return;
}
goto LABEL_61;
}
}
else if ( (v60[0] & 1) == 0 )
{
goto LABEL_57;
}
operator delete(v61);
if ( (*(_BYTE *)&v58.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_63;
LABEL_61:
p_data = (void **)&v58.__r_.__value_.__l.__data_;
LABEL_62:
operator delete(*p_data);
goto LABEL_63;
}
}
memmove(v45, v23, v44);
goto LABEL_55;
}
}
memmove(v41, v29, v40);
goto LABEL_47;
}
v59.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x40u);
v59.__r_.__value_.__r.__words[0] = 65;
v59.__r_.__value_.__l.__size_ = 59;
strcpy(v59.__r_.__value_.__l.__data_, "https://www.boomlings.com/database/deleteGJAccComment20.php");
v36 = strlen(v29);
if ( v36 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v37 = v36;
if ( v36 >= 0x17 )
{
v48 = 26;
if ( (v36 | 7) != 0x17 )
v48 = (v36 | 7) + 1;
v38 = (char *)operator new(v48);
v65 = v38;
v64[0] = v48 | 1;
v64[1] = v37;
v23 = (const char *)__src;
}
else
{
LOBYTE(v64[0]) = 2 * v36;
v38 = (char *)v64 + 1;
if ( !v36 )
{
LABEL_70:
v38[v37] = 0;
v49 = strlen(v23);
if ( v49 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v50 = v49;
if ( v49 >= 0x17 )
{
v52 = 26;
if ( (v49 | 7) != 0x17 )
v52 = (v49 | 7) + 1;
v51 = (char *)operator new(v52);
v67 = v51;
*(_QWORD *)&v66 = v52 | 1;
*((_QWORD *)&v66 + 1) = v50;
v23 = (const char *)__src;
}
else
{
LOBYTE(v66) = 2 * v49;
v51 = (char *)&v66 + 1;
if ( !v49 )
{
LABEL_78:
v51[v50] = 0;
GameLevelManager::ProcessHttpRequest(v70, &v59, (__int64)v64, &v66, 0xEu);
if ( (v66 & 1) != 0 )
{
operator delete(v67);
if ( (v64[0] & 1) == 0 )
{
LABEL_80:
if ( (*(_BYTE *)&v59.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_63;
LABEL_84:
p_data = (void **)&v59.__r_.__value_.__l.__data_;
goto LABEL_62;
}
}
else if ( (v64[0] & 1) == 0 )
{
goto LABEL_80;
}
operator delete(v65);
if ( (*(_BYTE *)&v59.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_63;
goto LABEL_84;
}
}
memmove(v51, v23, v50);
goto LABEL_78;
}
}
memmove(v38, v29, v37);
goto LABEL_70;
}
LABEL_85:
sub_100003630();
}
}