//
// ChallengesPage::show from 0x1400867f0 to 0x140086981 (401 bytes)
//
// 19 xrefs:
// > CreatorLayer::onAdventureMap @ 0x14009e39e
// > CreatorLayer::onChallenge @ 0x14009e57d
// > GJGarageLayer::onShards @ 0x140278e2b
// > GJGarageLayer::onPaint @ 0x140278f92
// > CreatorLayer::onAdventureMap @ 0x14009e38f
// > CreatorLayer::onChallenge @ 0x14009e564
// > GJGarageLayer::onShards @ 0x140278e0d
// > GJGarageLayer::onPaint @ 0x140278f83
// > ??> @ 0x14053d648
// > ??> @ 0x14053e330
// > ??> @ 0x14054fda8
// > ??> @ 0x140557648
// > ??> @ 0x14056e370
// > ??> @ 0x14056e7b8
// > ??> @ 0x140579f60
// > ??> @ 0x140588550
// > ??> @ 0x14060aa28
// > ??> @ 0x140621888
// > ??> @ 0x1406c6c78
//
// 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
//
// Merged with: ChallengesPage::show, CharacterColorPage::show, DailyLevelPage::show, FollowRewardPage::show, GJPathPage::show, GJPathsLayer::show, GJPromoPopup::show, LevelLeaderboard::show, ShardsPage::show, TopArtistsLayer::show
void __fastcall ChallengesPage::show(__int64 a1, __int64 a2, __int64 a3, float a4)
{
float v5; // xmm6_4
const struct cocos2d::CCPoint *v6; // rax
__int64 v7; // rbx
__int64 v8; // rax
struct cocos2d::CCMoveTo *v9; // rax
struct cocos2d::CCEaseElasticOut *v10; // rax
cocos2d::ccColor3B *v11; // r8
__int64 v12; // rcx
cocos2d::CCScene *v13; // rbx
int v14; // eax
struct cocos2d::CCFadeTo *v15; // rax
cocos2d::ccColor3B *v16; // r8
__int64 v17; // rdx
float v18; // [rsp+20h] [rbp-18h]
float v19; // [rsp+20h] [rbp-18h]
cocos2d::CCPoint v20; // [rsp+40h] [rbp+8h] BYREF
cocos2d::CCPoint v21; // [rsp+48h] [rbp+10h] BYREF
if ( *(_BYTE *)(a1 + 588) )
{
FLAlertLayer::show((FLAlertLayer *)a1);
}
else
{
v5 = (float)(*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)(a1 + 408) + 32LL))(a1 + 408);
v6 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 576) + 200LL))(*(_QWORD *)(a1 + 576));
cocos2d::CCPoint::CCPoint(&v20, v6);
v7 = **(_QWORD **)(a1 + 576);
cocos2d::CCPoint::CCPoint(&v21, -160.0, v20.y);
(*(void (__fastcall **)(_QWORD, __int64))(v7 + 184))(*(_QWORD *)(a1 + 576), v8);
v9 = cocos2d::CCMoveTo::create(0.5, &v20);
v10 = cocos2d::CCEaseElasticOut::create(v9, 0.60000002);
cocos2d::CCNode::runAction(*(CCLightFlash **)(a1 + 576), (cocos2d::CCPoint)v10, v11, a4, v18);
v13 = *(cocos2d::CCScene **)(cocos2d::CCDirector::sharedDirector(v12) + 264);
if ( *(_QWORD *)(a1 + 560) )
{
v13 = *(cocos2d::CCScene **)(a1 + 560);
}
else
{
if ( cocos2d::CCScene::getHighestChildZ(v13) + 1 >= 105 )
v14 = cocos2d::CCScene::getHighestChildZ(v13) + 1;
else
v14 = 105;
*(_DWORD *)(a1 + 584) = v14;
}
if ( !*(_DWORD *)(a1 + 584) )
*(_DWORD *)(a1 + 584) = 105;
((void (__fastcall *)(cocos2d::CCScene *, __int64))v13->addChild_0)(v13, a1);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(a1 + 408) + 40LL))(a1 + 408, 0);
v15 = cocos2d::CCFadeTo::create(0.14, (int)v5);
cocos2d::CCNode::runAction((CCLightFlash *)a1, (cocos2d::CCPoint)v15, v16, a4, v19);
LOBYTE(v17) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 320LL))(a1, v17);
}
}