//
// ChallengesPage::claimItem from 0x100036788 to 0x1000368b8 (304 bytes)
//
// 1 xrefs:
// > ChallengeNode::onClaimReward @ 0x1000375e4
//
// 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 10:57:32 +0000
//
__int64 __fastcall ChallengesPage::claimItem(_QWORD *a1, __int64 a2, _DWORD *a3, double *a4)
{
__int64 v7; // x20
__int64 v8; // x0
__int64 v9; // x23
__int64 v10; // x21
__int64 v11; // x0
__int64 v12; // x0
__int64 v13; // x0
__int64 v15; // [xsp+18h] [xbp-38h] BYREF
v7 = (unsigned int)a3[26];
v8 = GameStatsManager::sharedState(a1);
sub_1003D204C(v8, a3);
v9 = a1[90];
v10 = (unsigned int)(a3[18] - a3[19]);
sub_1000262F4(&v15, a4);
if ( v9 )
{
sub_1003BE0E4(v9, 3, v10, &v15, 0.0);
}
else
{
v11 = CurrencyRewardLayer::create(0, 0, 0, v10, 0, 0, 0, 0, 0.0, 1.0, &v15, 0);
a1[90] = v11;
*(_QWORD *)(v11 + 408) = a1 + 85;
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v11, 14);
}
v12 = ChallengesPage::exitNodeAtSlot((__int64)a1, v7, 0.0);
v13 = GameStatsManager::sharedState(v12);
GameStatsManager::processChallengeQueue(v13, v7);
ChallengesPage::createChallengeNode((__int64)a1, v7, 0, 1, 0.5);
ChallengesPage::updateTimers((__int64)a1);
return ChallengesPage::updateDots((__int64)a1);
}