//
// GameLevelManager::removeFriend from 0x1000a9200 to 0x1000a93cc (460 bytes)
//
// 2 xrefs:
// > GJUserCell::FLAlert_Clicked @ 0x100111b90
// > ProfilePage::FLAlert_Clicked @ 0x10019be14
//
// 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 __fastcall GameLevelManager::removeFriend(GameLevelManager *a1, int a2)
{
cocos2d::CCString *v4; // x0
char *CString; // x20
cocos2d::CCDictionary *m_friendReqAndUserBlocks; // x22
__int64 v7; // x0
__int64 v8; // x22
cocos2d::CCDictionary *v10; // x22
cocos2d::CCNode *v11; // x23
cocos2d::CCString *v12; // x0
const char *v13; // x0
cocos2d::CCString *v14; // x0
const char *v15; // x0
std::string *v16; // x1
void *__p[2]; // [xsp+30h] [xbp-90h] BYREF
char v18; // [xsp+47h] [xbp-79h]
void *v19[2]; // [xsp+48h] [xbp-78h] BYREF
char v20; // [xsp+5Fh] [xbp-61h]
std::string v21; // [xsp+60h] [xbp-60h] BYREF
std::string v22; // [xsp+78h] [xbp-48h] BYREF
if ( a2 < 1 )
return 0;
v4 = (cocos2d::CCString *)sub_100268F4C("removeFriend_%i", a2);
CString = (char *)cocos2d::CCString::getCString(v4);
m_friendReqAndUserBlocks = a1->m_friendReqAndUserBlocks;
sub_100009900(&v22, CString);
v7 = cocos2d::CCDictionary::objectForKey_1(m_friendReqAndUserBlocks, &v22);
v8 = v7;
if ( SHIBYTE(v22.__r_.__value_.__r.__words[2]) < 0 )
{
operator delete(v22.__r_.__value_.__l.__data_);
if ( v8 )
return 0;
}
else if ( v7 )
{
return 0;
}
v10 = a1->m_friendReqAndUserBlocks;
v11 = cocos2d::CCNode::create();
sub_100009900(&v22, CString);
cocos2d::CCDictionary::setObject_1(v10, v11, &v22);
if ( SHIBYTE(v22.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v22.__r_.__value_.__l.__data_);
GameLevelManager::getBasePostString(&v22);
v12 = (cocos2d::CCString *)sub_100268F4C("%c%s%s%c%c%s", 87, "mfd", "2893", 103, 98, "7");
v13 = cocos2d::CCString::getCString(v12);
v14 = (cocos2d::CCString *)sub_100268F4C("&targetAccountID=%i&secret=%s", a2, v13);
v15 = cocos2d::CCString::getCString(v14);
std::string::append(&v22, v15);
sub_100009900(&v21, "https://www.boomlings.com/database/removeGJFriend20.php");
if ( (v22.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v16 = &v22;
else
v16 = (std::string *)v22.__r_.__value_.__r.__words[0];
sub_100009900(v19, (char *)v16);
sub_100009900(__p, CString);
GameLevelManager::ProcessHttpRequest(a1, &v21, (char *)v19, (const std::string::value_type *)__p, 33);
if ( v18 < 0 )
operator delete(__p[0]);
if ( v20 < 0 )
operator delete(v19[0]);
if ( SHIBYTE(v21.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v21.__r_.__value_.__l.__data_);
if ( SHIBYTE(v22.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v22.__r_.__value_.__l.__data_);
return 1;
}