//
// GameLevelManager::removeFriend from 0x3d30ac to 0x3d31ee (322 bytes)
//
// 2 xrefs:
// > GJUserCell::FLAlert_Clicked @ 0x32fd08
// > ProfilePage::FLAlert_Clicked @ 0x4c6aa8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool GameLevelManager::removeFriend(GameLevelManager *a1, int a2)
{
cocos2d::CCString *v5; // r0
char *CString; // r0
cocos2d::CCDictionary *m_friendReqAndUserBlocks; // r6
char *v8; // r10
int v9; // r6
cocos2d::CCDictionary *v10; // r11
cocos2d::CCNode *v11; // r6
cocos2d::CCString *v12; // r0
const char *v13; // r0
cocos2d::CCString *v14; // r0
char *v15; // r0
char *v16; // [sp+1Ch] [bp-18h] BYREF
char *v17; // [sp+20h] [bp-14h] BYREF
const char *v18; // [sp+24h] [bp-10h] BYREF
std::string v19; // [sp+28h] [bp-Ch] BYREF
if ( a2 <= 0 )
return 0;
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"removeFriend_%i",
(const char *)a2);
CString = (char *)cocos2d::CCString::getCString(v5);
m_friendReqAndUserBlocks = a1->m_friendReqAndUserBlocks;
v8 = CString;
sub_776584((int)&v19, CString);
v9 = cocos2d::CCDictionary::objectForKey(m_friendReqAndUserBlocks, &v19);
sub_774008(&v19);
if ( v9 )
return 0;
v10 = a1->m_friendReqAndUserBlocks;
v11 = cocos2d::CCNode::create();
sub_776584((int)&v19, v8);
cocos2d::CCDictionary::setObject((int)v10, v11);
sub_774008(&v19);
GameLevelManager::getBasePostString((GameLevelManager *)&v16);
v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&dword_54 + 3,
"mfd",
"2893",
103,
98,
&aO1i2r3e45s7t89[10]);
v13 = cocos2d::CCString::getCString(v12);
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&targetAccountID=%i&secret=%s",
(const char *)a2,
v13);
v15 = (char *)cocos2d::CCString::getCString(v14);
sub_774544((int)&v16, v15);
sub_776584((int)&v17, "https://www.boomlings.com/database/removeGJFriend20.php");
sub_776584((int)&v18, v16);
sub_776584((int)&v19, v8);
GameLevelManager::ProcessHttpRequest(a1, &v17, &v18, (char **)&v19, 33);
sub_774008(&v19);
sub_774008(&v18);
sub_774008(&v17);
sub_774008(&v16);
return 1;
}