//
// GameLevelManager::acceptFriendRequest from 0x3d2ddc to 0x3d2f2a (334 bytes)
//
// 1 xrefs:
// > FriendRequestPopup::onAccept @ 0x4ac6c2
//
// 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::acceptFriendRequest(GameLevelManager *a1, int a2, int a3)
{
cocos2d::CCString *v7; // r0
char *CString; // r0
cocos2d::CCDictionary *m_friendReqAndUserBlocks; // r7
char *v10; // r10
int v11; // r7
cocos2d::CCNode *v12; // r7
cocos2d::CCString *v13; // r0
const char *v14; // r0
cocos2d::CCString *v15; // r0
char *v16; // r0
cocos2d::CCDictionary *v17; // [sp+14h] [bp-28h]
char *v18; // [sp+24h] [bp-18h] BYREF
char *v19; // [sp+28h] [bp-14h] BYREF
const char *v20; // [sp+2Ch] [bp-10h] BYREF
std::string v21; // [sp+30h] [bp-Ch] BYREF
if ( a2 <= 0 )
return 0;
if ( a3 <= 0 )
return 0;
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"accFriendReq_%i_%i",
(const char *)a2);
CString = (char *)cocos2d::CCString::getCString(v7);
m_friendReqAndUserBlocks = a1->m_friendReqAndUserBlocks;
v10 = CString;
sub_776584((int)&v21, CString);
v11 = cocos2d::CCDictionary::objectForKey(m_friendReqAndUserBlocks, &v21);
sub_774008(&v21);
if ( v11 )
return 0;
v17 = a1->m_friendReqAndUserBlocks;
v12 = cocos2d::CCNode::create();
sub_776584((int)&v21, v10);
cocos2d::CCDictionary::setObject((int)v17, v12);
sub_774008(&v21);
GameLevelManager::getBasePostString((GameLevelManager *)&v18);
v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&dword_54 + 3,
"mfd",
"2893",
103,
98,
&aO1i2r3e45s7t89[10]);
v14 = cocos2d::CCString::getCString(v13);
v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&targetAccountID=%i&requestID=%i&secret=%s",
(const char *)a2,
a3,
v14);
v16 = (char *)cocos2d::CCString::getCString(v15);
sub_774544((int)&v18, v16);
sub_776584((int)&v19, "https://www.boomlings.com/database/acceptGJFriendRequest20.php");
sub_776584((int)&v20, v18);
sub_776584((int)&v21, v10);
GameLevelManager::ProcessHttpRequest(a1, &v19, &v20, (char **)&v21, 31);
sub_774008(&v21);
sub_774008(&v20);
sub_774008(&v19);
sub_774008(&v18);
return 1;
}