//
// ChallengesPage::challengeStatusFailed from 0x100387dd0 to 0x100387e52 (130 bytes)
//
// 2 xrefs:
// > sub_100387EA0 @ 0x100387eac
// > ??> @ 0x100b2c590
//
// This function is hookable on this platform (idp: pc, 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 12:29:10 +0000
//
char __fastcall ChallengesPage::challengeStatusFailed(__int64 a1)
{
__int64 v2; // rax
char result; // al
int v4; // r14d
int v5; // eax
int v6; // ecx
int v7; // r8d
int v8; // r9d
__int64 v9; // rax
__int64 v10; // rdi
v2 = GameStatsManager::sharedState();
result = GameStatsManager::areChallengesLoaded(v2);
if ( !result )
{
v4 = cocos2d::CCDelayTime::create(5.0);
v5 = cocos2d::CCCallFunc::create(a1, ChallengesPage::tryGetChallenges, 0);
v9 = sub_10039EB60(v4, v5, 0, v6, v7, v8);
result = cocos2d::CCNode::runAction(a1, v9);
}
v10 = *(_QWORD *)(a1 + 704);
if ( v10 )
{
if ( *(_BYTE *)(a1 + 712) == 1 )
return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v10 + 344LL))(v10, 0);
}
return result;
}