//
// GameLevelManager::deleteComment from 0x100553000 to 0x1005536e4 (1764 bytes)
//
// 2 xrefs:
// > GameLevelManager::deleteLevelComment @ 0x100552ffb
// > GameLevelManager::deleteAccountComment @ 0x1005537fe
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall GameLevelManager::deleteComment(GameLevelManager *a1, int a2, CommentType a3, int a4)
{
__m128 v4; // xmm0
GameLevelManager *v6; // r12
cocos2d::CCString *v7; // rax
const char *CString; // r13
size_t v9; // rax
std::string::size_type v10; // r14
char *data; // r15
size_t v12; // r12
__int64 v13; // rbx
__int64 v14; // r14
cocos2d::CCNode *v15; // rbx
size_t v16; // rax
std::string::size_type v17; // r15
char *v18; // rbx
const char *v19; // r14
GameLevelManager *v20; // r13
size_t v21; // r12
cocos2d::CCString *v22; // rax
cocos2d::CCString *v23; // rax
const char *v24; // rax
cocos2d::CCString *v25; // rax
const char *v26; // rax
cocos2d::CCString *v27; // rax
const char *v28; // rax
const char *v29; // r15
cocos2d::CCString *v30; // rax
const char *v31; // rax
const char *v32; // r15
size_t v33; // rax
size_t v34; // rbx
char *v35; // r14
GameLevelManager *v36; // r13
size_t v37; // r12
size_t v38; // rax
size_t v39; // rbx
char *v40; // r14
size_t v41; // r15
void **p_data; // rax
size_t v43; // rax
size_t v44; // rbx
char *v45; // r14
GameLevelManager *v46; // r13
size_t v47; // r12
size_t v48; // rax
size_t v49; // rbx
char *v50; // r14
size_t v51; // r15
char v52; // [rsp+0h] [rbp-100h]
char v53; // [rsp+0h] [rbp-100h]
char v54; // [rsp+0h] [rbp-100h]
char v55; // [rsp+0h] [rbp-100h]
__int64 v56; // [rsp+10h] [rbp-F0h]
std::string v57; // [rsp+18h] [rbp-E8h] BYREF
std::string v58; // [rsp+30h] [rbp-D0h] BYREF
_QWORD v59[2]; // [rsp+48h] [rbp-B8h] BYREF
void *v60; // [rsp+58h] [rbp-A8h]
_QWORD v61[2]; // [rsp+60h] [rbp-A0h] BYREF
void *v62; // [rsp+70h] [rbp-90h]
_QWORD v63[2]; // [rsp+78h] [rbp-88h] BYREF
void *v64; // [rsp+88h] [rbp-78h]
_QWORD v65[2]; // [rsp+90h] [rbp-70h] BYREF
void *v66; // [rsp+A0h] [rbp-60h]
CommentType v67; // [rsp+ACh] [rbp-54h]
int v68; // [rsp+B0h] [rbp-50h]
int v69; // [rsp+B4h] [rbp-4Ch]
cocos2d::CCDictionary *m_friendReqAndUserBlocks; // [rsp+B8h] [rbp-48h]
std::string __dst[2]; // [rsp+C0h] [rbp-40h] BYREF
v6 = a1;
v69 = a4;
v7 = (cocos2d::CCString *)sub_1007AB580("delcomment_%i_%i_%i", v52);
CString = cocos2d::CCString::getCString(v7);
m_friendReqAndUserBlocks = a1->m_friendReqAndUserBlocks;
v9 = strlen(CString);
if ( v9 >= 0xFFFFFFFFFFFFFFF8LL )
goto LABEL_79;
v10 = v9;
v68 = a2;
v67 = a3;
if ( v9 >= 0x17 )
{
v12 = 26;
if ( (v9 | 7) != 0x17 )
v12 = (v9 | 7) + 1;
data = (char *)operator new(v12);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)data;
__dst[0].__r_.__value_.__r.__words[0] = v12 + 1;
v6 = a1;
__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;
v13 = cocos2d::CCDictionary::objectForKey_1((__int64)m_friendReqAndUserBlocks, (char *)__dst);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst[0].__r_.__value_.__l.__data_);
if ( !v13 )
{
v14 = (__int64)v6->m_friendReqAndUserBlocks;
v15 = cocos2d::CCNode::create();
v16 = strlen(CString);
if ( v16 < 0xFFFFFFFFFFFFFFF8LL )
{
v17 = v16;
m_friendReqAndUserBlocks = (cocos2d::CCDictionary *)v15;
if ( v16 >= 0x17 )
{
v56 = v14;
v19 = CString;
v20 = v6;
v21 = 26;
if ( (v16 | 7) != 0x17 )
v21 = (v16 | 7) + 1;
v18 = (char *)operator new(v21);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v18;
__dst[0].__r_.__value_.__r.__words[0] = v21 + 1;
v6 = v20;
CString = v19;
v14 = v56;
__dst[0].__r_.__value_.__l.__size_ = v17;
}
else
{
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v16);
v18 = __dst[0].__r_.__value_.__s.__data_;
if ( !v16 )
{
LABEL_20:
v18[v17] = 0;
cocos2d::CCDictionary::setObject_1(v14, m_friendReqAndUserBlocks, (char *)__dst);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst[0].__r_.__value_.__l.__data_);
GameLevelManager::getBasePostString(__dst, v4);
v22 = (cocos2d::CCString *)sub_1007AB580("%c%s%s%c%c%s", (char)"7");
cocos2d::CCString::getCString(v22);
v23 = (cocos2d::CCString *)sub_1007AB580("&commentID=%i&secret=%s", v53);
v24 = cocos2d::CCString::getCString(v23);
std::string::append(__dst, v24);
if ( v67 )
{
std::string::append(__dst, "&cType=");
v25 = (cocos2d::CCString *)sub_1007AB580("%i", v54);
v26 = cocos2d::CCString::getCString(v25);
std::string::append(__dst, v26);
std::string::append(__dst, "&targetAccountID=");
v27 = (cocos2d::CCString *)sub_1007AB580("%i", v55);
v28 = 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_;
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_ = 59;
strcpy(v58.__r_.__value_.__l.__data_, "https://www.boomlings.com/database/deleteGJAccComment20.php");
v33 = strlen(v29);
if ( v33 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(2.057594829120962e-81);
v34 = v33;
if ( v33 >= 0x17 )
{
m_friendReqAndUserBlocks = (cocos2d::CCDictionary *)CString;
v36 = v6;
v37 = 26;
if ( (v33 | 7) != 0x17 )
v37 = (v33 | 7) + 1;
v35 = (char *)operator new(v37);
v64 = v35;
v63[0] = v37 | 1;
v63[1] = v34;
v6 = v36;
CString = (const char *)m_friendReqAndUserBlocks;
}
else
{
LOBYTE(v63[0]) = 2 * v33;
v35 = (char *)v63 + 1;
if ( !v33 )
{
LABEL_36:
v35[v34] = 0;
v38 = strlen(CString);
if ( v38 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(2.057594829120962e-81);
v39 = v38;
if ( v38 >= 0x17 )
{
v41 = 26;
if ( (v38 | 7) != 0x17 )
v41 = (v38 | 7) + 1;
v40 = (char *)operator new(v41);
v66 = v40;
v65[0] = v41 | 1;
v65[1] = v39;
}
else
{
LOBYTE(v65[0]) = 2 * v38;
v40 = (char *)v65 + 1;
if ( !v38 )
{
LABEL_44:
v40[v39] = 0;
GameLevelManager::ProcessHttpRequest(v6, &v58, (__int64)v63, (__int64)v65, 14);
if ( (v65[0] & 1) != 0 )
{
operator delete(v66);
if ( (v63[0] & 1) == 0 )
{
LABEL_46:
if ( (*(_BYTE *)&v58.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_76;
goto LABEL_50;
}
}
else if ( (v63[0] & 1) == 0 )
{
goto LABEL_46;
}
operator delete(v64);
if ( (*(_BYTE *)&v58.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_76;
LABEL_50:
p_data = (void **)&v58.__r_.__value_.__l.__data_;
LABEL_75:
operator delete(*p_data);
goto LABEL_76;
}
}
memmove(v40, CString, v39);
goto LABEL_44;
}
}
memmove(v35, v29, v34);
goto LABEL_36;
}
std::string::append(__dst, "&levelID=");
v30 = (cocos2d::CCString *)sub_1007AB580("%i", v54);
v31 = cocos2d::CCString::getCString(v30);
std::string::append(__dst, v31);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
v32 = __dst[0].__r_.__value_.__l.__data_;
else
v32 = __dst[0].__r_.__value_.__s.__data_;
v57.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x40u);
v57.__r_.__value_.__r.__words[0] = 65;
v57.__r_.__value_.__l.__size_ = 56;
strcpy(v57.__r_.__value_.__l.__data_, "https://www.boomlings.com/database/deleteGJComment20.php");
v43 = strlen(v32);
if ( v43 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(2.057594829120962e-81);
v44 = v43;
if ( v43 >= 0x17 )
{
m_friendReqAndUserBlocks = (cocos2d::CCDictionary *)CString;
v46 = v6;
v47 = 26;
if ( (v43 | 7) != 0x17 )
v47 = (v43 | 7) + 1;
v45 = (char *)operator new(v47);
v60 = v45;
v59[0] = v47 | 1;
v59[1] = v44;
v6 = v46;
CString = (const char *)m_friendReqAndUserBlocks;
}
else
{
LOBYTE(v59[0]) = 2 * v43;
v45 = (char *)v59 + 1;
if ( !v43 )
{
LABEL_60:
v45[v44] = 0;
v48 = strlen(CString);
if ( v48 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(2.057594829120962e-81);
v49 = v48;
if ( v48 >= 0x17 )
{
v51 = 26;
if ( (v48 | 7) != 0x17 )
v51 = (v48 | 7) + 1;
v50 = (char *)operator new(v51);
v62 = v50;
v61[0] = v51 | 1;
v61[1] = v49;
}
else
{
LOBYTE(v61[0]) = 2 * v48;
v50 = (char *)v61 + 1;
if ( !v48 )
{
LABEL_68:
v50[v49] = 0;
GameLevelManager::ProcessHttpRequest(v6, &v57, (__int64)v59, (__int64)v61, 14);
if ( (v61[0] & 1) != 0 )
{
operator delete(v62);
if ( (v59[0] & 1) == 0 )
{
LABEL_70:
if ( (*(_BYTE *)&v57.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_76:
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst[0].__r_.__value_.__l.__data_);
return;
}
goto LABEL_74;
}
}
else if ( (v59[0] & 1) == 0 )
{
goto LABEL_70;
}
operator delete(v60);
if ( (*(_BYTE *)&v57.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_76;
LABEL_74:
p_data = (void **)&v57.__r_.__value_.__l.__data_;
goto LABEL_75;
}
}
memmove(v50, CString, v49);
goto LABEL_68;
}
}
memmove(v45, v32, v44);
goto LABEL_60;
}
}
memmove(v18, CString, v17);
goto LABEL_20;
}
LABEL_79:
sub_100006BF0(*(double *)v4.i64);
}
}