//
// ChallengesPage::claimItem from 0x600ad0 to 0x600bac (220 bytes)
//
// 1 xrefs:
// > ChallengeNode::onClaimReward @ 0x600bea
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:54:40 +0000
//
GameStatsManager *__fastcall ChallengesPage::claimItem(
GameStatsManager *a1,
int a2,
GJChallengeItem *a3,
const cocos2d::CCPoint *a4)
{
const char *v7; // r9
GameManager *v8; // r0
int v9; // r2
int v10; // r3
int v11; // r5
int v12; // r7
int v13; // r3
int v14; // r0
GameStatsManager *v15; // r0
GameStatsManager *v16; // r0
_BYTE v18[8]; // [sp+24h] [bp-10h] BYREF
v7 = *((const char **)a3 + 25);
v8 = (GameManager *)GameStatsManager::sharedState(a1);
GameStatsManager::completedChallenge(v8, a3, v9, v10);
v11 = *((_DWORD *)a1 + 137);
v12 = *((_DWORD *)a3 + 17) - *((_DWORD *)a3 + 18);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, a4);
if ( v11 )
{
CurrencyRewardLayer::createObjects(v11, 3, v12, (cocos2d::CCPoint *)v18, 0.0);
}
else
{
v14 = CurrencyRewardLayer::create(0, 0, 0, v12, 0, 0, 0, 0, (int)v18, 0, 0.0, 1.0);
*((_DWORD *)a1 + 137) = v14;
*(_DWORD *)(v14 + 316) = (char *)a1 + 528;
(*(void (__fastcall **)(GameStatsManager *, _DWORD, int))(*(_DWORD *)a1 + 232))(a1, *((_DWORD *)a1 + 137), 14);
}
v15 = ChallengesPage::exitNodeAtSlot((cocos2d::CCDictionary **)a1, (int)v7, nullptr, v13);
v16 = (GameStatsManager *)GameStatsManager::sharedState(v15);
GameStatsManager::processChallengeQueue(v16, v7);
ChallengesPage::createChallengeNode((cocos2d::CCDictionary **)a1, v7, 0, (cocos2d::CCDelayTime *)0x3F000000, 1);
ChallengesPage::updateTimers(a1, 0.0);
return ChallengesPage::updateDots(a1);
}