//
// RewardsPage::rewardsStatusFinished from 0xa88e5c to 0xa88f70 (276 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'RewardsPage::rewardsStatusFinished @ 0xa88f74
// > ??> @ 0x101320
// > ??> @ 0x1498828
//
// 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 13:00:36 +0000
//
__int64 __fastcall RewardsPage::rewardsStatusFinished(RewardUnlockLayer **this, unsigned int a2)
{
GameStatsManager *v4; // x0
__int64 v6; // x0
GameStatsManager *RewardItem; // x0
unsigned int *v8; // x21
__int64 v9; // x0
_BOOL8 v10; // x0
GameStatsManager *v11; // x0
GameStatsManager *v12; // x0
GameStatsManager *v13; // x0
if ( *(this + 90) )
{
v4 = (GameStatsManager *)(a2 - 1);
if ( (unsigned int)v4 <= 1 )
{
v6 = GameStatsManager::sharedState(v4);
RewardItem = (GameStatsManager *)GameStatsManager::getRewardItem(v6, a2);
v8 = (unsigned int *)RewardItem;
if ( RewardItem )
{
v9 = GameStatsManager::sharedState(RewardItem);
if ( !GameStatsManager::hasRewardBeenCollected(v9, a2, v8[14]) )
{
v10 = RewardUnlockLayer::readyToCollect(*(this + 90), (GJRewardItem *)v8);
if ( v10 )
{
v11 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)v10);
GameStatsManager::preProcessReward(v11, (GJRewardItem *)v8);
v12 = (GameStatsManager *)(unsigned __int8)RewardUnlockLayer::showCollectReward(
*(this + 90),
(GJRewardItem *)v8);
if ( (_BYTE)v12 )
{
v13 = (GameStatsManager *)GameStatsManager::sharedState(v12);
GameStatsManager::collectReward(v13, a2, v8);
}
}
}
}
}
}
RewardsPage::updateTimers((RewardsPage *)this, 0.0);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 85) + 344LL))(*(this + 85), 1);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 86) + 344LL))(*(this + 86), 1);
cocos2d::CCNode::unschedule(this, RewardsPage::updateTimers, 0);
return cocos2d::CCNode::schedule(this, RewardsPage::updateTimers, 0, 1.0);
}