//
// GameLevelManager::deleteUserMessages from 0x822f8c to 0x8233b4 (1064 bytes)
//
// 4 xrefs:
// > GJMessageCell::FLAlert_Clicked @ 0x73ba4c
// > GJMessagePopup::FLAlert_Clicked @ 0xa28b38
// > MessagesProfilePage::deleteSelected @ 0xa4a804
// > ??> @ 0x4cb10
//
// 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 12:55:02 +0000
//
__int64 __fastcall GameLevelManager::deleteUserMessages(
GameLevelManager *this,
GJUserMessage *a2,
cocos2d::CCArray *a3,
unsigned __int8 a4)
{
int v6; // w24
char *v8; // x0
unsigned int v9; // w20
__int64 v11; // x25
cocos2d::CCObject *v12; // x0
cocos2d::CCString *v13; // x0
const char *CString; // x0
cocos2d::CCString *v15; // x0
size_t v16; // x0
cocos2d::CCString *v17; // x0
size_t v18; // x0
const char *v19; // x1
size_t v20; // x0
unsigned int i; // w21
__int64 v22; // x22
cocos2d::CCString *v23; // x0
size_t v24; // x0
char *v25; // [xsp+58h] [xbp+58h]
char *v26; // [xsp+58h] [xbp+58h]
char *v27; // [xsp+58h] [xbp+58h]
char *v28; // [xsp+58h] [xbp+58h]
__int64 v29; // [xsp+60h] [xbp+60h] BYREF
size_t v30; // [xsp+68h] [xbp+68h]
void *v31; // [xsp+70h] [xbp+70h]
__int64 v32[2]; // [xsp+78h] [xbp+78h] BYREF
void *v33; // [xsp+88h] [xbp+88h]
__int64 v34[2]; // [xsp+90h] [xbp+90h] BYREF
void *v35; // [xsp+A0h] [xbp+A0h]
__int64 v36[2]; // [xsp+A8h] [xbp+A8h] BYREF
void *v37; // [xsp+B8h] [xbp+B8h]
__int64 v38; // [xsp+C0h] [xbp+C0h] BYREF
size_t v39; // [xsp+C8h] [xbp+C8h]
void *v40; // [xsp+D0h] [xbp+D0h]
v6 = a4;
v29 = 0;
v30 = 0;
v31 = nullptr;
std::string::__init(&v29, &byte_11B8890, 0);
if ( !a3 )
{
if ( !a2 )
goto LABEL_6;
goto LABEL_4;
}
if ( (unsigned int)cocos2d::CCArray::count(a3) == 1 )
{
a2 = (GJUserMessage *)cocos2d::CCArray::objectAtIndex(a3, 0);
a3 = nullptr;
if ( !a2 )
goto LABEL_6;
goto LABEL_4;
}
if ( a2 )
{
LABEL_4:
v8 = (char *)GameLevelManager::getDeleteMessageKey(this, (const char *)*((unsigned int *)a2 + 79), v6);
goto LABEL_5;
}
v8 = (char *)GameLevelManager::getDeleteMessageKey(this, (const char *)0xFFFFFFFFLL, v6);
LABEL_5:
std::string::assign(&v29, v8);
if ( cocos2d::CCDictionary::objectForKey(*((_QWORD *)this + 136), &v29) )
{
LABEL_6:
v9 = 0;
goto LABEL_7;
}
v11 = *((_QWORD *)this + 136);
v12 = (cocos2d::CCObject *)cocos2d::CCNode::create(nullptr);
cocos2d::CCDictionary::setObject(v11, v12);
GameLevelManager::getBasePostString(v32);
v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)off_50 + 7,
"mfd",
"2893",
103,
98,
"7");
CString = (const char *)cocos2d::CCString::getCString(v13);
v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"&secret=%s", CString);
v25 = (char *)cocos2d::CCString::getCString(v15);
v16 = strlen(v25);
std::string::append((__int64)v32, v25, v16);
if ( v6 )
std::string::append((__int64)v32, "&isSender=1", 0xBu);
if ( a2 )
{
std::string::append((__int64)v32, "&messageID=", 0xBu);
v17 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)*((unsigned int *)a2 + 79));
v26 = (char *)cocos2d::CCString::getCString(v17);
v18 = strlen(v26);
std::string::append((__int64)v32, v26, v18);
}
else
{
std::string::append((__int64)v32, "&messages=", 0xAu);
for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(a3); ++i )
{
v22 = cocos2d::CCArray::objectAtIndex(a3, i);
if ( i )
std::string::append((__int64)v32, &byte_1169BE0, 1u);
v23 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)*(unsigned int *)(v22 + 316));
v28 = (char *)cocos2d::CCString::getCString(v23);
v24 = strlen(v28);
std::string::append((__int64)v32, v28, v24);
}
}
v34[0] = 0;
v34[1] = 0;
v35 = nullptr;
std::string::__init(v34, "https://www.boomlings.com/database/deleteGJMessages20.php", 0x39u);
v19 = (char *)v32 + 1;
if ( (v32[0] & 1) != 0 )
v19 = (const char *)v33;
v27 = (char *)v19;
v36[0] = 0;
v36[1] = 0;
v37 = nullptr;
v20 = strlen(v19);
std::string::__init(v36, v27, v20);
v38 = 0;
v39 = 0;
v40 = nullptr;
if ( (v29 & 1) != 0 )
{
std::string::__init(&v38, v31, v30);
}
else
{
v38 = v29;
v39 = v30;
v40 = v31;
}
GameLevelManager::ProcessHttpRequest(this, v34, (__int64)v36, (char *)&v38, 45);
if ( (v38 & 1) != 0 )
operator delete(v40);
if ( (v36[0] & 1) != 0 )
operator delete(v37);
if ( (v34[0] & 1) != 0 )
operator delete(v35);
v9 = 1;
if ( (v32[0] & 1) != 0 )
operator delete(v33);
LABEL_7:
if ( (v29 & 1) != 0 )
operator delete(v31);
return v9;
}