//
// RewardUnlockLayer::showCollectReward from 0x10025a74c to 0x10025a810 (196 bytes)
//
// 16 xrefs:
// > sub_10007F15C @ 0x10007f27c
// > GJShopLayer::dialogClosed @ 0x1001cc028
// > sub_100225FB0 @ 0x100226034
// > DailyLevelPage::claimLevelReward @ 0x1002507d0
// > GauntletSelectLayer::onPlay @ 0x100255858
// > RewardsPage::rewardsStatusFinished @ 0x10025a6cc
// > SecretRewardsLayer::onGoldChest @ 0x100384f88
// > sub_100385500 @ 0x100385710
// > SecretRewardsLayer::onSelectItem @ 0x1003866b8
// > sub_1003AC8A0 @ 0x1003ac958
// > sub_1003AC98C @ 0x1003aca44
// > sub_1003F52C4 @ 0x1003f5374
// > sub_10046293C @ 0x100462a2c
// > LevelBrowserLayer::claimRecallChest @ 0x10049b6c8
// > sub_1004A7AD4 @ 0x1004a7f3c
// > NotificationsPage::notificationRewardFinished @ 0x10053bd68
//
// 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 11:01:35 +0000
//
__int64 __fastcall RewardUnlockLayer::showCollectReward(__int64 a1, __int64 a2)
{
_DWORD *v4; // x0
__int64 result; // x0
if ( !a2 )
return 0;
v4 = *(_DWORD **)(a1 + 704);
if ( v4 )
cocos2d::CCObject::release(v4);
*(_QWORD *)(a1 + 704) = a2;
cocos2d::CCObject::retain(a2);
if ( *(_BYTE *)(a2 + 80) == 1 && *(_DWORD *)(a2 + 64) != *(_DWORD *)(a1 + 696) )
return 0;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 720) + 344LL))(*(_QWORD *)(a1 + 720), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 720) + 1056LL))(*(_QWORD *)(a1 + 720), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 712) + 344LL))(*(_QWORD *)(a1 + 712), 0);
result = 1;
*(_BYTE *)(a1 + 700) = 1;
if ( *(_BYTE *)(a1 + 701) == 1 )
{
RewardUnlockLayer::playRewardEffect(a1);
return 1;
}
return result;
}