//
// GameStatsManager::registerRewardsFromItem from 0x1003335dc to 0x100333694 (184 bytes)
//
// 5 xrefs:
// > GameStatsManager::collectReward @ 0x100333574
// > GameStatsManager::completedDailyLevel @ 0x100334688
// > GameStatsManager::unlockSpecialChest @ 0x100336948
// > GameStatsManager::unlockSecretChest @ 0x10033e0f4
// > GameStatsManager::unlockGoldChest @ 0x10033e1d8
//
// 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::registerRewardsFromItem(GameStatsManager *a1, GJRewardItem *a2)
{
bool m_skipIncrementChallenge; // w24
cocos2d::CCArray *m_rewardObjects; // x20
unsigned int v5; // w21
__int64 v6; // x0
unsigned int v7; // w8
__int64 v8; // x22
const char *v9; // x23
GameStatsManager *v10; // x0
m_skipIncrementChallenge = a1->m_skipIncrementChallenge;
a1->m_skipIncrementChallenge = 1;
m_rewardObjects = a2->m_rewardObjects;
if ( m_rewardObjects && (unsigned int)sub_10024A36C((__int64)a2->m_rewardObjects) )
{
v5 = 0;
do
{
v6 = sub_10024A388((__int64)m_rewardObjects, v5);
v7 = *(_DWORD *)(v6 + 56) - 1;
if ( v7 <= 0xE && ((0x7EFFu >> v7) & 1) != 0 )
{
v8 = v6;
v9 = off_1007F09D8[v7];
v10 = GameStatsManager::sharedState();
GameStatsManager::incrementStat(v10, v9, *(_DWORD *)(v8 + 68));
}
++v5;
}
while ( v5 < (unsigned int)sub_10024A36C((__int64)m_rewardObjects) );
}
a1->m_skipIncrementChallenge = m_skipIncrementChallenge;
}