//
// LevelInfoLayer::onPlay from 0x7e7a2c to 0x7e83ac (2432 bytes)
//
// 8 xrefs:
// > LevelInfoLayer::FLAlert_Clicked @ 0x7e8458
// > LevelInfoLayer::FLAlert_Clicked @ 0x7e84ec
// > LevelInfoLayer::FLAlert_Clicked @ 0x7e8510
// > LevelInfoLayer::FLAlert_Clicked @ 0x7e8554
// > LevelInfoLayer::keyDown @ 0x7ed0b8
// > ??> @ 0xf9310
// > LevelInfoLayer::init @ 0x7eb0d8
// > ??> @ 0x1547930
//
// This function is hookable on this platform (idp: arm, 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:54:29 +0000
//
__int64 __fastcall LevelInfoLayer::onPlay(LevelInfoLayer *this, cocos2d::CCObject *a2)
{
cocos2d::CCDirector *v3; // x0
cocos2d::CCDirector *v5; // x0
__int64 v6; // x0
cocos2d::CCDirector *v7; // x0
__int64 v8; // x0
_BOOL8 shouldDownloadLevel; // x0
GameManager *v10; // x0
__int64 v11; // x0
int v12; // w1
GameManager *v13; // x0
__int64 v14; // x0
int v15; // w2
int v16; // w3
__int64 v17; // x1
int v18; // w1
FLAlertLayer *v19; // x19
__int64 v20; // x2
FMODAudioEngine *v21; // x0
FMODAudioEngine *v22; // x0
FMODAudioEngine *v23; // x0
__int64 v24; // x22
GameManager *v25; // x0
cocos2d::CCDelayTime *v26; // x0
cocos2d::CCSequence *v27; // x21
cocos2d::CCFiniteTimeAction *v28; // x0
cocos2d::CCAction *v29; // x0
char *v30; // x1
int v31; // w4
int v32; // w0
int v33; // w0
__int64 v34; // x23
void (__fastcall *v35)(__int64, _BYTE *); // x25
__int64 v36; // x0
const char *v37; // x1
__int64 v38; // x23
void (__fastcall *v39)(__int64, _BYTE *); // x24
__int64 v40; // x0
const char *v41; // x1
__int64 v42; // x23
void (__fastcall *v43)(__int64, _BYTE *); // x24
__int64 v44; // x0
__int64 v45; // x0
void (__fastcall *v46)(__int64, _BYTE *); // x3
const char *v47; // x1
cocos2d::CCProgressTimer *v48; // x22
cocos2d::CCSprite *v49; // x1
__int64 v50; // x0
__int64 v51; // x22
void (__fastcall *v52)(__int64, _BYTE *); // x23
__int64 v53; // x0
GameManager *v54; // x0
__int64 v55; // x1
int v56; // w0
char *v57; // x19
const char *v58; // x1
size_t v59; // x0
__int64 v60; // x19
MusicDownloadManager *v61; // x0
GameManager *v62; // x0
GameManager *GameVariable; // x0
GameManager *v64; // x0
float v65; // [xsp+50h] [xbp+50h]
float v66; // [xsp+50h] [xbp+50h]
float v67; // [xsp+50h] [xbp+50h]
float v68; // [xsp+50h] [xbp+50h]
char *v69; // [xsp+50h] [xbp+50h]
char v70; // [xsp+68h] [xbp+68h] BYREF
char v71; // [xsp+69h] [xbp+69h]
char v72; // [xsp+6Ah] [xbp+6Ah]
_BYTE v73[8]; // [xsp+70h] [xbp+70h] BYREF
char v74; // [xsp+78h] [xbp+78h] BYREF
char v75; // [xsp+79h] [xbp+79h]
char v76; // [xsp+7Ah] [xbp+7Ah]
_BYTE v77[8]; // [xsp+80h] [xbp+80h] BYREF
__int64 v78[2]; // [xsp+88h] [xbp+88h] BYREF
void *v79; // [xsp+98h] [xbp+98h]
GameManager *v80; // [xsp+A0h] [xbp+A0h] BYREF
__int64 v81; // [xsp+A8h] [xbp+A8h]
void *v82; // [xsp+B0h] [xbp+B0h]
if ( *((_BYTE *)this + 488) )
return _stack_chk_guard;
v3 = (cocos2d::CCDirector *)*((unsigned __int8 *)this + 645);
if ( !*((_BYTE *)this + 645) || *(_BYTE *)(cocos2d::CCDirector::sharedDirector(v3) + 176) )
return _stack_chk_guard;
v5 = *((cocos2d::CCDirector **)this + 69);
if ( v5 )
{
v6 = cocos2d::CCDirector::sharedDirector(v5);
v7 = (cocos2d::CCDirector *)*(unsigned __int8 *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 192LL))(v6)
+ 129);
if ( (_DWORD)v7
|| (v8 = cocos2d::CCDirector::sharedDirector(v7),
*(_BYTE *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 192LL))(v8) + 131)) )
{
LevelInfoLayer::onEdit((GJGameLevel **)this, nullptr);
return _stack_chk_guard;
}
}
shouldDownloadLevel = LevelInfoLayer::shouldDownloadLevel(this);
if ( shouldDownloadLevel )
{
LevelInfoLayer::downloadLevel(this);
return _stack_chk_guard;
}
v10 = (GameManager *)GameManager::sharedState((GameManager *)shouldDownloadLevel);
if ( (unsigned __int8)GameManager::getGameVariable(v10, "0083") )
goto LABEL_28;
v11 = *((_QWORD *)this + 63);
if ( *(_DWORD *)(v11 + 608) && !*(_BYTE *)(v11 + 1048) )
{
v61 = (MusicDownloadManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)v11);
if ( !(unsigned __int8)MusicDownloadManager::isSongDownloaded(v61, *(_DWORD *)(*((_QWORD *)this + 63) + 608LL)) )
{
LevelInfoLayer::showSongWarning(this);
return _stack_chk_guard;
}
LABEL_28:
v11 = *((_QWORD *)this + 63);
}
if ( *(int *)(v11 + 964) > 0 )
{
v12 = *(_DWORD *)(v11 + 968);
v13 = (GameManager *)*(unsigned int *)(v11 + 972);
if ( v12 == (_DWORD)v13 )
{
v62 = (GameManager *)GameManager::sharedState(v13);
GameVariable = (GameManager *)(unsigned __int8)GameManager::getGameVariable(v62, "0063");
if ( !(_BYTE)GameVariable )
{
v64 = (GameManager *)GameManager::sharedState(GameVariable);
GameManager::setGameVariable(v64, "0063", 1u);
v80 = nullptr;
v81 = 0;
v82 = nullptr;
std::string::__init(
(__int64 *)&v80,
"This level contains unverified user coins (bronze).\n"
"The coins will not count until they become verified (silver).",
0x81u);
v19 = (FLAlertLayer *)FLAlertLayer::create(
(__int64)this + 440,
(cocos2d::CCLabelBMFont *)"Unverified Coins",
(char *)&v80,
(ButtonSprite *)"OK",
nullptr,
300.0);
if ( ((unsigned __int8)v80 & 1) != 0 )
operator delete(v82);
LABEL_26:
(*(void (__fastcall **)(FLAlertLayer *))(*(_QWORD *)v19 + 1312LL))(v19);
return _stack_chk_guard;
}
}
}
if ( *((_BYTE *)this + 744) )
goto LABEL_29;
v14 = *((_QWORD *)this + 63);
v15 = *(unsigned __int8 *)(v14 + 1472);
v16 = v15 & 1;
if ( (v15 & 1) != 0 )
{
if ( !*(_QWORD *)(v14 + 1480) )
{
v17 = *(_QWORD *)(v14 + 1480);
goto LABEL_22;
}
goto LABEL_18;
}
LODWORD(v17) = v15 >> 1;
if ( v15 >> 1 )
{
LABEL_18:
if ( *(_DWORD *)(v14 + 1520) == *(_DWORD *)(v14 + 788) && *(_DWORD *)(v14 + 1524) == 4 )
{
v18 = *(unsigned __int8 *)(v14 + 1472);
}
else
{
GJGameLevel::clearPlatformerSave((GJGameLevel *)v14);
v14 = *((_QWORD *)this + 63);
v18 = *(unsigned __int8 *)(v14 + 1472);
v16 = v18 & 1;
}
if ( v16 )
{
v17 = *(_QWORD *)(v14 + 1480);
goto LABEL_22;
}
LODWORD(v17) = v18 >> 1;
}
v17 = (int)v17;
LABEL_22:
if ( v17 )
{
v80 = nullptr;
v81 = 0;
v82 = nullptr;
std::string::__init(
(__int64 *)&v80,
"There is a saved checkpoint for this level.\nDo you want to load it?",
0x5Bu);
v19 = (FLAlertLayer *)FLAlertLayer::create(
(__int64)this + 440,
(cocos2d::CCLabelBMFont *)"Load Save",
(char *)&v80,
(ButtonSprite *)"New Game",
(ButtonSprite *)"Load Save",
380.0);
if ( ((unsigned __int8)v80 & 1) != 0 )
operator delete(v82);
FLAlertLayer::addCloseButton(v19);
v20 = *(_QWORD *)v19;
*((_BYTE *)v19 + 656) = 1;
(*(void (__fastcall **)(FLAlertLayer *, __int64))(v20 + 72))(v19, 14);
goto LABEL_26;
}
v54 = (GameManager *)GameManager::sharedState((GameManager *)v14);
if ( !(unsigned __int8)GameManager::getGameVariable(v54, "0082") )
{
v55 = *((_QWORD *)this + 63);
v56 = *(_DWORD *)(v55 + 620) - *(_DWORD *)(v55 + 624);
if ( v56 > 40000 && !*(_BYTE *)(v55 + 1200) )
{
v78[0] = 0;
v78[1] = 0;
v79 = nullptr;
if ( v56 <= 80000 )
std::string::assign(
v78,
"This level has a high object count and can be unstable on some devices. This may affect pe"
"rformance, load time etc.");
else
std::string::assign(
v78,
"This level has a VERY HIGH object count and can be unstable on some devices. This may affect <"
"cg>performance, load time etc.");
v57 = (char *)this + 440;
v58 = (char *)v78 + 1;
if ( (v78[0] & 1) != 0 )
v58 = (const char *)v79;
v69 = (char *)v58;
v80 = nullptr;
v81 = 0;
v82 = nullptr;
v59 = strlen(v58);
std::string::__init((__int64 *)&v80, v69, v59);
v60 = FLAlertLayer::create(
(__int64)v57,
(cocos2d::CCLabelBMFont *)"High Objects",
(char *)&v80,
(ButtonSprite *)"Cancel",
(ButtonSprite *)"Play",
380.0);
if ( ((unsigned __int8)v80 & 1) != 0 )
operator delete(v82);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v60 + 72LL))(v60, 10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v60 + 1312LL))(v60);
if ( (v78[0] & 1) != 0 )
operator delete(v79);
return _stack_chk_guard;
}
}
LABEL_29:
if ( !*((_BYTE *)this + 488) )
{
v21 = (FMODAudioEngine *)(*(__int64 (__fastcall **)(LevelInfoLayer *, _QWORD))(*(_QWORD *)this + 1072LL))(this, 0);
*((_BYTE *)this + 488) = 1;
v22 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v21);
v23 = (FMODAudioEngine *)FMODAudioEngine::stopAllMusic(v22, 1);
v24 = FMODAudioEngine::sharedEngine(v23);
v80 = nullptr;
v81 = 0;
v82 = nullptr;
std::string::__init((__int64 *)&v80, "playSound_01.ogg", 0x10u);
FMODAudioEngine::playEffect(v24, (char *)&v80, 1.0, 0.0, 0.3);
v25 = (GameManager *)(unsigned __int8)v80;
if ( ((unsigned __int8)v80 & 1) != 0 )
operator delete(v82);
v26 = (cocos2d::CCDelayTime *)GameManager::sharedState(v25);
*((_BYTE *)v26 + 1136) = 1;
v27 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(v26, 0.0);
v28 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(this, LevelInfoLayer::playStep2, 0);
v29 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v27, v28, 0);
cocos2d::CCNode::runAction(this, v29);
v70 = 0;
v30 = *((char **)this + 63);
v73[0] = 0;
v31 = *((_DWORD *)v30 + 231);
v32 = *((_DWORD *)v30 + 230);
v75 = -1;
v33 = v32 - v31;
v76 = 0;
v72 = 115;
v73[1] = 87;
v73[2] = -38;
v71 = 46;
v74 = 100;
if ( v33 <= 200000 )
{
if ( v33 <= 100000 )
{
if ( v30[649] )
{
v30 = (_BYTE *)(&dword_14 + 3);
v70 = 23;
v71 = 23;
v72 = 23;
memset(v73, 43, 3);
}
}
else
{
v30 = (_BYTE *)(&dword_14 + 3);
memset(v73, 43, 3);
v70 = 23;
v71 = 23;
v72 = 23;
v74 = -1;
v75 = 50;
}
}
else
{
v30 = (char *)&dword_14 + 3;
v70 = (unsigned __int8)&dword_14 + 3;
v71 = (unsigned __int8)&dword_14 + 3;
v72 = (unsigned __int8)&dword_14 + 3;
memset(v73, 43, 3);
v74 = 0;
v76 = -1;
}
v34 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"d_circle_01_001.png", v30);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v34 + 960LL))(v34, &v70);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v34 + 160LL))(v34, 1.88);
v35 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v34 + 184LL);
v65 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 90) + 328LL))(*((_QWORD *)this + 90)) * 0.5;
v36 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 90) + 328LL))(*((_QWORD *)this + 90));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v77, v65, *(float *)(v36 + 4) * 0.5);
v35(v34, v77);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 90) + 464LL))(
*((_QWORD *)this + 90),
v34,
4294967291LL);
v38 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"d_circle_01_001.png", v37);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v38 + 960LL))(v38, &v70);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v38 + 160LL))(v38, 1.63);
v39 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v38 + 184LL);
v66 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 90) + 328LL))(*((_QWORD *)this + 90)) * 0.5;
v40 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 90) + 328LL))(*((_QWORD *)this + 90));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v77, v66, *(float *)(v40 + 4) * 0.5);
v39(v38, v77);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 90) + 464LL))(
*((_QWORD *)this + 90),
v38,
4294967294LL);
v42 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"d_circle_01_001.png", v41);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v42 + 960LL))(v42, v73);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v42 + 160LL))(v42, 1.75);
v43 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v42 + 184LL);
v67 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 90) + 328LL))(*((_QWORD *)this + 90)) * 0.5;
v44 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 90) + 328LL))(*((_QWORD *)this + 90));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v77, v67, *(float *)(v44 + 4) * 0.5);
v43(v42, v77);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 90) + 464LL))(
*((_QWORD *)this + 90),
v42,
4294967292LL);
v45 = *((_QWORD *)this + 90);
v46 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v45 + 960LL);
memset(v77, 125, 3);
v46(v45, v77);
v48 = (cocos2d::CCProgressTimer *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"d_circle_01_001.png",
v47);
(*(void (__fastcall **)(cocos2d::CCProgressTimer *, char *))(*(_QWORD *)v48 + 960LL))(v48, &v74);
v50 = cocos2d::CCProgressTimer::create(v48, v49);
*((_QWORD *)this + 91) = v50;
v51 = v50;
v52 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v50 + 184LL);
v68 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 90) + 328LL))(*((_QWORD *)this + 90)) * 0.5;
v53 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 90) + 328LL))(*((_QWORD *)this + 90));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v77, v68, *(float *)(v53 + 4) * 0.5);
v52(v51, v77);
(*(void (__fastcall **)(_QWORD, float))(**((_QWORD **)this + 91) + 160LL))(*((_QWORD *)this + 91), 1.75);
cocos2d::CCProgressTimer::setPercentage(*((cocos2d::CCProgressTimer **)this + 91), 0.0);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**((_QWORD **)this + 90) + 464LL))(
*((_QWORD *)this + 90),
*((_QWORD *)this + 91),
4294967293LL);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 62) + 1000LL))(*((_QWORD *)this + 62), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(*((_QWORD *)this + 92) + 344LL) + 1000LL))(
*(_QWORD *)(*((_QWORD *)this + 92) + 344LL),
0);
}
return _stack_chk_guard;
}