//
// CreatorLayer::checkQuestsStatus from 0x14009f620 to 0x14009f73e (286 bytes)
//
// 3 xrefs:
// > CreatorLayer::init @ 0x14009ca1f
// > CreatorLayer::sceneWillResume @ 0x14009f9b8
// > ??> @ 0x1406c7644
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=1
void CreatorLayer::checkQuestsStatus(CreatorLayer *a1)
{
cocos2d::CCSprite *m_questsSprite; // rcx
int v3; // ebx
GameStatsManager *v4; // rcx
GJChallengeItem *Challenge; // rax
struct cocos2d::CCSprite *v6; // rdi
cocos2d::CCSprite_vtbl *v7; // rbx
__int64 v8; // rax
const cocos2d::CCPoint *v9; // rax
void *v10; // [rsp+30h] [rbp+8h] BYREF
cocos2d::CCPoint v11; // [rsp+38h] [rbp+10h] BYREF
m_questsSprite = a1->m_questsSprite;
if ( m_questsSprite )
{
m_questsSprite->removeAllChildren(m_questsSprite);
v3 = 1;
while ( 1 )
{
v4 = (GameStatsManager *)qword_1406C2EE8;
if ( !qword_1406C2EE8 )
{
v10 = operator new(0x3E0u);
qword_1406C2EE8 = sub_1401D0AE0(v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);
v4 = (GameStatsManager *)qword_1406C2EE8;
}
Challenge = GameStatsManager::getChallenge(v4, v3);
if ( Challenge )
{
if ( Challenge->m_canClaim )
break;
}
if ( ++v3 > 3 )
return;
}
v6 = cocos2d::CCSprite::createWithSpriteFrameName("exMark_001.png");
a1->m_questsSprite->addChild_0(a1->m_questsSprite, v6, 10);
((void (__fastcall *)(struct cocos2d::CCSprite *))v6->setScale_0)(v6);
v7 = v6->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v8 = ((__int64 (__fastcall *)(cocos2d::CCSprite *, void **))a1->m_questsSprite->getScaledContentSize)(
a1->m_questsSprite,
&v10);
cocos2d::CCPoint::CCPoint(&v11, 20.0, *(float *)(v8 + 4));
v7->setPosition_0(v6, v9);
}
}