//
// ChallengeNode::onClaimReward from 0x140087d80 to 0x140087e75 (245 bytes)
//
// 2 xrefs:
// > ChallengeNode::init @ 0x140087b23
// > ??> @ 0x1406c6cb4
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=2
void ChallengeNode::onClaimReward(ChallengeNode *a1, cocos2d::CCObject *a2)
{
const cocos2d::CCPoint *v4; // rax
ChallengeNode *v5; // rdx
int v6; // ecx
_QWORD v7[5]; // [rsp+20h] [rbp-28h] BYREF
char v8; // [rsp+50h] [rbp+8h] BYREF
_QWORD *v9; // [rsp+58h] [rbp+10h]
FMODAudioEngine *v10; // [rsp+60h] [rbp+18h]
v4 = a1->getPosition_0(a1);
cocos2d::CCPoint::operator+(v4, &v8);
ChallengesPage::claimItem(a1->m_challengesPage, v5, a1->m_challengeItem, (cocos2d::CCPoint)&v8);
v9 = v7;
v7[1] = 26471;
v7[2] = 10;
v7[3] = 15;
v7[0] = 0x6F2E3230646C6F67LL;
v6 = qword_1406C2E88;
if ( !qword_1406C2E88 )
{
v10 = (FMODAudioEngine *)operator new(0x888u);
qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);
v6 = qword_1406C2E88;
}
FMODAudioEngine::playEffect_1(v6, (__int64)v7);
((void (__fastcall *)(cocos2d::CCObject *, _QWORD))a2->__vftable[4].update)(a2, 0);
((void (__fastcall *)(cocos2d::CCObject *, _QWORD))a2->__vftable[12].getTag)(a2, 0);
}