//
// GameStatsManager::collectReward from 0x100072610 to 0x1000726bd (173 bytes)
//
// 1 xrefs:
// > RewardsPage::rewardsStatusFinished @ 0x10021b67c
//
// 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
//
// local variable allocation has failed, the output may be wrong!
void __fastcall GameStatsManager::collectReward(GameStatsManager *a1, GJRewardType a2, GJRewardItem *a3)
{
double v3; // xmm0_8
cocos2d::CCDictionary *m_dailyChests; // r12
__int64 v6; // r12
cocos2d::CCDictionary *v7; // r15
size_t v8[2]; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
if ( a3 )
{
m_dailyChests = a1->m_dailyChests;
GameStatsManager::getRewardKey(v8, v3, *(__int64 *)&a2, a2, a3->m_chestID);
v6 = cocos2d::CCDictionary::objectForKey_1(m_dailyChests, v8);
if ( (v8[0] & 1) != 0 )
operator delete(__p);
if ( !v6 )
{
GameStatsManager::registerRewardsFromItem(a1, a3);
v7 = a1->m_dailyChests;
GameStatsManager::getRewardKey(v8, v3, (__int64)a3, a2, a3->m_chestID);
cocos2d::CCDictionary::setObject_1(v7, a3, v8);
if ( (v8[0] & 1) != 0 )
operator delete(__p);
}
}
}