//
// GameLevelManager::getUserSearch from 0x4bffdc to 0x4c01a4 (456 bytes)
//
// 3 xrefs:
// > FRequestProfilePage::onGlobalSearch @ 0x5f1b52
// > FriendsProfilePage::onGlobalSearch @ 0x5f550a
// > FriendPickerPopup::onGlobalSearch @ 0x74eada
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:50:22 +0000
//
int __fastcall GameLevelManager::getUserSearch(GameManager *a1, unsigned __int8 *a2)
{
const char *v2; // r11
int v3; // r2
int v6; // r2
int v8; // r5
int v9; // r5
cocos2d::CCNode *v10; // r0
int v11; // r10
cocos2d::CCObject *v12; // r0
cocos2d::CCObject *v13; // r8
cocos2d::CCString *v14; // r0
const char *CString; // r0
cocos2d::CCString *v16; // r0
char *v17; // r0
char *v18; // r1
size_t v19; // r2
size_t v20; // r0
char *v21[3]; // [sp+14h] [bp-50h] BYREF
int v22[3]; // [sp+20h] [bp-44h] BYREF
_DWORD v23[3]; // [sp+2Ch] [bp-38h] BYREF
int v24[3]; // [sp+38h] [bp-2Ch] BYREF
int v25[3]; // [sp+44h] [bp-20h] BYREF
int v26; // [sp+50h] [bp-14h] BYREF
int v27; // [sp+54h] [bp-10h]
int v28; // [sp+58h] [bp-Ch]
v3 = *a2;
if ( (v3 & 1) != 0 )
v6 = *((_DWORD *)a2 + 1);
else
v6 = v3 >> 1;
if ( !v6 )
return 0;
v8 = *((_DWORD *)a1 + 187);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "userSearch", 0xAu);
v9 = cocos2d::CCDictionary::objectForKey(v8, &v26);
v10 = (cocos2d::CCNode *)std::string::~string((int)&v26);
if ( v9 )
return 0;
v11 = *((_DWORD *)a1 + 187);
v12 = (cocos2d::CCObject *)cocos2d::CCNode::create(v10);
v26 = 0;
v27 = 0;
v28 = 0;
v13 = v12;
std::string::__init(&v26, "userSearch", 0xAu);
cocos2d::CCDictionary::setObject(v11, v13);
std::string::~string((int)&v26);
GameLevelManager::getBasePostString((GameLevelManager *)v21);
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&dword_54 + 3,
"mfd",
"2893",
103,
98,
&a1i2r3e45s789g[9]);
CString = (const char *)cocos2d::CCString::getCString(v14);
v16 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"&secret=%s&str=", CString);
v17 = (char *)cocos2d::CCString::getCString(v16);
std::string::append(v21, v17);
std::string::basic_string(v22, (int)a2);
LevelTools::base64EncodeString(v23, v22);
if ( (v23[0] & 1) != 0 )
{
v18 = (char *)v23[2];
v19 = v23[1];
}
else
{
v19 = (int)LOBYTE(v23[0]) >> 1;
v18 = (char *)v23 + 1;
}
std::string::append(v21, v18, v19);
std::string::~string((int)v23);
std::string::~string((int)v22);
memset(v24, 0, sizeof(v24));
std::string::__init(v24, "https://www.boomlings.com/database/getGJUserSearch.php", 0x36u);
v25[0] = 0;
v25[1] = 0;
if ( ((int)v21[0] & 1) == 0 )
v2 = (char *)v21 + 1;
v25[2] = 0;
if ( ((int)v21[0] & 1) != 0 )
v2 = v21[2];
v20 = strlen(v2);
std::string::__init(v25, v2, v20);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "userSearch", 0xAu);
GameLevelManager::ProcessHttpRequest(a1, v24, (int)v25, (int)&v26, 96);
std::string::~string((int)&v26);
std::string::~string((int)v25);
std::string::~string((int)v24);
std::string::~string((int)v21);
return 1;
}