//
// RewardUnlockLayer::create from 0x140563580 to 0x1405636b5 (309 bytes)
//
// 17 xrefs:
// > DailyLevelPage::claimLevelReward @ 0x140172616
// > FollowRewardPage::onSpecialItem @ 0x14020e93c
// > GauntletSelectLayer::onPlay @ 0x1402ffd8e
// > GJPathRewardPopup::onClaim @ 0x14039836a
// > GJShopLayer::dialogClosed @ 0x1403b4c45
// > LevelBrowserLayer::claimRecallChest @ 0x1403eb48d
// > NotificationsPage::notificationRewardFinished @ 0x140478db3
// > RewardsPage::onReward @ 0x140562ca1
// > SecretRewardsLayer::onSelectItem @ 0x14056bfd2
// > SecretRewardsLayer::onSpecialItem @ 0x14056c88f
// > SecretRewardsLayer::onGoldChest @ 0x14056d06e
// > SecretLayer3::onChest01 @ 0x14058121a
// > SecretLayer3::onChest02 @ 0x14058139a
// > SecretLayer4::onChest01 @ 0x14058656d
// > SecretLayer5::claimOnlineReward @ 0x14058c166
// > SupportLayer::onGetReward @ 0x14066b19e
// > ??> @ 0x14092c4f8
//
// 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 11:34:15 +0000
//
// Hidden C++ exception states: #wind=1
_QWORD *__fastcall RewardUnlockLayer::create(unsigned int a1, __int64 a2)
{
_QWORD *v4; // rsi
v4 = operator new(0x2E8u);
FLAlertLayer::FLAlertLayer((__int64)v4);
*v4 = &RewardUnlockLayer::`vftable';
v4[40] = &RewardUnlockLayer::`vftable';
v4[41] = &RewardUnlockLayer::`vftable';
v4[42] = &RewardUnlockLayer::`vftable';
v4[43] = &RewardUnlockLayer::`vftable';
v4[44] = &RewardUnlockLayer::`vftable';
v4[51] = &RewardUnlockLayer::`vftable';
v4[54] = &RewardUnlockLayer::`vftable';
v4[68] = &RewardUnlockLayer::`vftable';
v4[83] = &RewardUnlockLayer::`vftable';
v4[84] = 0;
v4[85] = 0;
v4[86] = 0;
*((_DWORD *)v4 + 174) = 0;
*((_WORD *)v4 + 350) = 0;
v4[88] = 0;
*((_DWORD *)v4 + 184) = 0;
if ( (unsigned __int8)RewardUnlockLayer::init(v4, a1, a2) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v4);
return v4;
}
else
{
(*(void (__fastcall **)(_QWORD *, __int64))(*v4 + 8LL))(v4, 1);
return nullptr;
}
}