//
// GameLevelManager::getUserSearch from 0x8285e0 to 0x8289a4 (964 bytes)
//
// 4 xrefs:
// > FRequestProfilePage::onGlobalSearch @ 0xa4d670
// > FriendsProfilePage::onGlobalSearch @ 0xa52314
// > FriendPickerPopup::onGlobalSearch @ 0xc70768
// > ??> @ 0x70a20
//
// 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:04 +0000
//
__int64 __fastcall GameLevelManager::getUserSearch(cocos2d::CCObject *a1, char *a2)
{
unsigned __int8 v4; // w0
__int64 v5; // x1
__int64 v7; // x0
__int64 v8; // x24
cocos2d::CCNode *v9; // x0
__int64 v10; // x25
cocos2d::CCObject *v11; // x24
cocos2d::CCString *v12; // x0
const char *CString; // x0
cocos2d::CCString *v14; // x0
size_t v15; // x0
unsigned __int8 v16; // w0
__int64 v17; // x0
__int64 v18; // x1
char *v19; // x1
size_t v20; // x2
const char *v21; // x1
size_t v22; // x0
char *v23; // [xsp+58h] [xbp+58h]
char *v24; // [xsp+58h] [xbp+58h]
__int64 v25[2]; // [xsp+68h] [xbp+68h] BYREF
void *v26; // [xsp+78h] [xbp+78h]
__int64 v27; // [xsp+80h] [xbp+80h] BYREF
__int64 v28; // [xsp+88h] [xbp+88h]
void *v29; // [xsp+90h] [xbp+90h]
size_t v30[2]; // [xsp+98h] [xbp+98h] BYREF
void *v31; // [xsp+A8h] [xbp+A8h]
__int64 v32[2]; // [xsp+B0h] [xbp+B0h] BYREF
void *v33; // [xsp+C0h] [xbp+C0h]
__int64 v34[2]; // [xsp+C8h] [xbp+C8h] BYREF
void *v35; // [xsp+D8h] [xbp+D8h]
__int128 v36; // [xsp+E0h] [xbp+E0h] BYREF
void *v37; // [xsp+F0h] [xbp+F0h]
v4 = *a2;
v5 = (unsigned __int8)*a2 >> 1;
if ( (v4 & 1) != 0 )
v5 = *((_QWORD *)a2 + 1);
if ( !v5 )
return 0;
v7 = *((_QWORD *)a1 + 136);
BYTE9(v36) = 0;
WORD5(v36) = 0;
HIDWORD(v36) = 0;
v37 = nullptr;
LOBYTE(v36) = 20;
strcpy((char *)&v36 + 1, "userSea");
v8 = cocos2d::CCDictionary::objectForKey(v7, &v36);
v9 = (cocos2d::CCNode *)(unsigned __int8)v36;
if ( (v36 & 1) != 0 )
{
operator delete(v37);
if ( !v8 )
goto LABEL_7;
return 0;
}
if ( v8 )
return 0;
LABEL_7:
v10 = *((_QWORD *)a1 + 136);
v11 = (cocos2d::CCObject *)cocos2d::CCNode::create(v9);
v36 = 0u;
v37 = nullptr;
std::string::__init((__int64 *)&v36, "userSearch", 0xAu);
cocos2d::CCDictionary::setObject(v10, v11);
if ( (v36 & 1) != 0 )
operator delete(v37);
GameLevelManager::getBasePostString(v25);
v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)off_50 + 7,
"mfd",
"2893",
103,
98,
"7");
CString = (const char *)cocos2d::CCString::getCString(v12);
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"&secret=%s&str=", CString);
v23 = (char *)cocos2d::CCString::getCString(v14);
v15 = strlen(v23);
std::string::append((__int64)v25, v23, v15);
v16 = *a2;
v27 = 0;
v28 = 0;
v29 = nullptr;
if ( (v16 & 1) != 0 )
{
std::string::__init(&v27, *((void **)a2 + 2), *((_QWORD *)a2 + 1));
}
else
{
v17 = *(_QWORD *)a2;
v18 = *((_QWORD *)a2 + 1);
v29 = *((void **)a2 + 2);
v27 = v17;
v28 = v18;
}
LevelTools::base64EncodeString((__int64)&v27, v30);
if ( (v30[0] & 1) != 0 )
{
v19 = (char *)v31;
v20 = v30[1];
}
else
{
v20 = LOBYTE(v30[0]) >> 1;
v19 = (char *)v30 + 1;
}
std::string::append((__int64)v25, v19, v20);
if ( (v30[0] & 1) != 0 )
operator delete(v31);
if ( (v27 & 1) != 0 )
operator delete(v29);
v32[0] = 0;
v32[1] = 0;
v33 = nullptr;
std::string::__init(v32, "https://www.boomlings.com/database/getGJUserSearch.php", 0x36u);
v21 = (char *)v25 + 1;
if ( (v25[0] & 1) != 0 )
v21 = (const char *)v26;
v24 = (char *)v21;
v34[0] = 0;
v34[1] = 0;
v35 = nullptr;
v22 = strlen(v21);
std::string::__init(v34, v24, v22);
v36 = 0u;
v37 = nullptr;
std::string::__init((__int64 *)&v36, "userSearch", 0xAu);
GameLevelManager::ProcessHttpRequest(a1, v32, (__int64)v34, (char *)&v36, 96);
if ( (v36 & 1) != 0 )
operator delete(v37);
if ( (v34[0] & 1) != 0 )
operator delete(v35);
if ( (v32[0] & 1) != 0 )
operator delete(v33);
if ( (v25[0] & 1) != 0 )
operator delete(v26);
return 1;
}