//
// CreatorLayer::onChallenge from 0x14009e420 to 0x14009e58f (367 bytes)
//
// 2 xrefs:
// > CreatorLayer::init @ 0x14009c664
// > ??> @ 0x1406c7620
//
// 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::onChallenge(CreatorLayer *a1, cocos2d::CCObject *a2)
{
float v2; // xmm3_4
__int64 v3; // rax
ChallengesPage *v4; // rbx
__int64 v5; // r8
void (__fastcall *show)(__int64, __int64, __int64, float); // rdx
v3 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->__vftable[13].copyWithZone)(a2);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v3 + 552LL))(v3);
v4 = (ChallengesPage *)operator new(0x2C0u);
FLAlertLayer::FLAlertLayer(v4);
v4->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (ChallengesPage_vtbl *)&ChallengesPage::`vftable';
v4->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&ChallengesPage::`vftable';
v4->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&ChallengesPage::`vftable';
v4->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&ChallengesPage::`vftable';
v4->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&ChallengesPage::`vftable';
v4->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&ChallengesPage::`vftable';
v4->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&ChallengesPage::`vftable';
v4->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCBlendProtocol_vtbl *)&ChallengesPage::`vftable';
v4->FLAlertLayerProtocol::__vftable = (FLAlertLayerProtocol_vtbl *)&ChallengesPage::`vftable';
v4->GJChallengeDelegate::__vftable = (GJChallengeDelegate_vtbl *)&ChallengesPage::`vftable';
v4->CurrencyRewardDelegate::__vftable = (CurrencyRewardDelegate_vtbl *)&ChallengesPage::`vftable';
v4->m_dots = nullptr;
v4->m_countdownLabel = nullptr;
v4->m_circle = nullptr;
*(_WORD *)&v4->m_triedToLoad = 0;
v4->m_currencyRewardLayer = nullptr;
v4->m_challengeNodes = nullptr;
if ( ChallengesPage::init(v4) )
{
cocos2d::CCObject::autorelease(v4);
}
else
{
((void (__fastcall *)(ChallengesPage *, __int64))v4->~ChallengesPage)(v4, 1);
v4 = nullptr;
}
show = (void (__fastcall *)(__int64, __int64, __int64, float))v4->show;
if ( show == ChallengesPage::show )
ChallengesPage::show((__int64)v4, (__int64)show, v5, v2);
else
((void (__fastcall *)(ChallengesPage *))show)(v4);
}