//
// GameStatsManager::checkCoinsForLevel from 0x8e8640 to 0x8e8794 (340 bytes)
//
// 2 xrefs:
// > GameLevelManager::updateLevelRewards @ 0x805664
// > ??> @ 0x75268
//
// 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:53 +0000
//
__int64 __fastcall GameStatsManager::checkCoinsForLevel(GameStatsManager *this, GJGameLevel *a2)
{
unsigned int v4; // w19
char *CoinKey; // x20
size_t v7; // x0
__int64 v8; // x25
__int64 v9[2]; // [xsp+50h] [xbp+50h] BYREF
void *v10; // [xsp+60h] [xbp+60h]
if ( *((int *)a2 + 241) > 0 )
{
v4 = *((_DWORD *)a2 + 242) - *((_DWORD *)a2 + 243);
if ( v4 == 1 )
{
do
{
CoinKey = (char *)GJGameLevel::getCoinKey(a2, v4);
if ( GameStatsManager::hasPendingUserCoin(this, CoinKey) )
{
if ( !GameStatsManager::hasUserCoin(this, CoinKey) )
{
GameStatsManager::storeUserCoin(this, CoinKey);
GameStatsManager::incrementStat(this, (char *)&word_120A570);
}
v9[0] = 0;
v9[1] = 0;
v10 = nullptr;
v7 = strlen(CoinKey);
v8 = *((_QWORD *)this + 78);
std::string::__init(v9, CoinKey, v7);
cocos2d::CCDictionary::removeObjectForKey(v8, v9);
if ( (v9[0] & 1) != 0 )
operator delete(v10);
}
++v4;
}
while ( v4 != 4 );
}
}
return _stack_chk_guard;
}