//
// GameLevelManager::syncFollowing from 0x4b9434 to 0x4b95e2 (430 bytes)
//
// 1 xrefs:
// > GameLevelManager::syncFollowListIfNeeded @ 0x4b9646
//
// 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::syncFollowing(cocos2d::CCDictionary **this)
{
const char *v1; // r11
int v3; // r2
int v4; // r3
unsigned int isDLActive; // r4
cocos2d::CCDictionary *v6; // r0
cocos2d::CCArray *v7; // r8
const char *v9; // r4
cocos2d::CCString *v10; // r0
int v11; // r0
cocos2d::CCString *v12; // r0
char *v13; // r0
size_t v14; // r0
int v15; // r3
cocos2d::CCString *v16; // r0
char *CString; // r0
int v18; // [sp+10h] [bp-44h] BYREF
int v19; // [sp+14h] [bp-40h]
const char *v20; // [sp+18h] [bp-3Ch]
char *v21[3]; // [sp+1Ch] [bp-38h] BYREF
int v22[3]; // [sp+28h] [bp-2Ch] BYREF
int v23[3]; // [sp+34h] [bp-20h] BYREF
int v24[3]; // [sp+40h] [bp-14h] BYREF
isDLActive = GameLevelManager::isDLActive((GameLevelManager *)this, "following");
if ( isDLActive )
return 0;
GameLevelManager::addDLToActive((GameLevelManager *)this, "following", v3, v4);
v6 = *(this + 138);
v18 = 0;
v19 = 0;
v20 = nullptr;
v7 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(v6);
while ( v7 && isDLActive < cocos2d::CCArray::count(v7) )
{
if ( (v18 & 1) != 0 )
v15 = v19;
else
v15 = (int)(unsigned __int8)v18 >> 1;
if ( v15 )
std::string::append(&v18, ",");
v16 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v7, isDLActive);
CString = (char *)cocos2d::CCString::getCString(v16);
std::string::append(&v18, CString);
++isDLActive;
}
GameLevelManager::getBasePostString((GameLevelManager *)v21);
if ( (v18 & 1) != 0 )
v9 = v20;
else
v9 = (char *)&v18 + 1;
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 *)"&follows=%s&ack=1&secret=%s",
v9,
v11);
v13 = (char *)cocos2d::CCString::getCString(v12);
std::string::append(v21, v13);
memset(v22, 0, sizeof(v22));
std::string::__init(v22, "https://www.boomlings.com/database/syncGJFollowing.php", 0x36u);
v23[0] = 0;
v23[1] = 0;
if ( ((int)v21[0] & 1) == 0 )
v1 = (char *)v21 + 1;
v23[2] = 0;
if ( ((int)v21[0] & 1) != 0 )
v1 = v21[2];
v14 = strlen(v1);
std::string::__init(v23, v1, v14);
memset(v24, 0, sizeof(v24));
std::string::__init(v24, "following", 9u);
GameLevelManager::ProcessHttpRequest((GameManager *)this, v22, (int)v23, (int)v24, 115);
std::string::~string((int)v24);
std::string::~string((int)v23);
std::string::~string((int)v22);
std::string::~string((int)v21);
std::string::~string((int)&v18);
return 1;
}