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