//
// GameLevelManager::deleteComment from 0x72507c to 0x725784 (1800 bytes)
//
// 3 xrefs:
// > GameLevelManager::deleteLevelComment @ 0x725790
// > GameLevelManager::deleteAccountComment @ 0x7257a0
// > ??> @ 0x55d10
//
// 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 GameLevelManager::deleteComment(GameLevelManager *a1, int a2, CommentType a3, int a4)
{
char *v8; // x24
cocos2d::CCDictionary *m_friendReqAndUserBlocks; // x21
__int64 v10; // x28
char *v11; // x0
unsigned int *v12; // x1
int v13; // w2
cocos2d::CCNode *v14; // x28
char *v15; // x0
cocos2d::CCString *v16; // x0
const char *CString; // x0
cocos2d::CCString *v18; // x0
size_t v19; // x0
cocos2d::CCString *v20; // x0
size_t v21; // x0
cocos2d::CCString *v22; // x0
size_t v23; // x0
char *v24; // x26
char *v25; // x0
char *v26; // x0
const char *v27; // x1
char *v28; // x0
char *v29; // x0
unsigned int *v30; // x1
int v31; // w2
cocos2d::CCString *v32; // x0
size_t v33; // x0
char *v34; // x27
int *p_m_unknown2; // x0
char *v36; // x0
unsigned int *v37; // x1
int v38; // w2
unsigned int *v39; // x1
int v40; // w2
unsigned int *v41; // x1
int v42; // w2
unsigned int *v43; // x1
unsigned int *p_timeoutForConnect; // x1
int timeoutForConnect; // w2
unsigned int *v46; // x1
int v47; // w2
unsigned int *v48; // x1
int v49; // w2
cocos2d::CCDictionary *v50; // [xsp+68h] [xbp+68h]
const char *v51; // [xsp+68h] [xbp+68h]
const char *v52; // [xsp+68h] [xbp+68h]
const char *v53; // [xsp+68h] [xbp+68h]
const char *v54; // [xsp+68h] [xbp+68h]
char *v55; // [xsp+80h] [xbp+80h] BYREF
const char *v56; // [xsp+88h] [xbp+88h] BYREF
const char *v57; // [xsp+90h] [xbp+90h] BYREF
cocos2d::extension::CCHttpClient *v58; // [xsp+98h] [xbp+98h] BYREF
const char *v59; // [xsp+A0h] [xbp+A0h] BYREF
const char *v60; // [xsp+A8h] [xbp+A8h] BYREF
std::string v61; // [xsp+B0h] [xbp+B0h] BYREF
v8 = (char *)GameLevelManager::getDeleteCommentKey(a1, a4, a2, a3);
m_friendReqAndUserBlocks = a1->m_friendReqAndUserBlocks;
sub_D153B8((int)&v61, v8);
v10 = cocos2d::CCDictionary::objectForKey(m_friendReqAndUserBlocks, &v61);
v11 = (char *)v61.m_data.m_data - 24;
if ( (__int64 *)v61.m_data.m_data - 3 != &qword_124B6B0 )
{
if ( &pthread_create )
{
v12 = (unsigned int *)((char *)v61.m_data.m_data - 8);
do
v13 = __ldaxr(v12);
while ( __stlxr(v13 - 1, v12) );
}
else
{
v13 = *((_DWORD *)v61.m_data.m_data - 2);
*((_DWORD *)v61.m_data.m_data - 2) = v13 - 1;
}
if ( v13 <= 0 )
operator delete(v11);
}
if ( !v10 )
{
v50 = a1->m_friendReqAndUserBlocks;
v14 = cocos2d::CCNode::create();
sub_D153B8((int)&v61, v8);
cocos2d::CCDictionary::setObject((int)v50, v14);
v15 = (char *)v61.m_data.m_data - 24;
if ( (__int64 *)v61.m_data.m_data - 3 != &qword_124B6B0 )
{
if ( &pthread_create )
{
v39 = (unsigned int *)((char *)v61.m_data.m_data - 8);
do
v40 = __ldaxr(v39);
while ( __stlxr(v40 - 1, v39) );
}
else
{
v40 = *((_DWORD *)v61.m_data.m_data - 2);
*((_DWORD *)v61.m_data.m_data - 2) = v40 - 1;
}
if ( v40 <= 0 )
operator delete(v15);
}
GameLevelManager::getBasePostString(a1, (__int64)&v55);
v16 = (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(v16);
v18 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&commentID=%i&secret=%s",
(const char *)(unsigned int)a2,
CString);
v51 = cocos2d::CCString::getCString(v18);
v19 = strlen(v51);
sub_D15FD4(&v55, v51, v19);
if ( a3 )
{
sub_D15FD4(&v55, "&cType=", 7);
v20 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)(unsigned int)a3);
v52 = cocos2d::CCString::getCString(v20);
v21 = strlen(v52);
sub_D15FD4(&v55, v52, v21);
sub_D15FD4(&v55, "&targetAccountID=", 17);
v22 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)(unsigned int)a4);
v53 = cocos2d::CCString::getCString(v22);
v23 = strlen(v53);
sub_D15FD4(&v55, v53, v23);
v24 = v55;
sub_D153B8((int)&v59, "https://www.boomlings.com/database/deleteGJAccComment20.php");
sub_D153B8((int)&v60, v24);
sub_D153B8((int)&v61, v8);
GameLevelManager::ProcessHttpRequest(a1, &v59, &v60, (cocos2d::extension::CCHttpClient **)&v61, 14);
v25 = (char *)v61.m_data.m_data - 24;
if ( (__int64 *)v61.m_data.m_data - 3 != &qword_124B6B0 )
{
if ( &pthread_create )
{
v46 = (unsigned int *)((char *)v61.m_data.m_data - 8);
do
v47 = __ldaxr(v46);
while ( __stlxr(v47 - 1, v46) );
}
else
{
v47 = *((_DWORD *)v61.m_data.m_data - 2);
*((_DWORD *)v61.m_data.m_data - 2) = v47 - 1;
}
if ( v47 <= 0 )
operator delete(v25);
}
v26 = (char *)(v60 - 24);
if ( v60 - 24 != (const char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v48 = (unsigned int *)(v60 - 8);
do
v49 = __ldaxr(v48);
while ( __stlxr(v49 - 1, v48) );
}
else
{
v49 = *((_DWORD *)v60 - 2);
*((_DWORD *)v60 - 2) = v49 - 1;
}
if ( v49 <= 0 )
operator delete(v26);
}
v27 = v59;
v28 = (char *)(v59 - 24);
if ( v59 - 24 == (const char *)&qword_124B6B0 )
goto LABEL_14;
if ( &pthread_create )
{
v43 = (unsigned int *)(v59 - 8);
do
v38 = __ldaxr(v43);
while ( __stlxr(v38 - 1, v43) );
goto LABEL_26;
}
}
else
{
sub_D15FD4(&v55, "&levelID=", 9);
v32 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)(unsigned int)a4);
v54 = cocos2d::CCString::getCString(v32);
v33 = strlen(v54);
sub_D15FD4(&v55, v54, v33);
v34 = v55;
sub_D153B8((int)&v56, "https://www.boomlings.com/database/deleteGJComment20.php");
sub_D153B8((int)&v57, v34);
sub_D153B8((int)&v58, v8);
GameLevelManager::ProcessHttpRequest(a1, &v56, &v57, &v58, 14);
p_m_unknown2 = &v58[-1].m_unknown2;
if ( &v58[-1].m_unknown2 != (int *)&qword_124B6B0 )
{
if ( &pthread_create )
{
p_timeoutForConnect = (unsigned int *)&v58[-1]._timeoutForConnect;
do
timeoutForConnect = __ldaxr(p_timeoutForConnect);
while ( __stlxr(timeoutForConnect - 1, p_timeoutForConnect) );
}
else
{
timeoutForConnect = v58[-1]._timeoutForConnect;
v58[-1]._timeoutForConnect = timeoutForConnect - 1;
}
if ( timeoutForConnect <= 0 )
operator delete(p_m_unknown2);
}
v36 = (char *)(v57 - 24);
if ( v57 - 24 != (const char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v41 = (unsigned int *)(v57 - 8);
do
v42 = __ldaxr(v41);
while ( __stlxr(v42 - 1, v41) );
}
else
{
v42 = *((_DWORD *)v57 - 2);
*((_DWORD *)v57 - 2) = v42 - 1;
}
if ( v42 <= 0 )
operator delete(v36);
}
v27 = v56;
v28 = (char *)(v56 - 24);
if ( v56 - 24 == (const char *)&qword_124B6B0 )
goto LABEL_14;
if ( &pthread_create )
{
v37 = (unsigned int *)(v56 - 8);
do
v38 = __ldaxr(v37);
while ( __stlxr(v38 - 1, v37) );
LABEL_26:
if ( v38 <= 0 )
operator delete(v28);
LABEL_14:
v29 = v55 - 24;
if ( v55 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v30 = (unsigned int *)(v55 - 8);
do
v31 = __ldaxr(v30);
while ( __stlxr(v31 - 1, v30) );
}
else
{
v31 = *((_DWORD *)v55 - 2);
*((_DWORD *)v55 - 2) = v31 - 1;
}
if ( v31 <= 0 )
operator delete(v29);
}
return;
}
}
v38 = *((_DWORD *)v27 - 2);
*((_DWORD *)v27 - 2) = v38 - 1;
goto LABEL_26;
}
}