//
// GameStatsManager::getStat from 0x1003c9f78 to 0x1003ca044 (204 bytes)
//
// 142 xrefs:
// > GameLevelManager::updateUserScore @ 0x1000bc018
// > GameLevelManager::updateUserScore @ 0x1000bc02c
// > GameLevelManager::updateUserScore @ 0x1000bc040
// > GameLevelManager::updateUserScore @ 0x1000bc054
// > GameLevelManager::updateUserScore @ 0x1000bc068
// > GameLevelManager::updateUserScore @ 0x1000bc07c
// > CreatorLayer::init @ 0x1000db2e4
// > CreatorLayer::onSecretVault @ 0x1000dbffc
// > CreatorLayer::onTreasureRoom @ 0x1000dc1d0
// > OptionsLayer::customSetup @ 0x100112f3c
// > OptionsLayer::onSecretVault @ 0x100113588
// > PlayLayer::destroyPlayer @ 0x100148140
// > GJShopLayer::init @ 0x1001c9938
// > sub_1001CA604 @ 0x1001ca690
// > sub_1001CA90C @ 0x1001ca928
// > GJShopLayer::didPurchaseItem @ 0x1001cadc4
// > sub_1001EEB58 @ 0x1001eeb78
// > StatsLayer::customSetup @ 0x1002dfbf0
// > StatsLayer::customSetup @ 0x1002dfc1c
// > StatsLayer::customSetup @ 0x1002dfc48
// > StatsLayer::customSetup @ 0x1002dfc74
// > StatsLayer::customSetup @ 0x1002dfca0
// > StatsLayer::customSetup @ 0x1002dfcc8
// > StatsLayer::customSetup @ 0x1002dfcf8
// > StatsLayer::customSetup @ 0x1002dfd24
// > StatsLayer::customSetup @ 0x1002dfd50
// > StatsLayer::customSetup @ 0x1002dfd7c
// > StatsLayer::customSetup @ 0x1002dfda8
// > StatsLayer::customSetup @ 0x1002dfdd4
// > StatsLayer::customSetup @ 0x1002dfe00
// > StatsLayer::customSetup @ 0x1002dfe2c
// > StatsLayer::customSetup @ 0x1002dfe58
// > StatsLayer::customSetup @ 0x1002dfe84
// > StatsLayer::customSetup @ 0x1002dfeb0
// > StatsLayer::customSetup @ 0x1002dfedc
// > StatsLayer::customSetup @ 0x1002dff04
// > StatsLayer::customSetup @ 0x1002dff20
// > SecretRewardsLayer::init @ 0x1003835a0
// > SecretRewardsLayer::init @ 0x1003836e4
// > SecretRewardsLayer::onGoldChest @ 0x100384ea4
// > SecretRewardsLayer::onGoldChest @ 0x100384f9c
// > SecretRewardsLayer::onSelectItem @ 0x1003865e8
// > SecretRewardsLayer::onSelectItem @ 0x1003866cc
// > sub_100386874 @ 0x1003868a0
// > sub_100387984 @ 0x1003879b0
// > sub_10038866C @ 0x100388698
// > sub_1003892C0 @ 0x1003892ec
// > GJGarageLayer::init @ 0x10039f528
// > GJGarageLayer::init @ 0x10039f67c
// > GJGarageLayer::init @ 0x10039f7c4
// > GJGarageLayer::init @ 0x10039f904
// > GJGarageLayer::init @ 0x10039fa44
// > GJGarageLayer::init @ 0x10039fb84
// > GJGarageLayer::init @ 0x10039fcc4
// > SecretLayer2::init @ 0x1003a6f10
// > SecretLayer2::onSubmit @ 0x1003a7ad4
// > sub_1003A8808 @ 0x1003a8828
// > sub_1003B0C10 @ 0x1003b0c54
// > GameManager::recountUserStats @ 0x1003b721c
// > GameManager::recountUserStats @ 0x1003b7290
// > GameManager::recountUserStats @ 0x1003b7304
// > GameManager::recountUserStats @ 0x1003b7378
// > sub_1003BC4EC @ 0x1003bc67c
// > sub_1003BC4EC @ 0x1003bc694
// > sub_1003BC4EC @ 0x1003bc6ac
// > sub_1003BC4EC @ 0x1003bc6c4
// > sub_1003BC4EC @ 0x1003bc70c
// > sub_1003BC4EC @ 0x1003bc760
// > GameStatsManager::purchaseItem @ 0x1003c9e50
// > GameStatsManager::incrementStat @ 0x1003ca1e0
// > sub_1003CA30C @ 0x1003ca3c0
// > sub_1003CA30C @ 0x1003ca47c
// > sub_1003CA30C @ 0x1003ca60c
// > sub_1003CA30C @ 0x1003ca6f0
// > sub_1003CA30C @ 0x1003cab0c
// > sub_1003CA30C @ 0x1003cac14
// > sub_1003CA30C @ 0x1003cb2cc
// > sub_1003CA30C @ 0x1003cb3d8
// > sub_1003CA30C @ 0x1003cb580
// > sub_1003CA30C @ 0x1003cba64
// > sub_1003CA30C @ 0x1003cc018
// > sub_1003CA30C @ 0x1003cc160
// > sub_1003CA30C @ 0x1003cc188
// > sub_1003CA30C @ 0x1003cc48c
// > sub_1003CA30C @ 0x1003cc6dc
// > sub_1003CA30C @ 0x1003cc914
// > sub_1003CA30C @ 0x1003cc9b8
// > sub_1003CA30C @ 0x1003ccc6c
// > sub_1003CA30C @ 0x1003cd19c
// > sub_1003CA30C @ 0x1003cd2d8
// > sub_1003CA30C @ 0x1003cd2ec
// > sub_1003CA30C @ 0x1003cd304
// > sub_1003CA30C @ 0x1003cd318
// > sub_1003CA30C @ 0x1003cd330
// > sub_1003CA30C @ 0x1003cd344
// > sub_1003CA30C @ 0x1003cd35c
// > sub_1003CA30C @ 0x1003cd370
// > sub_1003CA30C @ 0x1003cd388
// > sub_1003CA30C @ 0x1003cd4fc
// > sub_1003CA30C @ 0x1003cd5c0
// > sub_1003CA30C @ 0x1003cd5d4
// > sub_1003CA30C @ 0x1003cd5ec
// > sub_1003CA30C @ 0x1003cd600
// > sub_1003CA30C @ 0x1003cd618
// > sub_1003CA30C @ 0x1003cd62c
// > sub_1003CA30C @ 0x1003cd644
// > sub_1003CA30C @ 0x1003cd658
// > sub_1003CA30C @ 0x1003cd670
// > sub_1003CA30C @ 0x1003cd764
// > sub_1003CDC5C @ 0x1003cdcc8
// > sub_1003CDC5C @ 0x1003cdd2c
// > GameStatsManager::tryFixPathBug @ 0x1003cddf0
// > GameStatsManager::tryFixPathBug @ 0x1003cde04
// > sub_1003CE198 @ 0x1003ce1d0
// > sub_1003CE448 @ 0x1003ce464
// > sub_1003CF854 @ 0x1003cf880
// > GameStatsManager::verifyUserCoins @ 0x1003cfcb8
// > sub_1003D1760 @ 0x1003d17fc
// > sub_1003D1760 @ 0x1003d1828
// > GameStatsManager::completedDailyLevel @ 0x1003d26e0
// > GJRewardItem::getRandomNonMaxShardType @ 0x1003d296c
// > sub_1003D2B4C @ 0x1003d2bac
// > GameStatsManager::recountSpecialStats @ 0x1003d3598
// > GameStatsManager::unlockSecretChest @ 0x1003dca98
// > sub_1003DCBB4 @ 0x1003dcc00
// > sub_1003DCD34 @ 0x1003dcd50
// > GameStatsManager::preSaveGameStats @ 0x1003dd884
// > ShardsPage::init @ 0x100448bac
// > ShardsPage::init @ 0x100448c38
// > ShardsPage::init @ 0x100448c9c
// > ShardsPage::init @ 0x100448d20
// > ShardsPage::init @ 0x100448d7c
// > ShardsPage::init @ 0x100448de4
// > ShardsPage::init @ 0x100448e40
// > ShardsPage::init @ 0x100448eb4
// > ShardsPage::init @ 0x100448f0c
// > ShardsPage::init @ 0x100448f7c
// > sub_100460F1C @ 0x100460f84
// > LevelPage::updateDynamicPage @ 0x100483058
// > LevelPage::onPlay @ 0x100484318
// > LevelBrowserLayer::cellPerformedAction @ 0x10049b4d0
// > DailyRecallUnlockPopup::init @ 0x10053a5f4
//
// 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:08 +0000
//
__int64 __fastcall GameStatsManager::getStat(__int64 a1, char *a2)
{
__int64 v3; // x19
__int64 v4; // x0
__int64 v5; // x19
int v6; // w22
int v8; // [xsp+Ch] [xbp-44h] BYREF
void *__p[2]; // [xsp+10h] [xbp-40h] BYREF
char v10; // [xsp+27h] [xbp-29h]
if ( *(_BYTE *)(a1 + 314) == 1 )
{
v3 = *(_QWORD *)(a1 + 520);
sub_100009900(__p, a2);
v4 = cocos2d::CCDictionary::valueForKey(v3, __p);
v5 = cocos2d::CCString::intValue(v4);
if ( v10 < 0 )
operator delete(__p[0]);
}
else
{
v8 = atoi(a2);
__p[0] = &v8;
v6 = *((_DWORD *)sub_10001DBA4(a1 + 568, &v8, (__int64)&unk_10076E2EF, (_DWORD **)__p) + 5);
__p[0] = &v8;
return (unsigned int)(*((_DWORD *)sub_10001DBA4(a1 + 528, &v8, (__int64)&unk_10076E2EF, (_DWORD **)__p) + 5) - v6);
}
return v5;
}