//
// GameLevelManager::deleteComment from 0x14015f070 to 0x14015f542 (1234 bytes)
//
// 2 xrefs:
// > CommentCell::FLAlert_Clicked @ 0x1400b82bc
// > ??> @ 0x1406cab00
//
// 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
//
// Hidden C++ exception states: #wind=6
void GameLevelManager::deleteComment(GameLevelManager *a1, int a2, CommentType a3, int a4)
{
cocos2d::CCString *v8; // rax
const char *CString; // rax
const char *v10; // rdi
size_t v11; // rbx
size_t v12; // r8
__int64 v13; // rsi
void *v14; // rcx
size_t v15; // r8
__int64 v16; // rax
__int64 v17; // rcx
void *v18; // rcx
cocos2d::CCString *v19; // rax
const char *v20; // rax
cocos2d::CCString *v21; // rax
char *v22; // rax
size_t v23; // r8
cocos2d::CCString *v24; // rax
char *v25; // rax
size_t v26; // r8
cocos2d::CCString *v27; // rax
char *v28; // rax
size_t v29; // r8
cocos2d::CCString *v30; // rax
_QWORD *v31; // rsi
size_t v32; // r8
const char *v33; // r9
const char *v34; // r8
__int128 v35; // [rsp+40h] [rbp-89h] BYREF
__int64 v36; // [rsp+50h] [rbp-79h]
__int64 v37; // [rsp+58h] [rbp-71h]
__int128 v38; // [rsp+60h] [rbp-69h] BYREF
__int64 v39; // [rsp+70h] [rbp-59h]
__int64 v40; // [rsp+78h] [rbp-51h]
__int128 *v41; // [rsp+80h] [rbp-49h]
__int128 *v42; // [rsp+88h] [rbp-41h]
__int128 *v43; // [rsp+90h] [rbp-39h]
void *Block[2]; // [rsp+98h] [rbp-31h] BYREF
__int128 v45; // [rsp+A8h] [rbp-21h]
_QWORD Src[4]; // [rsp+B8h] [rbp-11h] BYREF
v8 = cocos2d::CCString::createWithFormat("delcomment_%i_%i_%i", a4, a2, a3);
CString = cocos2d::CCString::getCString(v8);
v10 = CString;
*(_OWORD *)Block = 0;
v45 = 0;
v11 = -1;
v12 = -1;
do
++v12;
while ( CString[v12] );
sub_14003A930(Block, CString, v12);
v13 = cocos2d::CCDictionary::objectForKey(a1->m_friendReqAndUserBlocks, Block);
if ( *((_QWORD *)&v45 + 1) > 0xFu )
{
v14 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v45 + 1) + 1LL) >= 0x1000 )
{
v14 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v14 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v14);
}
if ( !v13 )
{
*(_OWORD *)Block = 0;
v45 = 0;
v15 = -1;
do
++v15;
while ( v10[v15] );
sub_14003A930(Block, v10, v15);
v16 = cocos2d::CCNode::create();
cocos2d::CCDictionary::setObject(a1->m_friendReqAndUserBlocks, v16, Block);
if ( *((_QWORD *)&v45 + 1) > 0xFu )
{
v18 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v45 + 1) + 1LL) >= 0x1000 )
{
v18 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v18 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v18);
}
GameLevelManager::getBasePostString(v17, Src);
v19 = cocos2d::CCString::createWithFormat("%c%s%s%c%c%s", 87, "mfd", "2893", 103, 98, (const char *)&word_140531E88);
v20 = cocos2d::CCString::getCString(v19);
v21 = cocos2d::CCString::createWithFormat("&commentID=%i&secret=%s", a2, v20);
v22 = (char *)cocos2d::CCString::getCString(v21);
v23 = -1;
do
++v23;
while ( v22[v23] );
sub_140041270(Src, v22, v23);
if ( a3 )
{
sub_140041270(Src, "&cType=", 7u);
v27 = cocos2d::CCString::createWithFormat("%i", a3);
v28 = (char *)cocos2d::CCString::getCString(v27);
v29 = -1;
do
++v29;
while ( v28[v29] );
sub_140041270(Src, v28, v29);
sub_140041270(Src, "&targetAccountID=", 0x11u);
v30 = cocos2d::CCString::createWithFormat("%i", a4);
v25 = (char *)cocos2d::CCString::getCString(v30);
v26 = -1;
do
++v26;
while ( v25[v26] );
}
else
{
sub_140041270(Src, "&levelID=", 9u);
v24 = cocos2d::CCString::createWithFormat("%i", a4);
v25 = (char *)cocos2d::CCString::getCString(v24);
v26 = -1;
do
++v26;
while ( v25[v26] );
}
sub_140041270(Src, v25, v26);
v31 = Src;
if ( Src[3] > 0xFu )
v31 = (_QWORD *)Src[0];
v32 = -1;
do
++v32;
while ( v10[v32] );
if ( a3 )
{
v43 = &v38;
v42 = &v35;
v38 = 0;
v39 = 0;
v40 = 0;
sub_14003A930(&v38, v10, v32);
v35 = 0;
v36 = 0;
v37 = 0;
do
++v11;
while ( *((_BYTE *)v31 + v11) );
sub_14003A930(&v35, v31, v11);
*(_OWORD *)Block = 0;
*(_QWORD *)&v45 = 0;
*((_QWORD *)&v45 + 1) = 15;
Block[0] = sub_14003AA10(0x40u);
*(_QWORD *)&v45 = 59;
*((_QWORD *)&v45 + 1) = 63;
strcpy((char *)Block[0], "https://www.boomlings.com/database/deleteGJAccComment20.php");
v33 = (const char *)&v38;
v34 = (const char *)&v35;
}
else
{
v41 = &v35;
v42 = &v38;
v35 = 0;
v36 = 0;
v37 = 0;
sub_14003A930(&v35, v10, v32);
v38 = 0;
v39 = 0;
v40 = 0;
do
++v11;
while ( *((_BYTE *)v31 + v11) );
sub_14003A930(&v38, v31, v11);
*(_OWORD *)Block = 0;
*(_QWORD *)&v45 = 0;
*((_QWORD *)&v45 + 1) = 15;
Block[0] = sub_14003AA10(0x40u);
*(_QWORD *)&v45 = 56;
*((_QWORD *)&v45 + 1) = 63;
strcpy((char *)Block[0], "https://www.boomlings.com/database/deleteGJComment20.php");
v33 = (const char *)&v35;
v34 = (const char *)&v38;
}
GameLevelManager::ProcessHttpRequest(a1, (__int64)Block, v34, v33, 14);
sub_14003A830((__int64)Src);
}
}