//
// GameLevelManager::deleteFriendRequests from 0x4b9b3c to 0x4b9d82 (582 bytes)
//
// 3 xrefs:
// > GameLevelManager::deleteSentFriendRequest @ 0x4b9db4
// > FriendRequestPopup::onRemove @ 0x5d9c32
// > FRequestProfilePage::deleteSelected @ 0x5f1a26
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:50:14 +0000
//
int __fastcall GameLevelManager::deleteFriendRequests(
GameLevelManager *this,
const char *a2,
cocos2d::CCArray *a3,
int a4)
{
const char *v5; // r8
cocos2d::CCArray *v7; // r5
int v8; // r0
cocos2d::CCString *v9; // r0
const char *CString; // r0
int v11; // r6
const char *v12; // r7
size_t v13; // r0
int v14; // r6
cocos2d::CCNode *v15; // r0
const char **v16; // r0
const char **v17; // r11
size_t v18; // r0
cocos2d::CCString *v19; // r0
int v20; // r0
cocos2d::CCString *v21; // r0
char *v22; // r0
unsigned int i; // r8
cocos2d::CCString *v24; // r0
char *v25; // r0
size_t v26; // r0
size_t v27; // r0
char *v29; // [sp+14h] [bp-40h]
char *v30[3]; // [sp+1Ch] [bp-38h] BYREF
int v31[3]; // [sp+28h] [bp-2Ch] BYREF
int v32[3]; // [sp+34h] [bp-20h] BYREF
int v33; // [sp+40h] [bp-14h] BYREF
int v34; // [sp+44h] [bp-10h]
int v35; // [sp+48h] [bp-Ch]
v5 = a2;
v7 = a3;
if ( a3 )
{
if ( cocos2d::CCArray::count(a3) == 1 )
{
v8 = cocos2d::CCArray::objectAtIndex(v7, 0);
v5 = *(const char **)(v8 + 296);
if ( (int)v5 <= 0 )
return 0;
v7 = nullptr;
v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"delFriendReq_%i_%i",
*(const char **)(v8 + 296),
a4);
}
else
{
if ( (int)v5 <= 0 && !cocos2d::CCArray::count(v7) )
return 0;
v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"delFriendReq_%i_%i",
(const char *)0xFFFFFFFF,
a4);
}
}
else
{
if ( (int)a2 <= 0 )
return 0;
v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"delFriendReq_%i_%i", a2, a4);
}
CString = (const char *)cocos2d::CCString::getCString(v9);
v33 = 0;
v34 = 0;
v35 = 0;
v11 = *((_DWORD *)this + 187);
v12 = CString;
v13 = strlen(CString);
std::string::__init(&v33, v12, v13);
v14 = cocos2d::CCDictionary::objectForKey(v11, &v33);
v15 = (cocos2d::CCNode *)std::string::~string((int)&v33);
if ( v14 )
return 0;
v29 = *((char **)this + 187);
v16 = (const char **)cocos2d::CCNode::create(v15);
v33 = 0;
v34 = 0;
v35 = 0;
v17 = v16;
v18 = strlen(v12);
std::string::__init(&v33, v12, v18);
cocos2d::CCDictionary::setObject((int)v29, (cocos2d::CCObject *)v17);
std::string::~string((int)&v33);
GameLevelManager::getBasePostString((GameLevelManager *)v30);
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&dword_54 + 3,
"mfd",
"2893",
103,
98,
&a1i2r3e45s789g[9]);
v20 = cocos2d::CCString::getCString(v19);
v21 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&targetAccountID=%i&isSender=%i&secret=%s",
v5,
a4,
v20);
v22 = (char *)cocos2d::CCString::getCString(v21);
std::string::append(v30, v22);
if ( v7 )
{
std::string::append(v30, "&accounts=");
for ( i = 0; i < cocos2d::CCArray::count(v7); ++i )
{
v17 = (const char **)cocos2d::CCArray::objectAtIndex(v7, i);
if ( i )
std::string::append(v30, ",");
v24 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v17[74]);
v25 = (char *)cocos2d::CCString::getCString(v24);
std::string::append(v30, v25);
}
}
memset(v31, 0, sizeof(v31));
std::string::__init(v31, "https://www.boomlings.com/database/deleteGJFriendRequests20.php", 0x3Fu);
v32[0] = 0;
v32[1] = 0;
if ( ((int)v30[0] & 1) == 0 )
v17 = (const char **)((char *)v30 + 1);
v32[2] = 0;
if ( ((int)v30[0] & 1) != 0 )
v17 = (const char **)v30[2];
v26 = strlen((const char *)v17);
std::string::__init(v32, v17, v26);
v33 = 0;
v34 = 0;
v35 = 0;
v27 = strlen(v12);
std::string::__init(&v33, v12, v27);
GameLevelManager::ProcessHttpRequest(this, v31, (int)v32, (int)&v33, 36);
std::string::~string((int)&v33);
std::string::~string((int)v32);
std::string::~string((int)v31);
std::string::~string((int)v30);
return 1;
}