//
// GameLevelManager::getFriendRequests from 0x828f4c to 0x8292f0 (932 bytes)
//
// 2 xrefs:
// > FRequestProfilePage::loadPage @ 0xa4dfc8
// > ??> @ 0x656c8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:55:05 +0000
//
__int64 __fastcall GameLevelManager::getFriendRequests(
GameLevelManager *a1,
unsigned __int8 a2,
unsigned int a3,
unsigned int a4,
__int64 a5,
unsigned __int8 a6)
{
int v6; // w24
int v9; // w25
char *FriendRequestKey; // x20
cocos2d::CCString *v14; // x0
__int64 CString; // x0
cocos2d::CCString *v16; // x0
size_t v17; // x0
__int64 v18; // x0
unsigned __int8 v19; // w0
__int64 v20; // x0
__int64 v21; // x1
char *v22; // x1
size_t v23; // x2
const char *v24; // x1
size_t v25; // x0
size_t v26; // x0
char *v27; // [xsp+68h] [xbp+68h]
char *v28; // [xsp+68h] [xbp+68h]
__int64 v29[2]; // [xsp+78h] [xbp+78h] BYREF
void *v30; // [xsp+88h] [xbp+88h]
__int64 v31; // [xsp+90h] [xbp+90h] BYREF
__int64 v32; // [xsp+98h] [xbp+98h]
void *v33; // [xsp+A0h] [xbp+A0h]
size_t v34[2]; // [xsp+A8h] [xbp+A8h] BYREF
void *v35; // [xsp+B8h] [xbp+B8h]
__int64 v36[2]; // [xsp+C0h] [xbp+C0h] BYREF
void *v37; // [xsp+D0h] [xbp+D0h]
__int64 v38[2]; // [xsp+D8h] [xbp+D8h] BYREF
void *v39; // [xsp+E8h] [xbp+E8h]
__int64 v40[2]; // [xsp+F0h] [xbp+F0h] BYREF
void *v41; // [xsp+100h] [xbp+100h]
v6 = a6;
v9 = a2;
FriendRequestKey = (char *)GameLevelManager::getFriendRequestKey((__int64)a1, a2, a3, (unsigned __int8 *)a5, a6);
if ( !GameLevelManager::isDLActive(a1, FriendRequestKey) )
{
GameLevelManager::addDLToActive(a1, FriendRequestKey);
GameLevelManager::getBasePostString(v29);
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)off_50 + 7,
"mfd",
"2893",
103,
98,
"7");
CString = cocos2d::CCString::getCString(v14);
v16 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&page=%i&total=%i&secret=%s",
(const char *)a3,
a4,
CString);
v27 = (char *)cocos2d::CCString::getCString(v16);
v17 = strlen(v27);
std::string::append((__int64)v29, v27, v17);
if ( v6 )
{
std::string::append((__int64)v29, "&getSent=2", 0xAu);
}
else if ( v9 )
{
std::string::append((__int64)v29, "&getSent=1", 0xAu);
}
if ( (*(_BYTE *)a5 & 1) != 0 )
v18 = *(_QWORD *)(a5 + 8);
else
v18 = *(_BYTE *)a5 >> 1;
if ( v18 )
{
std::string::append((__int64)v29, "&search=", 8u);
v19 = *(_BYTE *)a5;
v31 = 0;
v32 = 0;
v33 = nullptr;
if ( (v19 & 1) != 0 )
{
std::string::__init(&v31, *(void **)(a5 + 16), *(_QWORD *)(a5 + 8));
}
else
{
v20 = *(_QWORD *)a5;
v21 = *(_QWORD *)(a5 + 8);
v33 = *(void **)(a5 + 16);
v31 = v20;
v32 = v21;
}
LevelTools::base64EncodeString((__int64)&v31, v34);
if ( (v34[0] & 1) != 0 )
{
v22 = (char *)v35;
v23 = v34[1];
}
else
{
v23 = LOBYTE(v34[0]) >> 1;
v22 = (char *)v34 + 1;
}
std::string::append((__int64)v29, v22, v23);
if ( (v34[0] & 1) != 0 )
operator delete(v35);
if ( (v31 & 1) != 0 )
operator delete(v33);
}
v36[0] = 0;
v36[1] = 0;
v37 = nullptr;
std::string::__init(v36, "https://www.boomlings.com/database/getGJFriendRequests20.php", 0x3Cu);
v24 = (char *)v29 + 1;
if ( (v29[0] & 1) != 0 )
v24 = (const char *)v30;
v28 = (char *)v24;
v38[0] = 0;
v38[1] = 0;
v39 = nullptr;
v25 = strlen(v24);
std::string::__init(v38, v28, v25);
v40[0] = 0;
v40[1] = 0;
v41 = nullptr;
v26 = strlen(FriendRequestKey);
std::string::__init(v40, FriendRequestKey, v26);
GameLevelManager::ProcessHttpRequest(a1, v36, (__int64)v38, (char *)v40, 34);
if ( (v40[0] & 1) != 0 )
operator delete(v41);
if ( (v38[0] & 1) != 0 )
operator delete(v39);
if ( (v36[0] & 1) != 0 )
operator delete(v37);
if ( (v29[0] & 1) != 0 )
operator delete(v30);
}
return _stack_chk_guard;
}