//
// GameLevelManager::readFriendRequest from 0x3d2f4c to 0x3d308c (320 bytes)
//
// 1 xrefs:
// > FriendRequestPopup::onClose @ 0x4a84ec
//
// 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 GameLevelManager::readFriendRequest(GameLevelManager *a1, int a2)
{
cocos2d::CCString *v4; // r0
char *CString; // r0
cocos2d::CCDictionary *m_friendReqAndUserBlocks; // r6
char *v7; // r10
int v8; // r6
cocos2d::CCDictionary *v9; // r11
cocos2d::CCNode *v10; // r6
cocos2d::CCString *v11; // r0
const char *v12; // r0
cocos2d::CCString *v13; // r0
char *v14; // r0
char *v15; // [sp+1Ch] [bp-18h] BYREF
char *v16; // [sp+20h] [bp-14h] BYREF
const char *v17; // [sp+24h] [bp-10h] BYREF
std::string v18; // [sp+28h] [bp-Ch] BYREF
if ( a2 > 0 )
{
v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"readFriendReq_%i",
(const char *)a2);
CString = (char *)cocos2d::CCString::getCString(v4);
m_friendReqAndUserBlocks = a1->m_friendReqAndUserBlocks;
v7 = CString;
sub_776584((int)&v18, CString);
v8 = cocos2d::CCDictionary::objectForKey(m_friendReqAndUserBlocks, &v18);
sub_774008(&v18);
if ( !v8 )
{
v9 = a1->m_friendReqAndUserBlocks;
v10 = cocos2d::CCNode::create();
sub_776584((int)&v18, v7);
cocos2d::CCDictionary::setObject((int)v9, v10);
sub_774008(&v18);
GameLevelManager::getBasePostString((GameLevelManager *)&v15);
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&dword_54 + 3,
"mfd",
"2893",
103,
98,
&aO1i2r3e45s7t89[10]);
v12 = cocos2d::CCString::getCString(v11);
v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&requestID=%i&secret=%s",
(const char *)a2,
v12);
v14 = (char *)cocos2d::CCString::getCString(v13);
sub_774544((int)&v15, v14);
sub_776584((int)&v16, "https://www.boomlings.com/database/readGJFriendRequest20.php");
sub_776584((int)&v17, v15);
sub_776584((int)&v18, v7);
GameLevelManager::ProcessHttpRequest(a1, &v16, &v17, (char **)&v18, 32);
sub_774008(&v18);
sub_774008(&v17);
sub_774008(&v16);
sub_774008(&v15);
}
}
}