//
// ChallengeNode::onClaimReward from 0xa645d8 to 0xa64708 (304 bytes)
//
// 3 xrefs:
// > ??> @ 0xfe128
// > ChallengeNode::init @ 0xa63344
// > ??> @ 0x1547bd8
//
// 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 13:00:16 +0000
//
__int64 __fastcall ChallengeNode::onClaimReward(ChallengeNode *this, cocos2d::CCObject *a2)
{
cocos2d::CCDictionary **v4; // x24
__int64 v5; // x0
FMODAudioEngine *v6; // x0
__int64 v7; // x19
GJChallengeItem *v9; // [xsp+40h] [xbp+40h]
__int64 v10; // [xsp+58h] [xbp+58h] BYREF
__int64 v11[2]; // [xsp+60h] [xbp+60h] BYREF
void *v12; // [xsp+70h] [xbp+70h]
v4 = *((cocos2d::CCDictionary ***)this + 40);
v9 = *((GJChallengeItem **)this + 41);
v5 = (*(__int64 (**)(void))(*(_QWORD *)this + 192LL))();
cocos2d::CCPoint::operator+(&v10, v5);
v6 = (FMODAudioEngine *)ChallengesPage::claimItem(v4, (__int64)this, v9, (const cocos2d::CCPoint *)&v10);
v7 = FMODAudioEngine::sharedEngine(v6);
v11[0] = 0;
v11[1] = 0;
v12 = nullptr;
std::string::__init(v11, "gold02.ogg", 0xAu);
FMODAudioEngine::playUIEffect(v7, (char *)v11, 1.0, 0.0, 1.0);
if ( (v11[0] & 1) != 0 )
operator delete(v12);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)a2 + 344LL))(a2, 0);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)a2 + 1056LL))(a2, 0);
return _stack_chk_guard;
}