//
// ChallengesPage::canCollectQuests from 0x14009e380 to 0x14009e3f3 (115 bytes)
//
// 4 xrefs:
// > CreatorLayer::init @ 0x140135f9d
// > CreatorLayer::sceneWillResume @ 0x140139927
// > PauseLayer::customSetup @ 0x1404d7c00
// > ??> @ 0x140912fb0
//
// 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 11:26:05 +0000
//
// Hidden C++ exception states: #wind=1
char ChallengesPage::canCollectQuests()
{
unsigned int v0; // ebx
__int64 v1; // rcx
__int64 Challenge; // rax
void *v4; // [rsp+30h] [rbp+8h]
v0 = 1;
while ( 1 )
{
v1 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v4 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v4);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v1 = qword_14090BFE0;
}
Challenge = GameStatsManager::getChallenge(v1, v0);
if ( Challenge )
{
if ( *(_BYTE *)(Challenge + 100) )
break;
}
if ( (int)++v0 > 3 )
return 0;
}
return 1;
}