//
// GameStatsManager::postLoadGameStats from 0x8de29c to 0x8de438 (412 bytes)
//
// 3 xrefs:
// > GameStatsManager::dataLoaded @ 0x8e8f54
// > GJAccountManager::onSyncAccountCompleted @ 0x98a2d8
// > ??> @ 0x71f20
//
// 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:56:48 +0000
//
__int64 __fastcall GameStatsManager::postLoadGameStats(GameStatsManager *this)
{
unsigned int v2; // w21
AchievementManager *v3; // x0
char v4; // w26
char *v5; // x22
__int64 v6; // x27
size_t v7; // x0
cocos2d::CCString *v8; // x0
unsigned int v9; // w0
AchievementManager *v10; // x0
cocos2d::CCString *v11; // x0
const char *CString; // x0
size_t v13; // x0
char *v15; // [xsp+68h] [xbp+68h]
__int64 v16[2]; // [xsp+78h] [xbp+78h] BYREF
void *v17; // [xsp+88h] [xbp+88h]
__int64 v18[2]; // [xsp+90h] [xbp+90h] BYREF
void *v19; // [xsp+A0h] [xbp+A0h]
v2 = 1;
v3 = (AchievementManager *)AchievementManager::sharedState(_stack_chk_guard);
v4 = *((_BYTE *)v3 + 360);
*(_BYTE *)(AchievementManager::sharedState(v3) + 360) = 1;
do
{
while ( 1 )
{
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)v2);
CString = (const char *)cocos2d::CCString::getCString(v11);
v16[0] = 0;
v16[1] = 0;
v17 = nullptr;
v15 = (char *)CString;
v13 = strlen(CString);
std::string::__init(v16, v15, v13);
if ( (v16[0] & 1) != 0 )
{
v5 = (char *)v17;
v6 = *((_QWORD *)this + 65);
}
else
{
v6 = *((_QWORD *)this + 65);
v5 = (char *)v16 + 1;
}
v18[0] = 0;
v18[1] = 0;
v19 = nullptr;
v7 = strlen(v5);
std::string::__init(v18, v5, v7);
v8 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v6, v18);
v9 = cocos2d::CCString::intValue(v8);
GameStatsManager::setStat(this, v5, (char *)v9);
if ( (v18[0] & 1) != 0 )
operator delete(v19);
v10 = (AchievementManager *)LOBYTE(v16[0]);
if ( (v16[0] & 1) != 0 )
break;
if ( ++v2 == 45 )
goto LABEL_10;
}
++v2;
operator delete(v17);
}
while ( v2 != 45 );
LABEL_10:
*(_BYTE *)(AchievementManager::sharedState(v10) + 360) = v4;
return _stack_chk_guard;
}