//
// GameLevelManager::followUserOnline from 0x4b9158 to 0x4b92be (358 bytes)
//
// 2 xrefs:
// > FriendsProfilePage::FLAlert_Clicked @ 0x5f4844
// > ProfilePage::onFollow @ 0x5f6f8c
//
// 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:13 +0000
//
int __fastcall GameLevelManager::followUserOnline(GameLevelManager *this, const char *a2, int a3)
{
cocos2d::CCString *v6; // r0
const char *CString; // r10
int v8; // r2
int v9; // r3
cocos2d::CCString *v10; // r0
int v11; // r0
cocos2d::CCString *v12; // r0
char *v13; // r0
const char *v14; // r7
size_t v15; // r0
const char *v16; // r1
size_t v17; // r0
size_t v18; // r0
int v19; // r3
const char *v21; // [sp+14h] [bp-40h]
char *v22[3]; // [sp+1Ch] [bp-38h] BYREF
int v23[3]; // [sp+28h] [bp-2Ch] BYREF
int v24[3]; // [sp+34h] [bp-20h] BYREF
int v25[3]; // [sp+40h] [bp-14h] BYREF
v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"follow_%i", a2);
CString = (const char *)cocos2d::CCString::getCString(v6);
if ( GameLevelManager::isDLActive(this, CString) )
return 0;
GameLevelManager::addDLToActive(this, CString, v8, v9);
GameLevelManager::getBasePostString((GameLevelManager *)v22);
v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&dword_54 + 3,
"mfd",
"2893",
103,
98,
&a1i2r3e45s789g[9]);
v11 = cocos2d::CCString::getCString(v10);
v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&targetAccountID=%i&secret=%s",
a2,
v11);
v13 = (char *)cocos2d::CCString::getCString(v12);
std::string::append(v22, v13);
if ( a3 )
v14 = "https://www.boomlings.com/database/followGJUser.php";
else
v14 = "https://www.boomlings.com/database/unfollowGJUser.php";
memset(v23, 0, sizeof(v23));
v15 = strlen(v14);
std::string::__init(v23, v14, v15);
v24[0] = 0;
v24[1] = 0;
if ( ((int)v22[0] & 1) == 0 )
v16 = (char *)v22 + 1;
v24[2] = 0;
if ( ((int)v22[0] & 1) != 0 )
v16 = v22[2];
v21 = v16;
v17 = strlen(v16);
std::string::__init(v24, v21, v17);
memset(v25, 0, sizeof(v25));
v18 = strlen(CString);
std::string::__init(v25, CString, v18);
if ( a3 )
v19 = 112;
else
v19 = 113;
GameLevelManager::ProcessHttpRequest(this, v23, (int)v24, (int)v25, v19);
std::string::~string((int)v25);
std::string::~string((int)v24);
std::string::~string((int)v23);
std::string::~string((int)v22);
return 1;
}