//
// GameLevelManager::getFollowing from 0x1005765f0 to 0x100576817 (551 bytes)
//
// 2 xrefs:
// > GameLevelManager::syncFollowListIfNeeded @ 0x100576f7d
// > GameLevelManager::syncFollowListIfNeeded @ 0x100576fad
//
// This function is hookable on this platform (idp: pc, 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:32:17 +0000
//
bool __fastcall GameLevelManager::getFollowing(__int64 a1)
{
bool isDLActive; // al
__int64 v2; // rax
__int64 v3; // rax
const std::string::value_type *CString; // rax
const char *data; // r14
size_t v6; // rax
size_t v7; // r15
char *v8; // r12
size_t v9; // r13
char v11; // [rsp+0h] [rbp-A0h]
std::string v12; // [rsp+10h] [rbp-90h] BYREF
__int128 v13; // [rsp+28h] [rbp-78h] BYREF
void *__p; // [rsp+38h] [rbp-68h]
std::string v15; // [rsp+40h] [rbp-60h] BYREF
_QWORD __dst[2]; // [rsp+58h] [rbp-48h] BYREF
void *v17; // [rsp+68h] [rbp-38h]
bool v18; // [rsp+77h] [rbp-29h]
isDLActive = GameLevelManager::isDLActive(a1, "following");
if ( !isDLActive )
{
v18 = 0;
GameLevelManager::addDLToActive(a1, "following");
GameLevelManager::getBasePostString(&v15);
v2 = sub_10088E820("%c%s%s%c%c%s", (char)"7");
cocos2d::CCString::getCString(v2);
v3 = sub_10088E820("&ack=1&secret=%s", v11);
CString = (const std::string::value_type *)cocos2d::CCString::getCString(v3);
std::string::append(&v15, CString);
v12.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x38u);
v12.__r_.__value_.__r.__words[0] = 57;
v12.__r_.__value_.__l.__size_ = 53;
strcpy(v12.__r_.__value_.__l.__data_, "https://www.boomlings.com/database/getGJFollowing.php");
if ( (*(_BYTE *)&v15.__r_.__value_.__s.0 & 1) != 0 )
data = v15.__r_.__value_.__l.__data_;
else
data = v15.__r_.__value_.__s.__data_;
v6 = strlen(data);
if ( v6 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v7 = v6;
if ( v6 >= 0x17 )
{
v9 = 26;
if ( (v6 | 7) != 0x17 )
v9 = (v6 | 7) + 1;
v8 = (char *)operator new(v9);
v17 = v8;
__dst[0] = v9 | 1;
__dst[1] = v7;
}
else
{
LOBYTE(__dst[0]) = 2 * v6;
v8 = (char *)__dst + 1;
if ( !v6 )
{
LABEL_13:
v8[v7] = 0;
LOBYTE(v13) = 18;
strcpy((char *)&v13 + 1, "following");
GameLevelManager::ProcessHttpRequest(a1, &v12, (__int64)__dst, &v13, 0x72u);
if ( (v13 & 1) != 0 )
{
operator delete(__p);
if ( (__dst[0] & 1) == 0 )
{
LABEL_15:
if ( (*(_BYTE *)&v12.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_16;
goto LABEL_22;
}
}
else if ( (__dst[0] & 1) == 0 )
{
goto LABEL_15;
}
operator delete(v17);
if ( (*(_BYTE *)&v12.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_16:
if ( (*(_BYTE *)&v15.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_18:
isDLActive = v18;
return !isDLActive;
}
LABEL_17:
operator delete(v15.__r_.__value_.__l.__data_);
goto LABEL_18;
}
LABEL_22:
operator delete(v12.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v15.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_18;
goto LABEL_17;
}
}
memmove(v8, data, v7);
goto LABEL_13;
}
return !isDLActive;
}