//
// RewardsPage::onReward from 0x1001fe5f0 to 0x1001fe6de (238 bytes)
//
// 2 xrefs:
// > RewardsPage::init @ 0x1001fe0ac
// > RewardsPage::init @ 0x1001fe224
//
// This function is hookable on this platform (idp: pc, 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 12:26:51 +0000
//
__int64 __fastcall RewardsPage::onReward(__int64 a1, __int64 a2)
{
__int64 result; // rax
__int64 v3; // rdx
__int64 v4; // rcx
__int64 v5; // rax
double v6; // xmm0_8
__int64 v7; // r14
unsigned int v8; // eax
__int64 v9; // rbx
__int64 v10; // rax
__int16 v11; // [rsp+Ch] [rbp-14h] BYREF
char v12; // [rsp+Eh] [rbp-12h]
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
if ( (_DWORD)result == 2 )
{
v4 = 688;
if ( *(_BYTE *)(a1 + 713) )
{
LABEL_4:
if ( !*(_QWORD *)(a1 + 720) )
{
v5 = RewardUnlockLayer::create((unsigned int)result, a1, v3, v4);
*(_QWORD *)(a1 + 720) = v5;
v6 = (*(double (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v5);
v7 = GameLevelManager::sharedState(v6);
v8 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
return GameLevelManager::getGJRewards(v7, v8);
}
return result;
}
}
else
{
if ( (_DWORD)result != 1 )
goto LABEL_4;
v4 = 680;
if ( *(_BYTE *)(a1 + 712) )
goto LABEL_4;
}
v9 = *(_QWORD *)(a1 + v4);
if ( v9 )
{
cocos2d::CCNode::stopAllActions(*(_QWORD *)(a1 + v4));
v12 = 0;
v11 = 19455;
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v9 + 1072LL))(v9, &v11);
v10 = cocos2d::CCTintTo::create(255, 255, 255, 1.0);
return cocos2d::CCNode::runAction(v9, v10);
}
return result;
}