//
// GameStatsManager::verifyUserCoins from 0x1003cfc90 to 0x1003cfd70 (224 bytes)
//
// 2 xrefs:
// > GameManager::dataLoaded @ 0x1003b9ab8
// > GJAccountManager::onSyncAccountCompleted @ 0x100446240
//
// 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 11:04:10 +0000
//
__int64 __fastcall GameStatsManager::verifyUserCoins(__int64 a1)
{
int Stat; // w20
__int64 v3; // x0
int v4; // w1
unsigned int v5; // w23
int v6; // w24
int v7; // w25
void *v8; // x0
__int64 result; // x0
Stat = GameStatsManager::getStat(a1, "12");
if ( Stat <= (int)cocos2d::CCDictionary::count(*(_QWORD *)(a1 + 616)) )
{
v5 = 1;
v6 = 10;
while ( 1 )
{
v7 = v5 <= 1 ? 1 : v6;
v8 = sub_1003065B0("geometry.ach.usercoins%02d", v5);
result = cocos2d::CCString::getCString((__int64)v8);
if ( v7 > Stat )
{
AchievementManager::sharedState();
result = AchievementManager::isAchievementEarned();
if ( (result & 1) != 0 )
break;
}
++v5;
v6 += 10;
if ( v6 == 220 )
return result;
}
v3 = a1;
v4 = 1;
}
else
{
v3 = a1;
v4 = 0;
}
return sub_1003CF854(v3, v4);
}