// // LevelInfoLayer::onPlay from 0x140421450 to 0x14042230c (3772 bytes) // // 4 xrefs: // > LevelInfoLayer::FLAlert_Clicked @ 0x140426470 // > LevelInfoLayer::keyDown @ 0x14042661d // > LevelInfoLayer::init @ 0x14041c99e // > @ 0x140926840 // // This function is hookable on this platform (idp: pc, 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 11:32:09 +0000 // // Hidden C++ exception states: #wind=13 void __fastcall LevelInfoLayer::onPlay(__int64 a1) { __int64 v2; // rax __int64 v3; // rcx __int64 v4; // rax __int64 v5; // rcx __int64 v6; // rax __int64 v7; // rcx __int64 v8; // rax cocos2d::CCObject *v9; // rbx __int64 v10; // rdx int *v11; // rcx __int64 v12; // rcx __int64 v13; // rcx __int64 v14; // rax cocos2d::CCObject *v15; // rbx __int64 v16; // rcx __int64 v17; // rax __int64 v18; // rcx __int64 v19; // rax int v20; // ebx _QWORD *v21; // rax size_t v22; // r8 __int64 v23; // rax cocos2d::CCObject *v24; // rbx void *v25; // rcx _QWORD *v26; // rbx __int64 v27; // rcx __int64 v28; // r8 __int64 v29; // r9 int v30; // ecx __int64 v31; // rax __int64 v32; // rbx struct cocos2d::CCFiniteTimeAction *v33; // rax struct cocos2d::CCAction *v34; // rax __int64 v35; // rcx struct cocos2d::CCSprite *v36; // rdi __int64 v37; // rbx float v38; // xmm6_4 float *v39; // rax __int64 v40; // rax struct cocos2d::CCSprite *v41; // rdi __int64 v42; // rbx float v43; // xmm6_4 float *v44; // rax __int64 v45; // rax struct cocos2d::CCSprite *v46; // rdi __int64 v47; // rbx float v48; // xmm6_4 float *v49; // rax __int64 v50; // rax struct cocos2d::CCSprite *v51; // rbx struct cocos2d::CCProgressTimer *v52; // rax __int64 v53; // rdi float v54; // xmm6_4 float *v55; // rax __int64 v56; // rbx __int64 v57; // rax _WORD v58[2]; // [rsp+58h] [rbp-59h] BYREF __int16 v59; // [rsp+5Ch] [rbp-55h] BYREF char v60; // [rsp+5Eh] [rbp-53h] __int16 v61; // [rsp+60h] [rbp-51h] BYREF char v62; // [rsp+62h] [rbp-4Fh] void **v63; // [rsp+68h] [rbp-49h] BYREF __int16 v64; // [rsp+70h] [rbp-41h] BYREF char v65; // [rsp+72h] [rbp-3Fh] void **v66; // [rsp+78h] [rbp-39h] __int128 v67; // [rsp+80h] [rbp-31h] BYREF __int64 v68; // [rsp+90h] [rbp-21h] __int64 v69; // [rsp+98h] [rbp-19h] _BYTE v70[32]; // [rsp+A0h] [rbp-11h] BYREF void *Block[2]; // [rsp+C0h] [rbp+Fh] BYREF __int64 v72; // [rsp+D0h] [rbp+1Fh] unsigned __int64 v73; // [rsp+D8h] [rbp+27h] if ( *(_BYTE *)(a1 + 488) || !*(_BYTE *)(a1 + 645) ) return; if ( *(_QWORD *)(a1 + 552) ) { v2 = cocos2d::CCDirector::sharedDirector(a1); if ( *(_BYTE *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 176LL))(v2) + 153) || (v4 = cocos2d::CCDirector::sharedDirector(v3), *(_BYTE *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 176LL))(v4) + 155)) ) { LevelInfoLayer::onEdit(a1, 0); return; } } if ( (unsigned __int8)LevelInfoLayer::shouldDownloadLevel(a1) ) { LevelInfoLayer::downloadLevel(a1); return; } v5 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v66 = (void **)operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v66); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v5 = qword_14090BFD0; } if ( !GameManager::getGameVariable(v5, "0083") ) { v6 = *(_QWORD *)(a1 + 504); if ( *(_DWORD *)(v6 + 680) ) { if ( !*(_BYTE *)(v6 + 1120) ) { v7 = qword_14090C070; if ( !qword_14090C070 ) { v66 = (void **)operator new(0x3D0u); qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v66); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070); v7 = qword_14090C070; } if ( !(unsigned __int8)MusicDownloadManager::isSongDownloaded( v7, *(unsigned int *)(*(_QWORD *)(a1 + 504) + 680LL)) ) { *(_OWORD *)Block = 0; v72 = 0; v73 = 0; Block[0] = sub_14003D460(0xA0u); v72 = 154; v73 = 159; strcpy( (char *)Block[0], "This level uses a custom song that has not been downloaded yet.\n" "Do you want to play without music?\n" "Download by using the bar below"); v66 = Block; v8 = sub_14003F4F0((__int64)&v67, (__int64)Block); v9 = FLAlertLayer::create( (int)a1 + 440, (int)"No Song", v8, (__int64)"Cancel", (__int64)"Play", 1133903872, 0, 0, 1065353216); sub_14003D310((__int64)Block); v10 = 9; LABEL_18: (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v9 + 64LL))(v9, v10); (*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v9 + 1064LL))(v9); return; } } } } v11 = *(int **)(a1 + 504); if ( v11[259] > 0 && v11[260] == v11[261] ) { v12 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v63 = (void **)operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v63); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v12 = qword_14090BFD0; } if ( !GameManager::getGameVariable(v12, "0063") ) { v13 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v63 = (void **)operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v63); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v13 = qword_14090BFD0; } GameManager::setGameVariable(v13, "0063", 1u); *(_OWORD *)Block = 0; v72 = 0; v73 = 0; Block[0] = sub_14003D460(0x90u); v72 = 129; v73 = 143; strcpy( (char *)Block[0], "This level contains unverified user coins (bronze).\n" "The coins will not count until they become verified (silver)."); v63 = Block; v14 = sub_14003F4F0((__int64)&v67, (__int64)Block); v15 = FLAlertLayer::create( (int)a1 + 440, (int)"Unverified Coins", v14, (__int64)"OK", 0, 1133903872, 0, 0, 1065353216); sub_14003D310((__int64)Block); (*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v15 + 1064LL))(v15); return; } } if ( *(_BYTE *)(a1 + 744) ) goto LABEL_66; v16 = *(_QWORD *)(a1 + 504); if ( *(_QWORD *)(v16 + 1648) && (*(_DWORD *)(v16 + 1696) != *(_DWORD *)(v16 + 860) || *(_DWORD *)(v16 + 1700) != 4) ) GJGameLevel::clearPlatformerSave(v16); if ( *(_QWORD *)(*(_QWORD *)(a1 + 504) + 1648LL) ) { *(_OWORD *)Block = 0; v72 = 0; v73 = 0; Block[0] = sub_14003D460(0x60u); v72 = 91; v73 = 95; strcpy( (char *)Block[0], "There is a saved checkpoint for this level.\nDo you want to load it?"); v63 = Block; v17 = sub_14003F4F0((__int64)&v67, (__int64)Block); v9 = FLAlertLayer::create( (int)a1 + 440, (int)"Load Save", v17, (__int64)"New Game", (__int64)"Load Save", 1136525312, 0, 0, 1065353216); sub_14003D310((__int64)Block); FLAlertLayer::addCloseButton((__int64)v9); *((_BYTE *)v9 + 656) = 1; v10 = 14; goto LABEL_18; } v18 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v63 = (void **)operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v63); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v18 = qword_14090BFD0; } if ( GameManager::getGameVariable(v18, "0082") || (v19 = *(_QWORD *)(a1 + 504), v20 = *(_DWORD *)(v19 + 692) - *(_DWORD *)(v19 + 696), v20 <= 40000) || *(_BYTE *)(v19 + 1296) ) { LABEL_66: if ( *(_BYTE *)(a1 + 488) ) return; (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 992LL))(a1, 0); *(_BYTE *)(a1 + 488) = 1; v26 = (_QWORD *)qword_14090BF60; if ( !qword_14090BF60 ) { v63 = (void **)operator new(0x8A8u); qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v63); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60); v26 = (_QWORD *)qword_14090BF60; } v27 = v26[69]; if ( v27 ) FMOD::ChannelControl::stop(v27); sub_14003EB60(v26 + 137); sub_14003EB60(v26 + 145); sub_14003EB60(v26 + 153); v63 = (void **)&v67; v67 = 0; v68 = 0; v69 = 0; *(_QWORD *)&v67 = sub_14003D460(0x20u); v68 = 16; v69 = 31; strcpy((char *)v67, "playSound_01.ogg"); v30 = qword_14090BF60; if ( !qword_14090BF60 ) { v66 = (void **)operator new(0x8A8u); qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v66); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60); v30 = qword_14090BF60; } FMODAudioEngine::playEffect(v30, (__int64)&v67, v28, v29, 1050253722); v31 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v63 = (void **)operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v63); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v31 = qword_14090BFD0; } *(_BYTE *)(v31 + 1160) = 1; v32 = cocos2d::CCCallFunc::create(a1, LevelInfoLayer::playStep2); v33 = cocos2d::CCDelayTime::create(0.0); v34 = cocos2d::CCSequence::create(v33, v32, 0); cocos2d::CCNode::runAction((cocos2d::CCNode *)a1, v34); v59 = 11776; v60 = 115; v61 = 22272; v62 = -38; v58[0] = -156; v64 = -156; v65 = 0; v35 = *(_QWORD *)(a1 + 504); if ( *(_DWORD *)(v35 + 992) - *(_DWORD *)(v35 + 996) <= 100000 ) { if ( !*(_BYTE *)(v35 + 721) ) { LABEL_63: v36 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); (**((void (__fastcall ***)(__int64, __int16 *))v36 + 40))((__int64)v36 + 320, &v59); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v36 + 160LL))(v36); v37 = *(_QWORD *)v36; v38 = *(float *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 320LL))(*(_QWORD *)(a1 + 720)) + 4) * 0.5; v39 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 320LL))(*(_QWORD *)(a1 + 720)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v63, *v39 * 0.5, v38); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v37 + 184))(v36, v40); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 720) + 456LL))( *(_QWORD *)(a1 + 720), v36, 4294967291LL); v41 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); (**((void (__fastcall ***)(__int64, __int16 *))v41 + 40))((__int64)v41 + 320, &v59); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v41 + 160LL))(v41); v42 = *(_QWORD *)v41; v43 = *(float *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 320LL))(*(_QWORD *)(a1 + 720)) + 4) * 0.5; v44 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 320LL))(*(_QWORD *)(a1 + 720)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v63, *v44 * 0.5, v43); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v42 + 184))(v41, v45); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 720) + 456LL))( *(_QWORD *)(a1 + 720), v41, 4294967294LL); v46 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); (**((void (__fastcall ***)(__int64, __int16 *))v46 + 40))((__int64)v46 + 320, &v61); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v46 + 160LL))(v46); v47 = *(_QWORD *)v46; v48 = *(float *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 320LL))(*(_QWORD *)(a1 + 720)) + 4) * 0.5; v49 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 320LL))(*(_QWORD *)(a1 + 720)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v63, *v49 * 0.5, v48); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v47 + 184))(v46, v50); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 720) + 456LL))( *(_QWORD *)(a1 + 720), v46, 4294967292LL); memset(v58, 125, 3); (**(void (__fastcall ***)(__int64, _WORD *))(*(_QWORD *)(a1 + 720) + 320LL))(*(_QWORD *)(a1 + 720) + 320LL, v58); v51 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); (**((void (__fastcall ***)(__int64, __int16 *))v51 + 40))((__int64)v51 + 320, &v64); v52 = cocos2d::CCProgressTimer::create(v51); *(_QWORD *)(a1 + 728) = v52; v53 = *(_QWORD *)v52; v54 = *(float *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 320LL))(*(_QWORD *)(a1 + 720)) + 4) * 0.5; v55 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 320LL))(*(_QWORD *)(a1 + 720)); v56 = *(_QWORD *)(a1 + 728); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v63, *v55 * 0.5, v54); (*(void (__fastcall **)(__int64, __int64))(v53 + 184))(v56, v57); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 728) + 160LL))(*(_QWORD *)(a1 + 728)); cocos2d::CCProgressTimer::setPercentage(*(cocos2d::CCProgressTimer **)(a1 + 728), 0.0); (*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 720) + 456LL))( *(_QWORD *)(a1 + 720), *(_QWORD *)(a1 + 728), 4294967293LL); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 496) + 920LL))(*(_QWORD *)(a1 + 496), 0); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 736) + 344LL) + 920LL))( *(_QWORD *)(*(_QWORD *)(a1 + 736) + 344LL), 0); return; } v59 = 5911; v58[0] = 11051; v61 = 11051; } else { v59 = 5911; v61 = 11051; v58[0] = 13055; v64 = 13055; v65 = 0; } v62 = 43; v60 = 23; goto LABEL_63; } *(_OWORD *)Block = 0; v72 = 0; v21 = sub_14003D460(0xA0u); Block[0] = v21; v73 = 159; if ( v20 <= 80000 ) { v72 = 147; strcpy( (char *)v21, "This level has a high object count and can be unstable on some devices. This may affect perfor" "mance, load time etc."); } else { v72 = 152; strcpy( (char *)v21, "This level has a VERY HIGH object count and can be unstable on some devices. This may affect p" "erformance, load time etc."); } v67 = 0; v68 = 0; v69 = 0; v22 = -1; do ++v22; while ( *((_BYTE *)v21 + v22) ); sub_14003D230(&v67, v21, v22); v63 = (void **)&v67; v23 = sub_14003F4F0((__int64)v70, (__int64)&v67); v24 = FLAlertLayer::create( (int)a1 + 440, (int)"High Objects", v23, (__int64)"Cancel", (__int64)"Play", 1136525312, 0, 0, 1065353216); sub_14003D310((__int64)&v67); (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v24 + 64LL))(v24, 10); (*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v24 + 1064LL))(v24); if ( v73 > 0xF ) { v25 = Block[0]; if ( v73 + 1 >= 0x1000 ) { v25 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v25 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v25); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source