//
// sub_100570480 from 0x100570480 to 0x100570706 (646 bytes)
//
// 1 xrefs:
// > ReportQueuePopup::requestPage @ 0x10096935b
//
// 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_100570480(__int64 a1, int a2)
{
__int64 v3; // rdi
__int64 v4; // r13
__int64 v6; // r13
void *v7; // rax
__int64 v8; // rax
__int64 v9; // rax
const std::string::value_type *CString; // rax
const char *data; // r14
size_t v12; // rax
size_t v13; // r15
char *v14; // r12
size_t v15; // r13
char v16; // [rsp+0h] [rbp-90h]
std::string v17; // [rsp+8h] [rbp-88h] BYREF
_BYTE v18[24]; // [rsp+20h] [rbp-70h] BYREF
_QWORD __dst[2]; // [rsp+38h] [rbp-58h] BYREF
void *v20; // [rsp+48h] [rbp-48h]
std::string v21; // [rsp+50h] [rbp-40h] BYREF
if ( a2 < 0 )
return 0;
v3 = *(_QWORD *)(a1 + 1088);
strcpy((char *)&v21, " adminReportQueue");
v4 = cocos2d::CCDictionary::objectForKey(v3, (char *)&v21);
if ( (*(_BYTE *)&v21.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v21.__r_.__value_.__l.__data_);
if ( v4 )
return 0;
v6 = *(_QWORD *)(a1 + 1088);
v7 = cocos2d::CCNode::create();
strcpy((char *)&v21, " adminReportQueue");
cocos2d::CCDictionary::setObject(v6, (__int64)v7, (char *)&v21);
if ( (*(_BYTE *)&v21.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v21.__r_.__value_.__l.__data_);
GameLevelManager::getBasePostString(&v21);
v8 = sub_10088E820("%c%s%s%c%c%s", (char)"7");
cocos2d::CCString::getCString(v8);
v9 = sub_10088E820("&page=%i&sort=%i&mode=%i&flags=1&secret=%s", v16);
CString = (const std::string::value_type *)cocos2d::CCString::getCString(v9);
std::string::append(&v21, CString);
v17.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x40u);
v17.__r_.__value_.__r.__words[0] = 65;
v17.__r_.__value_.__l.__size_ = 58;
strcpy(v17.__r_.__value_.__l.__data_, "https://www.boomlings.com/database/adminGetReportQueue.php");
if ( (*(_BYTE *)&v21.__r_.__value_.__s.0 & 1) != 0 )
data = v21.__r_.__value_.__l.__data_;
else
data = v21.__r_.__value_.__s.__data_;
v12 = strlen(data);
if ( v12 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v13 = v12;
if ( v12 >= 0x17 )
{
v15 = 26;
if ( (v12 | 7) != 0x17 )
v15 = (v12 | 7) + 1;
v14 = (char *)operator new(v15);
v20 = v14;
__dst[0] = v15 | 1;
__dst[1] = v13;
goto LABEL_18;
}
LOBYTE(__dst[0]) = 2 * v12;
v14 = (char *)__dst + 1;
if ( v12 )
LABEL_18:
memmove(v14, data, v13);
v14[v13] = 0;
strcpy(v18, " adminReportQueue");
GameLevelManager::ProcessHttpRequest(a1, &v17, (__int64)__dst, (__int128 *)v18, 0x57u);
if ( (v18[0] & 1) != 0 )
{
operator delete(*(void **)&v18[16]);
if ( (__dst[0] & 1) == 0 )
{
LABEL_21:
if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_22;
LABEL_27:
operator delete(v17.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v21.__r_.__value_.__s.0 & 1) == 0 )
return 1;
goto LABEL_23;
}
}
else if ( (__dst[0] & 1) == 0 )
{
goto LABEL_21;
}
operator delete(v20);
if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_27;
LABEL_22:
if ( (*(_BYTE *)&v21.__r_.__value_.__s.0 & 1) != 0 )
LABEL_23:
operator delete(v21.__r_.__value_.__l.__data_);
return 1;
}