// // LevelInfoLayer::onPlay from 0x49b4d8 to 0x49bb4e (1654 bytes) // // 2 xrefs: // > LevelInfoLayer::FLAlert_Clicked @ 0x49bc56 // > LevelInfoLayer::keyDown @ 0x49f2fa // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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:49:45 +0000 // cocos2d::CCDirector *__fastcall LevelInfoLayer::onPlay(cocos2d::CCDirector *this, cocos2d::CCObject *a2) { cocos2d::CCDirector *v2; // r4 int v3; // r0 cocos2d::CCDirector *v4; // r0 int v5; // r0 GameManager *v6; // r0 int v7; // r3 int *v8; // r3 GameManager *v9; // r0 MusicDownloadManager *v10; // r0 GameManager *v11; // r0 int *v12; // r4 int v13; // r0 int v14; // r5 int v15; // r5 GameManager *v16; // r0 int v17; // r2 int v18; // r3 int v19; // r5 FMODAudioEngine *v20; // r0 FMODAudioEngine *v21; // r0 char **v22; // r0 FMODAudioEngine *v23; // r7 GameManager *v24; // r0 float v25; // r1 cocos2d::CCSequence *v26; // r7 cocos2d::CCFiniteTimeAction *v27; // r0 cocos2d::CCAction *v28; // r0 int v29; // r2 int v30; // r0 int v31; // r3 int v32; // r3 int v33; // r7 void (__fastcall *v34)(int, _BYTE *); // r10 float v35; // s17 int v36; // r0 const char *v37; // r1 int v38; // r7 void (__fastcall *v39)(int, _BYTE *); // r9 float v40; // s17 int v41; // r0 const char *v42; // r1 int v43; // r7 void (__fastcall *v44)(int, _BYTE *); // r9 float v45; // s17 int v46; // r0 int v47; // r0 void (__fastcall *v48)(int, _BYTE *); // r2 const char *v49; // r1 cocos2d::CCProgressTimer *v50; // r7 cocos2d::CCSprite *v51; // r1 int v52; // r0 int v53; // r7 void (__fastcall *v54)(int, _BYTE *); // r8 float v55; // s17 int v56; // r0 char *v57; // r1 int v58; // r8 const char *v59; // r4 size_t v60; // r0 int *v61; // r4 char v62; // [sp+8h] [bp-38h] BYREF char v63; // [sp+9h] [bp-37h] char v64; // [sp+Ah] [bp-36h] _BYTE v65[4]; // [sp+Ch] [bp-34h] BYREF char v66; // [sp+10h] [bp-30h] BYREF char v67; // [sp+11h] [bp-2Fh] char v68; // [sp+12h] [bp-2Eh] _BYTE v69[8]; // [sp+14h] [bp-2Ch] BYREF int (__fastcall *v70)(LevelInfoLayer *); // [sp+1Ch] [bp-24h] int v71; // [sp+20h] [bp-20h] char v72[4]; // [sp+24h] [bp-1Ch] BYREF int v73; // [sp+28h] [bp-18h] const char *v74; // [sp+2Ch] [bp-14h] int v75; // [sp+30h] [bp-10h] BYREF int v76; // [sp+34h] [bp-Ch] int v77; // [sp+38h] [bp-8h] v2 = this; if ( *((_BYTE *)this + 356) ) return this; if ( !*((_BYTE *)this + 437) ) return this; this = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(this); if ( *((_BYTE *)this + 140) ) return this; if ( *((_DWORD *)v2 + 97) ) { v3 = cocos2d::CCDirector::sharedDirector(this); v4 = (cocos2d::CCDirector *)(*(int (__fastcall **)(int))(*(_DWORD *)v3 + 96))(v3); if ( *((_BYTE *)v4 + 89) ) return LevelInfoLayer::onEdit(v2, nullptr); v5 = cocos2d::CCDirector::sharedDirector(v4); if ( *(_BYTE *)((*(int (__fastcall **)(int))(*(_DWORD *)v5 + 96))(v5) + 91) ) return LevelInfoLayer::onEdit(v2, nullptr); } if ( LevelInfoLayer::shouldDownloadLevel(v2) ) return (cocos2d::CCDirector *)LevelInfoLayer::downloadLevel(v2); v6 = (GameManager *)GameManager::sharedState(nullptr); this = (cocos2d::CCDirector *)GameManager::getGameVariable(v6, "0083"); if ( !this ) { v7 = *((_DWORD *)v2 + 91); if ( *(_DWORD *)(v7 + 436) ) { if ( !*(_BYTE *)(v7 + 872) ) { v10 = (MusicDownloadManager *)MusicDownloadManager::sharedState(nullptr); this = (cocos2d::CCDirector *)MusicDownloadManager::isSongDownloaded( v10, *(_DWORD *)(*((_DWORD *)v2 + 91) + 436)); if ( !this ) return (cocos2d::CCDirector *)LevelInfoLayer::showSongWarning(v2); } } } v8 = *((int **)v2 + 91); if ( v8[197] > 0 && v8[198] == v8[199] ) { v9 = (GameManager *)GameManager::sharedState(this); this = (cocos2d::CCDirector *)GameManager::getGameVariable(v9, "0063"); if ( !this ) { v11 = (GameManager *)GameManager::sharedState(nullptr); GameManager::setGameVariable(v11, "0063", (_BYTE *)&dword_0 + 1); v75 = 0; v76 = 0; v77 = 0; std::string::__init( &v75, "This level contains unverified user coins (bronze).\n" "The coins will not count until they become verified (silver).", 0x81u); v12 = FLAlertLayer::create( (int)v2 + 332, (cocos2d::CCLabelBMFont *)"Unverified Coins", (int)&v75, (ButtonSprite *)"OK", nullptr, 300.0); std::string::~string((int)&v75); return (cocos2d::CCDirector *)(*(int (__fastcall **)(int *))(*v12 + 656))(v12); } } if ( *((_BYTE *)v2 + 496) ) goto LABEL_34; v13 = *((_DWORD *)v2 + 91); v14 = *(unsigned __int8 *)(v13 + 1148); if ( (v14 & 1) != 0 ) { if ( !*(_DWORD *)(v13 + 1152) ) { LABEL_22: v15 = *(_DWORD *)(v13 + 1152); goto LABEL_23; } } else if ( !((unsigned int)v14 >> 1) ) { goto LABEL_30; } if ( *(_DWORD *)(v13 + 1172) != *(_DWORD *)(v13 + 612) || *(_DWORD *)(v13 + 1176) != 4 ) GJGameLevel::clearPlatformerSave((GJGameLevel *)v13); v13 = *((_DWORD *)v2 + 91); v14 = *(unsigned __int8 *)(v13 + 1148); if ( (v14 & 1) != 0 ) goto LABEL_22; LABEL_30: v15 = v14 >> 1; LABEL_23: if ( v15 ) { v75 = 0; v76 = 0; v77 = 0; std::string::__init( &v75, "There is a saved checkpoint for this level.\nDo you want to load it?", 0x5Bu); v12 = FLAlertLayer::create( (int)v2 + 332, (cocos2d::CCLabelBMFont *)"Load Save", (int)&v75, (ButtonSprite *)"New Game", (ButtonSprite *)"Load Save", 380.0); std::string::~string((int)&v75); FLAlertLayer::addCloseButton((const cocos2d::CCPoint **)v12); *((_BYTE *)v12 + 516) = 1; (*(void (__fastcall **)(int *, int))(*v12 + 36))(v12, 14); return (cocos2d::CCDirector *)(*(int (__fastcall **)(int *))(*v12 + 656))(v12); } v16 = (GameManager *)GameManager::sharedState((GameManager *)v13); this = (cocos2d::CCDirector *)GameManager::getGameVariable(v16, "0082"); if ( !this ) { v17 = *((_DWORD *)v2 + 91); v18 = *(_DWORD *)(v17 + 448) - *(_DWORD *)(v17 + 452); if ( v18 > 40000 && !*(_BYTE *)(v17 + 984) ) { *(_DWORD *)v72 = 0; v73 = 0; v74 = nullptr; if ( v18 <= 80000 ) v57 = "This level has a high object count and can be unstable on some devices. This may affect performance, load time etc."; else v57 = "This level has a VERY HIGH object count and can be unstable on some devices. This may affe" "ct performance, load time etc."; std::string::assign((int *)v72, v57); v58 = (int)v2 + 332; if ( (v72[0] & 1) != 0 ) v59 = v74; else v59 = &v72[1]; v75 = 0; v76 = 0; v77 = 0; v60 = strlen(v59); std::string::__init(&v75, v59, v60); v61 = FLAlertLayer::create( v58, (cocos2d::CCLabelBMFont *)"High Objects", (int)&v75, (ButtonSprite *)"Cancel", (ButtonSprite *)"Play", 380.0); std::string::~string((int)&v75); (*(void (__fastcall **)(int *, int))(*v61 + 36))(v61, 10); (*(void (__fastcall **)(int *))(*v61 + 656))(v61); return (cocos2d::CCDirector *)std::string::~string((int)v72); } } LABEL_34: v19 = *((unsigned __int8 *)v2 + 356); if ( !*((_BYTE *)v2 + 356) ) { v20 = (FMODAudioEngine *)(*(int (__fastcall **)(cocos2d::CCDirector *, _DWORD))(*(_DWORD *)v2 + 536))( v2, *((unsigned __int8 *)v2 + 356)); *((_BYTE *)v2 + 356) = 1; v21 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v20); v22 = FMODAudioEngine::stopAllMusic(v21, 1); v75 = v19; v76 = v19; v77 = v19; v23 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine((FMODAudioEngine *)v22); std::string::__init(&v75, "playSound_01.ogg", 0x10u); FMODAudioEngine::playEffect(v23, (int)&v75, 1065353216, 0, 1050253722); v24 = (GameManager *)std::string::~string((int)&v75); *(_BYTE *)(GameManager::sharedState(v24) + 904) = 1; v71 = 0; v70 = LevelInfoLayer::playStep2; v26 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(nullptr, v25); v27 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v2, LevelInfoLayer::playStep2, 0); v28 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v26, v27, 0); cocos2d::CCNode::runAction(v2, v28); v29 = *((_DWORD *)v2 + 91); v63 = 46; v64 = 115; v30 = *(_DWORD *)(v29 + 748); v65[1] = 87; v65[2] = -38; v66 = 100; v31 = *(_DWORD *)(v29 + 744); v62 = 0; v32 = v31 - v30; v65[0] = 0; v67 = (unsigned __int8)&dword_FC + 3; v68 = 0; if ( v32 <= 200000 ) { if ( v32 <= 100000 ) { if ( *(_BYTE *)(v29 + 477) ) { v62 = 23; v63 = 23; v64 = 23; memset(v65, 43, 3); } } else { v66 = (unsigned __int8)&dword_FC + 3; v62 = 23; v63 = 23; v64 = 23; memset(v65, 43, 3); v67 = 50; } } else { v66 = 0; v62 = 23; v63 = 23; v64 = 23; v68 = (unsigned __int8)&dword_FC + 3; memset(v65, 43, 3); } v33 = cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"d_circle_01_001.png", (const char *)&dword_FC + 3); (*(void (__fastcall **)(int, char *))(*(_DWORD *)v33 + 480))(v33, &v62); (*(void (__fastcall **)(int, int))(*(_DWORD *)v33 + 80))(v33, 1072735191); v34 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v33 + 92); v35 = *(float *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)v2 + 121) + 164))(*((_DWORD *)v2 + 121)); v36 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)v2 + 121) + 164))(*((_DWORD *)v2 + 121)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v69, v35 * 0.5, *(float *)(v36 + 4) * 0.5); v34(v33, v69); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)v2 + 121) + 232))(*((_DWORD *)v2 + 121), v33, -5); v38 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"d_circle_01_001.png", v37); (*(void (__fastcall **)(int, char *))(*(_DWORD *)v38 + 480))(v38, &v62); (*(void (__fastcall **)(int, int))(*(_DWORD *)v38 + 80))(v38, 1070638039); v39 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v38 + 92); v40 = *(float *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)v2 + 121) + 164))(*((_DWORD *)v2 + 121)); v41 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)v2 + 121) + 164))(*((_DWORD *)v2 + 121)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v69, v40 * 0.5, *(float *)(v41 + 4) * 0.5); v39(v38, v69); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)v2 + 121) + 232))(*((_DWORD *)v2 + 121), v38, -2); v43 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"d_circle_01_001.png", v42); (*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v43 + 480))(v43, v65); (*(void (__fastcall **)(int, int))(*(_DWORD *)v43 + 80))(v43, 1071644672); v44 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v43 + 92); v45 = *(float *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)v2 + 121) + 164))(*((_DWORD *)v2 + 121)); v46 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)v2 + 121) + 164))(*((_DWORD *)v2 + 121)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v69, v45 * 0.5, *(float *)(v46 + 4) * 0.5); v44(v43, v69); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)v2 + 121) + 232))(*((_DWORD *)v2 + 121), v43, -4); v47 = *((_DWORD *)v2 + 121); v48 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v47 + 480); memset(v69, 125, 3); v48(v47, v69); v50 = (cocos2d::CCProgressTimer *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"d_circle_01_001.png", v49); (*(void (__fastcall **)(cocos2d::CCProgressTimer *, char *))(*(_DWORD *)v50 + 480))(v50, &v66); v52 = cocos2d::CCProgressTimer::create(v50, v51); *((_DWORD *)v2 + 122) = v52; v53 = v52; v54 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v52 + 92); v55 = *(float *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)v2 + 121) + 164))(*((_DWORD *)v2 + 121)); v56 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)v2 + 121) + 164))(*((_DWORD *)v2 + 121)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v69, v55 * 0.5, *(float *)(v56 + 4) * 0.5); v54(v53, v69); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)v2 + 122) + 80))(*((_DWORD *)v2 + 122), 1071644672); cocos2d::CCProgressTimer::setPercentage(*((cocos2d::CCProgressTimer **)v2 + 122), 0.0); (*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)v2 + 121) + 232))( *((_DWORD *)v2 + 121), *((_DWORD *)v2 + 122), -3); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)v2 + 90) + 500))(*((_DWORD *)v2 + 90), 0); return (cocos2d::CCDirector *)(*(int (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(*((_DWORD *)v2 + 123) + 276) + 500))( *(_DWORD *)(*((_DWORD *)v2 + 123) + 276), 0); } return this; }
GD Web Decomp Icon

GD Web Decomp

Raw Source