//
// GameStatsManager::claimListReward from 0x100334198 to 0x10033427c (228 bytes)
//
// 1 xrefs:
// > LevelListLayer::onClaimReward @ 0x100246158
//
// 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
//
bool __fastcall GameStatsManager::claimListReward(GameStatsManager *a1, GJLevelList *a2)
{
int v4; // w0
int m_levelsToClaim; // w8
int m_diamonds; // w20
bool v8; // cc
bool v9; // w20
cocos2d::CCDictionary *m_completedLists; // x22
cocos2d::CCObject *v11; // x23
void *__p[2]; // [xsp+8h] [xbp-48h] BYREF
char v14; // [xsp+1Fh] [xbp-31h]
v4 = GJLevelList::completedLevels(a2);
m_levelsToClaim = a2->m_levelsToClaim;
m_diamonds = a2->m_diamonds;
v8 = m_diamonds < 1 || m_levelsToClaim < 1 || v4 < m_levelsToClaim;
if ( v8 || GameStatsManager::hasClaimedListReward(a1, a2) )
return 0;
m_completedLists = a1->m_completedLists;
v11 = sub_100268F4C("%i", m_diamonds);
GameStatsManager::getListRewardKey((__int64)a2, __p);
cocos2d::CCDictionary::setObject_1(m_completedLists, v11, __p);
if ( v14 < 0 )
operator delete(__p[0]);
GameStatsManager::incrementStat(a1, "13", m_diamonds);
v9 = 1;
GameStatsManager::incrementStat(a1, "41", 1);
return v9;
}