//
// sub_10056E450 from 0x10056e450 to 0x10056e86e (1054 bytes)
//
// 1 xrefs:
// > sub_100897D80 @ 0x100897fc1
//
// 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 sub_10056E450(__int64 a1, unsigned int a2, _QWORD *a3, std::string *a4, _QWORD *a5)
{
int v5; // eax
__int64 v10; // rdi
__int64 v11; // rbx
__int64 v12; // rbx
void *v13; // rax
__int64 v14; // r12
unsigned __int64 v15; // r14
__int64 v16; // rax
const std::string::value_type *CString; // rax
__int64 v18; // rax
const std::string::value_type *v19; // rax
__int64 v20; // rax
const std::string::value_type *v21; // rax
const std::string::value_type *data; // rsi
std::string::size_type size; // rdx
const char *v24; // rbx
size_t v25; // rax
size_t v26; // r14
char *v27; // r15
size_t v28; // r12
char v29; // [rsp+0h] [rbp-D0h]
char v30; // [rsp+0h] [rbp-D0h]
std::string *v31; // [rsp+18h] [rbp-B8h]
__int64 v32; // [rsp+20h] [rbp-B0h]
std::string v33; // [rsp+28h] [rbp-A8h] BYREF
_BYTE v34[24]; // [rsp+40h] [rbp-90h] BYREF
_QWORD __dst[2]; // [rsp+58h] [rbp-78h] BYREF
void *v36; // [rsp+68h] [rbp-68h]
unsigned int v37; // [rsp+74h] [rbp-5Ch]
std::string v38; // [rsp+78h] [rbp-58h] BYREF
std::string v39; // [rsp+90h] [rbp-40h] BYREF
if ( *a3 == a3[1] )
return;
if ( a2 > 7 )
return;
v5 = 195;
if ( !_bittest(&v5, a2) )
return;
v37 = a2;
v10 = *(_QWORD *)(a1 + 1088);
strcpy((char *)&v39, "$bulkDeleteComments");
v11 = cocos2d::CCDictionary::objectForKey(v10, (char *)&v39);
if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v39.__r_.__value_.__l.__data_);
if ( v11 )
return;
v12 = *(_QWORD *)(a1 + 1088);
v13 = cocos2d::CCNode::create();
strcpy((char *)&v39, "$bulkDeleteComments");
cocos2d::CCDictionary::setObject(v12, (__int64)v13, (char *)&v39);
v31 = a4;
v32 = a1;
if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v39.__r_.__value_.__l.__data_);
memset(&v39, 0, sizeof(v39));
if ( a3[1] != *a3 )
{
v14 = 8;
v15 = 0;
while ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) == 0 )
{
if ( *(_BYTE *)&v39.__r_.__value_.__l.0 >> 1 )
goto LABEL_15;
LABEL_16:
v16 = sub_10088E820("%i,%i", v29);
CString = (const std::string::value_type *)cocos2d::CCString::getCString(v16);
std::string::append(&v39, CString);
++v15;
v14 += 12;
if ( v15 >= 0xAAAAAAAAAAAAAAABLL * ((__int64)(a3[1] - *a3) >> 2) )
goto LABEL_17;
}
if ( !v39.__r_.__value_.__l.__size_ )
goto LABEL_16;
LABEL_15:
std::string::append(&v39, ";");
goto LABEL_16;
}
LABEL_17:
GameLevelManager::getBasePostString(&v38);
std::string::append(&v38, "&secret=");
v18 = sub_10088E820("%c%s%s%c%c%s", (char)"7");
v19 = (const std::string::value_type *)cocos2d::CCString::getCString(v18);
std::string::append(&v38, v19);
v20 = sub_10088E820("&cType=%i", v30);
v21 = (const std::string::value_type *)cocos2d::CCString::getCString(v20);
std::string::append(&v38, v21);
std::string::append(&v38, "&items=");
if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) != 0 )
{
data = v39.__r_.__value_.__l.__data_;
size = v39.__r_.__value_.__l.__size_;
}
else
{
size = *(_BYTE *)&v39.__r_.__value_.__l.0 >> 1;
data = v39.__r_.__value_.__s.__data_;
}
std::string::append(&v38, data, size);
GameLevelManager::appendModReason((__int64)&v38, &v38, v31, a5);
if ( (*(_BYTE *)&v38.__r_.__value_.__s.0 & 1) != 0 )
v24 = v38.__r_.__value_.__l.__data_;
else
v24 = v38.__r_.__value_.__s.__data_;
v33.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x38u);
v33.__r_.__value_.__r.__words[0] = 57;
v33.__r_.__value_.__l.__size_ = 55;
strcpy(v33.__r_.__value_.__l.__data_, "https://www.boomlings.com/database/deleteGJComments.php");
v25 = strlen(v24);
if ( v25 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v26 = v25;
if ( v25 >= 0x17 )
{
v28 = 26;
if ( (v25 | 7) != 0x17 )
v28 = (v25 | 7) + 1;
v27 = (char *)operator new(v28);
v36 = v27;
__dst[0] = v28 | 1;
__dst[1] = v26;
goto LABEL_30;
}
LOBYTE(__dst[0]) = 2 * v25;
v27 = (char *)__dst + 1;
if ( v25 )
LABEL_30:
memmove(v27, v24, v26);
v27[v26] = 0;
strcpy(v34, "$bulkDeleteComments");
GameLevelManager::ProcessHttpRequest(v32, &v33, (__int64)__dst, (__int128 *)v34, 0xFu);
if ( (v34[0] & 1) != 0 )
{
operator delete(*(void **)&v34[16]);
if ( (__dst[0] & 1) == 0 )
{
LABEL_33:
if ( (*(_BYTE *)&v33.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_34;
LABEL_40:
operator delete(v33.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v38.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_35:
if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) == 0 )
return;
goto LABEL_36;
}
goto LABEL_41;
}
}
else if ( (__dst[0] & 1) == 0 )
{
goto LABEL_33;
}
operator delete(v36);
if ( (*(_BYTE *)&v33.__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_40;
LABEL_34:
if ( (*(_BYTE *)&v38.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_35;
LABEL_41:
operator delete(v38.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v39.__r_.__value_.__s.0 & 1) != 0 )
LABEL_36:
operator delete(v39.__r_.__value_.__l.__data_);
}