//
// sub_10056FF80 from 0x10056ff80 to 0x1005703d0 (1104 bytes)
//
// 1 xrefs:
// > sub_1009A2EB0 @ 0x1009a3027
//
// 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
//
char __fastcall sub_10056FF80(__int64 a1, int a2, unsigned __int8 *a3)
{
__int64 v3; // r15
unsigned int v4; // eax
__int64 v5; // rax
const char *CString; // r12
size_t v7; // rax
std::string::size_type v8; // rbx
char *data; // r14
size_t v10; // r15
__int64 v11; // rbx
__int64 v13; // r13
void *v14; // r14
size_t v15; // rax
std::string::size_type v16; // rbx
char *v17; // r14
size_t v18; // r15
__int64 v19; // rax
__int64 v20; // rax
const std::string::value_type *v21; // rax
const char *v22; // r13
const char *v23; // r15
size_t v24; // rax
size_t v25; // r12
char *v26; // rbx
size_t v27; // r14
size_t v28; // rax
size_t v29; // r15
char *v30; // rbx
size_t v31; // r14
char v32; // [rsp+0h] [rbp-B0h]
char v33; // [rsp+0h] [rbp-B0h]
__int64 v34; // [rsp+10h] [rbp-A0h]
std::string v35; // [rsp+18h] [rbp-98h] BYREF
_QWORD v36[2]; // [rsp+30h] [rbp-80h] BYREF
void *v37; // [rsp+40h] [rbp-70h]
__int128 v38; // [rsp+48h] [rbp-68h] BYREF
void *v39; // [rsp+58h] [rbp-58h]
int v40; // [rsp+64h] [rbp-4Ch]
__int64 v41; // [rsp+68h] [rbp-48h]
std::string __dst[2]; // [rsp+70h] [rbp-40h] BYREF
if ( a2 <= 0 )
return 0;
v3 = a1;
v4 = *a3;
if ( (v4 & 1) != 0 )
{
if ( !*((_QWORD *)a3 + 1) )
return 0;
}
else if ( !(v4 >> 1) )
{
return 0;
}
v5 = sub_10088E820("adminClearRep_%i", v32);
CString = (const char *)cocos2d::CCString::getCString(v5);
v41 = *(_QWORD *)(a1 + 1088);
v7 = strlen(CString);
if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )
LABEL_57:
sub_100003630();
v8 = v7;
v40 = a2;
if ( v7 >= 0x17 )
{
v10 = 26;
if ( (v7 | 7) != 0x17 )
v10 = (v7 | 7) + 1;
data = (char *)operator new(v10);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)data;
__dst[0].__r_.__value_.__r.__words[0] = v10 + 1;
v3 = a1;
__dst[0].__r_.__value_.__l.__size_ = v8;
goto LABEL_13;
}
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v7);
data = __dst[0].__r_.__value_.__s.__data_;
if ( v7 )
LABEL_13:
memmove(data, CString, v8);
data[v8] = 0;
v11 = cocos2d::CCDictionary::objectForKey(v41, (char *)__dst);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst[0].__r_.__value_.__l.__data_);
if ( v11 )
return 0;
v13 = *(_QWORD *)(v3 + 1088);
v14 = cocos2d::CCNode::create();
v15 = strlen(CString);
if ( v15 >= 0xFFFFFFFFFFFFFFF8LL )
goto LABEL_57;
v16 = v15;
v41 = (__int64)v14;
v34 = v3;
if ( v15 >= 0x17 )
{
v18 = 26;
if ( (v15 | 7) != 0x17 )
v18 = (v15 | 7) + 1;
v17 = (char *)operator new(v18);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v17;
__dst[0].__r_.__value_.__r.__words[0] = v18 + 1;
__dst[0].__r_.__value_.__l.__size_ = v16;
goto LABEL_25;
}
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v15);
v17 = __dst[0].__r_.__value_.__s.__data_;
if ( v15 )
LABEL_25:
memmove(v17, CString, v16);
v17[v16] = 0;
cocos2d::CCDictionary::setObject(v13, v41, (char *)__dst);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst[0].__r_.__value_.__l.__data_);
GameLevelManager::getBasePostString(__dst);
v19 = sub_10088E820("%c%s%s%c%c%s", (char)"7");
cocos2d::CCString::getCString(v19);
v20 = sub_10088E820("&targetAccountID=%i&items=%s&secret=%s", v33);
v21 = (const std::string::value_type *)cocos2d::CCString::getCString(v20);
std::string::append(__dst, v21);
v35.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x48u);
v35.__r_.__value_.__r.__words[0] = 73;
v35.__r_.__value_.__l.__size_ = 64;
strcpy(v35.__r_.__value_.__l.__data_, "https://www.boomlings.com/database/adminClearReportedContent.php");
v22 = CString;
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
v23 = __dst[0].__r_.__value_.__l.__data_;
else
v23 = __dst[0].__r_.__value_.__s.__data_;
v24 = strlen(v23);
if ( v24 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v25 = v24;
if ( v24 >= 0x17 )
{
v27 = 26;
if ( (v24 | 7) != 0x17 )
v27 = (v24 | 7) + 1;
v26 = (char *)operator new(v27);
v37 = v26;
v36[0] = v27 | 1;
v36[1] = v25;
goto LABEL_38;
}
LOBYTE(v36[0]) = 2 * v24;
v26 = (char *)v36 + 1;
if ( v24 )
LABEL_38:
memmove(v26, v23, v25);
v26[v25] = 0;
v28 = strlen(v22);
if ( v28 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v29 = v28;
if ( v28 >= 0x17 )
{
v31 = 26;
if ( (v28 | 7) != 0x17 )
v31 = (v28 | 7) + 1;
v30 = (char *)operator new(v31);
v39 = v30;
*(_QWORD *)&v38 = v31 | 1;
*((_QWORD *)&v38 + 1) = v29;
goto LABEL_46;
}
LOBYTE(v38) = 2 * v28;
v30 = (char *)&v38 + 1;
if ( v28 )
LABEL_46:
memmove(v30, v22, v29);
v30[v29] = 0;
GameLevelManager::ProcessHttpRequest(v34, &v35, (__int64)v36, &v38, 0x56u);
if ( (v38 & 1) != 0 )
{
operator delete(v39);
if ( (v36[0] & 1) == 0 )
{
LABEL_49:
if ( (*(_BYTE *)&v35.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_50;
LABEL_55:
operator delete(v35.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) == 0 )
return 1;
goto LABEL_51;
}
}
else if ( (v36[0] & 1) == 0 )
{
goto LABEL_49;
}
operator delete(v37);
if ( (*(_BYTE *)&v35.__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_55;
LABEL_50:
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
LABEL_51:
operator delete(__dst[0].__r_.__value_.__l.__data_);
return 1;
}