//
// RewardsPage::onReward from 0x61a028 to 0x61a0de (182 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:54:58 +0000
//
RewardUnlockLayer *__fastcall RewardsPage::onReward(cocos2d::CCNode **this, cocos2d::CCObject *a2)
{
RewardUnlockLayer *result; // r0
RewardsPage *v5; // r2
cocos2d::CCNode *v6; // r4
int v7; // r3
void (__fastcall *v8)(cocos2d::CCNode *, RewardsPage **); // r3
cocos2d::CCAction *v9; // r0
FLAlertLayer *v10; // r0
cocos2d::CCNode *v11; // r3
GameLevelManager *v12; // r0
GameLevelManager *v13; // r4
const char *v14; // r0
RewardsPage *v15; // [sp+0h] [bp-8h] BYREF
cocos2d::CCObject *v16; // [sp+4h] [bp-4h]
v15 = (RewardsPage *)this;
v16 = a2;
result = (RewardUnlockLayer *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);
if ( result == (RewardUnlockLayer *)((char *)&dword_0 + 1) )
{
if ( !*((_BYTE *)this + 544) )
{
v6 = *(this + 132);
goto LABEL_7;
}
}
else if ( result == (RewardUnlockLayer *)((char *)&dword_0 + 2) && !*((_BYTE *)this + 545) )
{
v6 = *(this + 133);
LABEL_7:
if ( v6 )
{
cocos2d::CCNode::stopAllActions(v6);
v7 = *(_DWORD *)v6;
LOWORD(v15) = 19455;
v8 = *(void (__fastcall **)(cocos2d::CCNode *, RewardsPage **))(v7 + 536);
BYTE2(v15) = 0;
v8(v6, &v15);
v9 = (cocos2d::CCAction *)cocos2d::CCTintTo::create(
(cocos2d::CCTintTo *)0x3F800000,
COERCE_FLOAT(255),
0xFFu,
0xFFu,
(unsigned __int8)v15);
return (RewardUnlockLayer *)cocos2d::CCNode::runAction(v6, v9);
}
return result;
}
if ( !*(this + 137) )
{
v10 = RewardUnlockLayer::create(result, (RewardsPage *)this, v5);
v11 = *this;
*(this + 137) = v10;
v12 = (GameLevelManager *)(*((int (__fastcall **)(cocos2d::CCNode **, FLAlertLayer *))v11 + 57))(this, v10);
v13 = (GameLevelManager *)GameLevelManager::sharedState(v12);
v14 = (const char *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);
return (RewardUnlockLayer *)GameLevelManager::getGJRewards(v13, v14);
}
return result;
}