//
// GameStatsManager::checkCoinsForLevel from 0x100331e0c to 0x100331ef4 (232 bytes)
//
// 1 xrefs:
// > GameLevelManager::updateLevelRewards @ 0x100093a78
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall GameStatsManager::checkCoinsForLevel(GameStatsManager *a1, GJGameLevel *a2)
{
int i; // w21
char *CoinKey; // x23
cocos2d::CCDictionary *m_pendingUserCoins; // x24
void *__p[2]; // [xsp+8h] [xbp-48h] BYREF
char v8; // [xsp+1Fh] [xbp-31h]
if ( a2->m_coins >= 1 && a2->m_coinsVerified.random - a2->m_coinsVerified.seed == 1 )
{
for ( i = 1; i != 4; ++i )
{
CoinKey = (char *)GJGameLevel::getCoinKey(a2, i);
if ( GameStatsManager::hasPendingUserCoin(a1, CoinKey) )
{
if ( !GameStatsManager::hasUserCoin(a1, CoinKey) )
{
GameStatsManager::storeUserCoin(a1, CoinKey);
GameStatsManager::incrementStat(a1, "12", 1);
}
m_pendingUserCoins = a1->m_pendingUserCoins;
sub_100009900(__p, CoinKey);
cocos2d::CCDictionary::removeObjectForKey_1((int)m_pendingUserCoins, (char *)__p);
if ( v8 < 0 )
operator delete(__p[0]);
}
}
}
}