//
// GameLevelManager::removeFriend from 0x4ba1cc to 0x4ba35e (402 bytes)
//
// 1 xrefs:
// > ProfilePage::FLAlert_Clicked @ 0x5f70e6
//
// 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::removeFriend(GameLevelManager *this, const char *a2)
{
cocos2d::CCString *v5; // r0
const char *CString; // r0
int v7; // r5
const char *v8; // r7
size_t v9; // r0
int v10; // r5
cocos2d::CCNode *v11; // r0
int v12; // r10
cocos2d::CCObject *v13; // r0
cocos2d::CCObject *v14; // r8
size_t v15; // r0
cocos2d::CCString *v16; // r0
int v17; // r0
cocos2d::CCString *v18; // r0
char *v19; // r0
const char *v20; // r1
size_t v21; // r0
size_t v22; // r0
const char *v23; // [sp+14h] [bp-40h]
char *v24[3]; // [sp+1Ch] [bp-38h] BYREF
int v25[3]; // [sp+28h] [bp-2Ch] BYREF
int v26[3]; // [sp+34h] [bp-20h] BYREF
int v27; // [sp+40h] [bp-14h] BYREF
int v28; // [sp+44h] [bp-10h]
int v29; // [sp+48h] [bp-Ch]
if ( (int)a2 <= 0 )
return 0;
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"removeFriend_%i", a2);
CString = (const char *)cocos2d::CCString::getCString(v5);
v27 = 0;
v28 = 0;
v29 = 0;
v7 = *((_DWORD *)this + 187);
v8 = CString;
v9 = strlen(CString);
std::string::__init(&v27, v8, v9);
v10 = cocos2d::CCDictionary::objectForKey(v7, &v27);
v11 = (cocos2d::CCNode *)std::string::~string((int)&v27);
if ( v10 )
return 0;
v12 = *((_DWORD *)this + 187);
v13 = (cocos2d::CCObject *)cocos2d::CCNode::create(v11);
v27 = 0;
v28 = 0;
v29 = 0;
v14 = v13;
v15 = strlen(v8);
std::string::__init(&v27, v8, v15);
cocos2d::CCDictionary::setObject(v12, v14);
std::string::~string((int)&v27);
GameLevelManager::getBasePostString((GameLevelManager *)v24);
v16 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&dword_54 + 3,
"mfd",
"2893",
103,
98,
&a1i2r3e45s789g[9]);
v17 = cocos2d::CCString::getCString(v16);
v18 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&targetAccountID=%i&secret=%s",
a2,
v17);
v19 = (char *)cocos2d::CCString::getCString(v18);
std::string::append(v24, v19);
memset(v25, 0, sizeof(v25));
std::string::__init(v25, "https://www.boomlings.com/database/removeGJFriend20.php", 0x37u);
v26[0] = 0;
v26[1] = 0;
if ( ((int)v24[0] & 1) == 0 )
v20 = (char *)v24 + 1;
v26[2] = 0;
if ( ((int)v24[0] & 1) != 0 )
v20 = v24[2];
v23 = v20;
v21 = strlen(v20);
std::string::__init(v26, v23, v21);
v27 = 0;
v28 = 0;
v29 = 0;
v22 = strlen(v8);
std::string::__init(&v27, v8, v22);
GameLevelManager::ProcessHttpRequest(this, v25, (int)v26, (int)&v27, 39);
std::string::~string((int)&v27);
std::string::~string((int)v26);
std::string::~string((int)v25);
std::string::~string((int)v24);
return 1;
}