//
// ChallengesPage::challengeStatusFinished from 0x10003624c to 0x100036370 (292 bytes)
//
// 2 xrefs:
// > sub_10003644C @ 0x100036450
// > ??> @ 0x1008b46b8
//
// 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::challengeStatusFinished(__int64 a1)
{
unsigned int v2; // w21
__int64 i; // x20
float v4; // s8
__int64 v5; // x0
__int64 v6; // x0
__int64 v7; // x0
ChallengesPage::updateTimers(a1);
v2 = 0;
for ( i = 1; i != 4; ++i )
{
v4 = (float)v2 * 0.15;
v5 = cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(a1 + 728), i);
if ( v5 )
{
if ( *(_BYTE *)(v5 + 352) == 1 )
{
v6 = GameStatsManager::sharedState(v5);
if ( sub_1003D1E18(v6, i) )
{
ChallengesPage::exitNodeAtSlot(a1, i, (float)v2 * 0.15);
v4 = v4 + 0.5;
}
}
}
if ( ChallengesPage::createChallengeNode(a1, i, 0, 0, v4) )
++v2;
}
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 696) + 344LL))(*(_QWORD *)(a1 + 696), 1);
ChallengesPage::updateTimers(a1);
cocos2d::CCNode::unschedule(a1, ChallengesPage::updateTimers, 0);
cocos2d::CCNode::schedule(a1, ChallengesPage::updateTimers, 0, 1.0);
v7 = *(_QWORD *)(a1 + 704);
if ( v7 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 344LL))(v7, 0);
return ChallengesPage::updateDots(a1);
}