//
// GJPathRewardPopup::onClaim from 0x1002ee0f0 to 0x1002ee214 (292 bytes)
//
// 1 xrefs:
// > GJPathRewardPopup::init @ 0x1002edd20
//
// 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:28:24 +0000
//
__int64 __fastcall GJPathRewardPopup::onClaim(unsigned int *a1, __m128 a2)
{
__int64 v3; // rax
__int64 v4; // rsi
__int64 v5; // rdi
__int64 v6; // rax
__int64 v7; // r14
__int64 v8; // rax
int v9; // r15d
int v10; // eax
int v11; // ecx
int v12; // r8d
int v13; // r9d
__int64 v14; // rax
char *v15; // r15
__int64 v16; // r12
int v17; // eax
__int64 v19; // rax
__int64 v20; // rax
v3 = GameStatsManager::sharedState();
v4 = a1[165];
v5 = v3;
v6 = GameStatsManager::unlockPathChest(v3, v4, a2);
if ( v6 )
{
v7 = v6;
v8 = cocos2d::CCFadeTo::create(0, 0.2);
cocos2d::CCNode::runAction((__int64)a1, v8);
v9 = cocos2d::CCDelayTime::create(0.2);
v10 = cocos2d::CCCallFunc::create(a1, GJPathRewardPopup::closePopup, 0);
v14 = sub_10039EB60(v9, v10, 0, v11, v12, v13);
cocos2d::CCNode::runAction((__int64)a1, v14);
v15 = RewardUnlockLayer::create(*(_DWORD *)(v7 + 64), 0);
v16 = (*(__int64 (__fastcall **)(unsigned int *))(*(_QWORD *)a1 + 512LL))(a1);
v17 = (*(__int64 (__fastcall **)(unsigned int *))(*(_QWORD *)a1 + 104LL))(a1);
(*(void (__fastcall **)(__int64, char *, _QWORD))(*(_QWORD *)v16 + 464LL))(v16, v15, (unsigned int)(v17 + 1));
return RewardUnlockLayer::showCollectReward((__int64)v15, v7);
}
else
{
v19 = cocos2d::CCDirector::sharedDirector(v5, v4);
v20 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v19 + 160LL))(v19);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v20, a1);
cocos2d::CCNode::stopAllActions((__int64)a1);
cocos2d::CCNode::unscheduleAllSelectors((__int64)a1);
(*(void (__fastcall **)(unsigned int *, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0);
return (*(__int64 (__fastcall **)(unsigned int *, __int64))(*(_QWORD *)a1 + 528LL))(a1, 1);
}
}