//
// ProfilePage::followUserFinished from 0x5fb10c to 0x5fb2b8 (428 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'ProfilePage::followUserFinished @ 0x5fb2e8
//
// 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:54:35 +0000
//
GameLevelManager *__fastcall ProfilePage::followUserFinished(GameLevelManager *this, int a2, int a3)
{
GameLevelManager *v3; // r4
int v6; // r0
GameManager *v7; // s16
GameManager *v8; // r0
GameManager *v9; // r0
float v10; // s16
GameManager *v11; // r8
float v12; // r0
GameManager *v13; // r0
GameManager *v14; // r8
float v15; // r0
GameManager *v16; // r0
GameManager *v17; // r8
float v18; // r0
int v19; // r3
int v20; // r3
void (__fastcall *v21)(GameLevelManager *, cocos2d::CCNode *, int); // r9
const char *v22; // r8
size_t v23; // r0
cocos2d::CCNode *v24; // r0
int v25[3]; // [sp+Ch] [bp-20h] BYREF
int v26[3]; // [sp+18h] [bp-14h] BYREF
v3 = this;
if ( a3 )
{
v6 = GameLevelManager::sharedState(this);
v7 = (GameManager *)cocos2d::CCDictionary::count(*(cocos2d::CCDictionary **)(v6 + 552));
v8 = (GameManager *)GameManager::sharedState(v7);
v9 = (GameManager *)GameManager::reportAchievementWithID(
v8,
"geometry.ach.followCreator",
(const char *)&dword_64,
0);
v10 = (float)(int)v7;
v11 = (GameManager *)GameManager::sharedState(v9);
v12 = floorf((float)(v10 / 10.0) * 100.0);
v13 = (GameManager *)GameManager::reportAchievementWithID(
v11,
"geometry.ach.followCreator02",
(const char *)(int)v12,
0);
v14 = (GameManager *)GameManager::sharedState(v13);
v15 = floorf((float)(v10 / 25.0) * 100.0);
v16 = (GameManager *)GameManager::reportAchievementWithID(
v14,
"geometry.ach.followCreator03",
(const char *)(int)v15,
0);
v17 = (GameManager *)GameManager::sharedState(v16);
v18 = floorf((float)(v10 / 50.0) * 100.0);
this = (GameLevelManager *)GameManager::reportAchievementWithID(
v17,
"geometry.ach.followCreator04",
(const char *)(int)v18,
0);
}
if ( a2 == *((_DWORD *)v3 + 139) )
{
v19 = *((_DWORD *)v3 + 138);
if ( v19 )
{
*(_BYTE *)(v19 + 552) = a3;
if ( a3 )
v20 = 1;
else
v20 = -1;
*(_DWORD *)(*((_DWORD *)v3 + 138) + 544) = (v20 + *(_DWORD *)(*((_DWORD *)v3 + 138) + 544))
& ~((v20 + *(_DWORD *)(*((_DWORD *)v3 + 138) + 544)) >> 31);
ProfilePage::loadPageFromUserInfo(v3, *((GJUserScore **)v3 + 138));
v21 = *(void (__fastcall **)(GameLevelManager *, cocos2d::CCNode *, int))(*(_DWORD *)v3 + 232);
if ( a3 )
v22 = "Following";
else
v22 = "Unfollowed";
memset(v25, 0, sizeof(v25));
v23 = strlen(v22);
std::string::__init(v25, v22, v23);
memset(v26, 0, sizeof(v26));
std::string::__init(v26, &unk_B6B226, 0);
v24 = TextAlertPopup::create((int)v25, (cocos2d::CCDelayTime *)0x3F000000, 0.6, 150, (int)v26);
v21(v3, v24, 100);
std::string::~string((int)v26);
return (GameLevelManager *)std::string::~string((int)v25);
}
}
return this;
}