//
// sub_1000BF83C from 0x1000bf83c to 0x1000bfb0c (720 bytes)
//
// 3 xrefs:
// > GJMessageCell::FLAlert_Clicked @ 0x10013b1e0
// > sub_100264D44 @ 0x100264e24
// > GJMessagePopup::FLAlert_Clicked @ 0x10037a9ec
//
// This function is hookable on this platform (idp: arm, 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 10:58:46 +0000
//
__int64 __fastcall sub_1000BF83C(__int64 a1, __int64 a2, __int64 a3, int a4)
{
int v8; // w8
__int64 v9; // x0
const std::string::value_type *CString; // x0
__int64 v11; // x19
__int64 v12; // x23
__int64 v13; // x0
__int64 v14; // x0
__int64 v15; // x0
const char *v16; // x0
__int64 v17; // x0
const std::string::value_type *v18; // x0
__int64 v19; // x0
const std::string::value_type *v20; // x0
std::string *v21; // x1
__int64 i; // x21
__int64 v23; // x24
__int64 v24; // x0
const std::string::value_type *v25; // x0
std::string __p; // [xsp+30h] [xbp-B0h] BYREF
void *v28[2]; // [xsp+50h] [xbp-90h] BYREF
char v29; // [xsp+67h] [xbp-79h]
std::string v30; // [xsp+68h] [xbp-78h] BYREF
std::string v31; // [xsp+80h] [xbp-60h] BYREF
std::string v32; // [xsp+98h] [xbp-48h] BYREF
sub_100009900(&v32, "");
if ( a3 && (unsigned int)sub_1002E757C(a3) == 1 )
{
a2 = sub_1002E75A0(a3, 0);
a3 = 0;
}
if ( a2 )
{
v8 = *(_DWORD *)(a2 + 316);
}
else
{
if ( !a3 )
{
LABEL_9:
v11 = 0;
goto LABEL_34;
}
v8 = -1;
}
v9 = sub_1003065B0("delMsg_%i_%i", v8, a4);
CString = (const std::string::value_type *)cocos2d::CCString::getCString(v9);
std::string::assign(&v32, CString);
if ( cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 1088), &v32) )
goto LABEL_9;
v12 = *(_QWORD *)(a1 + 1088);
v13 = cocos2d::CCNode::create(0);
v14 = cocos2d::CCDictionary::setObject(v12, v13, &v32);
GameLevelManager::getBasePostString(v14, &v31);
v15 = sub_1003065B0("%c%s%s%c%c%s", 87, "mfd", "2893", 103, 98, "7");
v16 = (const char *)cocos2d::CCString::getCString(v15);
v17 = sub_1003065B0("&secret=%s", v16);
v18 = (const std::string::value_type *)cocos2d::CCString::getCString(v17);
std::string::append(&v31, v18);
if ( a4 )
std::string::append(&v31, "&isSender=1");
if ( a2 )
{
std::string::append(&v31, "&messageID=");
v19 = sub_1003065B0("%i", *(_DWORD *)(a2 + 316));
v20 = (const std::string::value_type *)cocos2d::CCString::getCString(v19);
std::string::append(&v31, v20);
}
else
{
std::string::append(&v31, "&messages=");
for ( i = 0; (unsigned int)i < (unsigned int)sub_1002E757C(a3); i = (unsigned int)(i + 1) )
{
v23 = sub_1002E75A0(a3, i);
if ( (_DWORD)i )
std::string::append(&v31, ",");
v24 = sub_1003065B0("%i", *(_DWORD *)(v23 + 316));
v25 = (const std::string::value_type *)cocos2d::CCString::getCString(v24);
std::string::append(&v31, v25);
}
}
sub_100009900(&v30, "https://www.boomlings.com/database/deleteGJMessages20.php");
if ( (v31.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v21 = &v31;
else
v21 = (std::string *)v31.__r_.__value_.__r.__words[0];
sub_100009900(v28, (char *)v21);
if ( SHIBYTE(v32.__r_.__value_.__r.__words[2]) < 0 )
sub_1000097D0(&__p, v32.__r_.__value_.__l.__data_, v32.__r_.__value_.__l.__size_);
else
__p = v32;
GameLevelManager::ProcessHttpRequest(a1, &v30, (char *)v28, (const std::string::value_type *)&__p, 45);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
if ( v29 < 0 )
operator delete(v28[0]);
if ( SHIBYTE(v30.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v30.__r_.__value_.__l.__data_);
if ( SHIBYTE(v31.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v31.__r_.__value_.__l.__data_);
v11 = 1;
LABEL_34:
if ( SHIBYTE(v32.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v32.__r_.__value_.__l.__data_);
return v11;
}