// // LevelInfoLayer::onPlay from 0x1402fc430 to 0x1402fd0a6 (3190 bytes) // // 4 xrefs: // > LevelInfoLayer::FLAlert_Clicked @ 0x1403006eb // > LevelInfoLayer::keyDown @ 0x14030087d // > LevelInfoLayer::init @ 0x1402f7e2d // > @ 0x1406d41e4 // // 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=12 void LevelInfoLayer::onPlay(LevelInfoLayer *a1, cocos2d::CCObject *a2) { GameManager *v3; // rcx GJGameLevel *m_level; // rax int m_songID; // ebx MusicDownloadManager *v6; // rax __int64 v7; // rax FLAlertLayer *v8; // rbx GJGameLevel *v9; // rcx GameManager *v10; // rcx GameManager *v11; // rcx __int64 v12; // rax FLAlertLayer *v13; // rbx GameManager *v14; // rcx GJGameLevel *v15; // rax int v16; // ebx _QWORD *v17; // rax size_t v18; // r8 __int64 v19; // rax FLAlertLayer *v20; // rbx void *v21; // rcx __int64 v22; // rbx __int64 v23; // r8 __int64 v24; // r9 int v25; // ecx __int64 v26; // rax __int64 v27; // rbx struct cocos2d::CCDelayTime *v28; // rax struct cocos2d::CCSequence *v29; // rax cocos2d::ccColor3B *v30; // r8 GJGameLevel *v31; // rcx struct cocos2d::CCSprite *v32; // rdi double v33; // xmm0_8 cocos2d::CCSprite_vtbl *v34; // rbx const cocos2d::CCSize *v35; // rax const cocos2d::CCPoint *v36; // rax struct cocos2d::CCSprite *v37; // rdi double v38; // xmm0_8 cocos2d::CCSprite_vtbl *v39; // rbx const cocos2d::CCSize *v40; // rax const cocos2d::CCPoint *v41; // rax struct cocos2d::CCSprite *v42; // rdi double v43; // xmm0_8 cocos2d::CCSprite_vtbl *v44; // rbx const cocos2d::CCSize *v45; // rax double v46; // xmm0_8 const cocos2d::CCPoint *v47; // rax struct cocos2d::CCSprite *v48; // rbx cocos2d::CCProgressTimer *v49; // rax cocos2d::CCProgressTimer_vtbl *v50; // rbx const cocos2d::CCSize *v51; // rax const cocos2d::CCPoint *v52; // rax float v53; // [rsp+28h] [rbp-89h] _WORD v54[2]; // [rsp+58h] [rbp-59h] BYREF __int16 v55; // [rsp+5Ch] [rbp-55h] BYREF char v56; // [rsp+5Eh] [rbp-53h] __int16 v57; // [rsp+60h] [rbp-51h] BYREF char v58; // [rsp+62h] [rbp-4Fh] FMODAudioEngine *v59; // [rsp+68h] [rbp-49h] __int16 v60; // [rsp+70h] [rbp-41h] BYREF char v61; // [rsp+72h] [rbp-3Fh] FMODAudioEngine *v62; // [rsp+78h] [rbp-39h] __int128 v63; // [rsp+80h] [rbp-31h] BYREF __int64 v64; // [rsp+90h] [rbp-21h] __int64 v65; // [rsp+98h] [rbp-19h] char v66[32]; // [rsp+A0h] [rbp-11h] BYREF void *Block[2]; // [rsp+C0h] [rbp+Fh] BYREF __int64 v68; // [rsp+D0h] [rbp+1Fh] unsigned __int64 v69; // [rsp+D8h] [rbp+27h] if ( a1->m_isBusy || !a1->m_enterTransitionFinished ) return; if ( LevelInfoLayer::shouldDownloadLevel(a1) ) { LevelInfoLayer::downloadLevel(a1); return; } v3 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v62 = (FMODAudioEngine *)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v62); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v3 = (GameManager *)qword_1406C2ED8; } if ( !GameManager::getGameVariable(v3, "0083") ) { m_level = a1->m_level; m_songID = m_level->m_songID; if ( m_songID ) { if ( !m_level->m_showedSongWarning ) { v6 = MusicDownloadManager::sharedState(); if ( !MusicDownloadManager::isSongDownloaded(v6, m_songID) ) { *(_OWORD *)Block = 0; v68 = 0; v69 = 15; Block[0] = sub_14003AA10(0xA0u); v68 = 154; v69 = 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"); v62 = (FMODAudioEngine *)Block; v7 = sub_14003BDB0((__int64)&v63, (__int64)Block); v8 = FLAlertLayer::create( (int)a1 + 440, (int)"No Song", v7, (__int64)"Cancel", (__int64)"Play", 1133903872, 0, 0, 1065353216); sub_14003A830((__int64)Block); v8->setTag(v8, 9); v8->show(v8); return; } } } } v9 = a1->m_level; if ( v9->m_coins > 0 && v9->m_coinsVerified.random == v9->m_coinsVerified.seed ) { v10 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v59 = (FMODAudioEngine *)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v59); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v10 = (GameManager *)qword_1406C2ED8; } if ( !GameManager::getGameVariable(v10, "0063") ) { v11 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v59 = (FMODAudioEngine *)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v59); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v11 = (GameManager *)qword_1406C2ED8; } GameManager::setGameVariable(v11, "0063", 1); *(_OWORD *)Block = 0; v68 = 0; v69 = 15; Block[0] = sub_14003AA10(0x90u); v68 = 129; v69 = 143; strcpy( (char *)Block[0], "This level contains unverified user coins (bronze).\n" "The coins will not count until they become verified (silver)."); v59 = (FMODAudioEngine *)Block; v12 = sub_14003BDB0((__int64)&v63, (__int64)Block); v13 = FLAlertLayer::create( (int)a1 + 440, (int)"Unverified Coins", v12, (__int64)"OK", 0, 1133903872, 0, 0, 1065353216); sub_14003A830((__int64)Block); v13->show(v13); return; } } v14 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v59 = (FMODAudioEngine *)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v59); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v14 = (GameManager *)qword_1406C2ED8; } if ( GameManager::getGameVariable(v14, "0082") || (v15 = a1->m_level, v16 = v15->m_objectCount.random - v15->m_objectCount.seed, v16 <= 40000) || v15->m_highObjectsEnabled ) { if ( a1->m_isBusy ) return; a1->setKeypadEnabled(a1, 0); a1->m_isBusy = 1; v22 = qword_1406C2E88; if ( !qword_1406C2E88 ) { v59 = (FMODAudioEngine *)operator new(0x888u); qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v59); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88); v22 = qword_1406C2E88; } if ( *(_QWORD *)(v22 + 552) ) FMOD::ChannelControl::stop(*(FMOD::ChannelControl **)(v22 + 552)); sub_14005E0D0((_QWORD *)(v22 + 1064)); sub_14005E0D0((_QWORD *)(v22 + 1128)); sub_14005E0D0((_QWORD *)(v22 + 1192)); v59 = (FMODAudioEngine *)&v63; v63 = 0; v64 = 0; v65 = 15; *(_QWORD *)&v63 = sub_14003AA10(0x20u); v64 = 16; v65 = 31; strcpy((char *)v63, "playSound_01.ogg"); v25 = qword_1406C2E88; if ( !qword_1406C2E88 ) { v62 = (FMODAudioEngine *)operator new(0x888u); qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v62); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88); v25 = qword_1406C2E88; } FMODAudioEngine::playEffect(v25, (__int64)&v63, v23, v24, 1050253722); v26 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v59 = (FMODAudioEngine *)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v59); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v26 = qword_1406C2ED8; } *(_BYTE *)(v26 + 1076) = 1; v27 = cocos2d::CCCallFunc::create(a1, LevelInfoLayer::playStep2); v28 = cocos2d::CCDelayTime::create(0.0); v29 = cocos2d::CCSequence::create(v28, v27, 0); cocos2d::CCNode::runAction((CCLightFlash *)a1, (cocos2d::CCPoint)v29, v30, 0.0, v53); v55 = 11776; v56 = 115; v57 = 22272; v58 = -38; v54[0] = -156; v60 = -156; v61 = 0; v31 = a1->m_level; if ( v31->m_dailyID.random - v31->m_dailyID.seed <= 100000 ) { if ( !v31->m_gauntletLevel ) { LABEL_49: v32 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); v33 = ((double (__fastcall *)(cocos2d::CCRGBAProtocol *, __int16 *))v32->setColor)( &v32->cocos2d::CCRGBAProtocol, &v55); ((void (__fastcall *)(struct cocos2d::CCSprite *))v32->setScale_0)(v32); v34 = v32->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_playSprite->getContentSize(a1->m_playSprite); v35 = a1->m_playSprite->getContentSize(a1->m_playSprite); cocos2d::CCPoint::CCPoint(*(float *)&v33, v35->width * 0.5); v34->setPosition_0(v32, v36); a1->m_playSprite->addChild_0(a1->m_playSprite, v32, -5); v37 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); v38 = ((double (__fastcall *)(cocos2d::CCRGBAProtocol *, __int16 *))v37->setColor)( &v37->cocos2d::CCRGBAProtocol, &v55); ((void (__fastcall *)(struct cocos2d::CCSprite *))v37->setScale_0)(v37); v39 = v37->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_playSprite->getContentSize(a1->m_playSprite); v40 = a1->m_playSprite->getContentSize(a1->m_playSprite); cocos2d::CCPoint::CCPoint(*(float *)&v38, v40->width * 0.5); v39->setPosition_0(v37, v41); a1->m_playSprite->addChild_0(a1->m_playSprite, v37, -2); v42 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); v43 = ((double (__fastcall *)(cocos2d::CCRGBAProtocol *, __int16 *))v42->setColor)( &v42->cocos2d::CCRGBAProtocol, &v57); ((void (__fastcall *)(struct cocos2d::CCSprite *))v42->setScale_0)(v42); v44 = v42->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_playSprite->getContentSize(a1->m_playSprite); v45 = a1->m_playSprite->getContentSize(a1->m_playSprite); v46 = cocos2d::CCPoint::CCPoint(*(float *)&v43, v45->width * 0.5); v44->setPosition_0(v42, v47); a1->m_playSprite->addChild_0(a1->m_playSprite, v42, -4); memset(v54, 125, 3); a1->m_playSprite->setColor(&a1->m_playSprite->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)v54); v48 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); v48->setColor(&v48->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v60); v49 = cocos2d::CCProgressTimer::create(v48); a1->m_progressTimer = v49; v50 = v49->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_playSprite->getContentSize(a1->m_playSprite); v51 = a1->m_playSprite->getContentSize(a1->m_playSprite); cocos2d::CCPoint::CCPoint(*(float *)&v46, v51->width * 0.5); v50->setPosition_0(a1->m_progressTimer, v52); ((void (__fastcall *)(cocos2d::CCProgressTimer *))a1->m_progressTimer->setScale_0)(a1->m_progressTimer); cocos2d::CCProgressTimer::setPercentage(a1->m_progressTimer, 0.0); a1->m_playSprite->addChild_0(a1->m_playSprite, a1->m_progressTimer, -3); a1->m_playBtnMenu->setTouchEnabled(a1->m_playBtnMenu, 0); a1->m_songWidget->m_buttonMenu->setTouchEnabled(a1->m_songWidget->m_buttonMenu, 0); return; } v55 = 5911; v54[0] = 11051; v57 = 11051; } else { v55 = 5911; v57 = 11051; v54[0] = 13055; v60 = 13055; v61 = 0; } v58 = 43; v56 = 23; goto LABEL_49; } *(_OWORD *)Block = 0; v68 = 0; v17 = sub_14003AA10(0xA0u); v69 = 159; Block[0] = v17; if ( v16 <= 80000 ) { v68 = 147; strcpy( (char *)v17, "This level has a high object count and can be unstable on some devices. This may effect perfor" "mance, load time etc."); } else { v68 = 152; strcpy( (char *)v17, "This level has a VERY HIGH object count and can be unstable on some devices. This may effect p" "erformance, load time etc."); } v63 = 0; v64 = 0; v65 = 0; v18 = -1; do ++v18; while ( *((_BYTE *)v17 + v18) ); sub_14003A930(&v63, v17, v18); v59 = (FMODAudioEngine *)&v63; v19 = sub_14003BDB0((__int64)v66, (__int64)&v63); v20 = FLAlertLayer::create( (int)a1 + 440, (int)"High Objects", v19, (__int64)"Cancel", (__int64)"Play", 1136525312, 0, 0, 1065353216); sub_14003A830((__int64)&v63); v20->setTag(v20, 10); v20->show(v20); if ( v69 > 0xF ) { v21 = Block[0]; if ( v69 + 1 >= 0x1000 ) { v21 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v21 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v21); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source