// // LevelInfoLayer::onPlay from 0x100029cd4 to 0x10002a514 (2112 bytes) // // 3 xrefs: // > LevelInfoLayer::FLAlert_Clicked @ 0x10002e714 // > LevelInfoLayer::keyDown @ 0x10002e774 // > LevelInfoLayer::init @ 0x10002836c // // 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 10:57:28 +0000 // void __fastcall LevelInfoLayer::onPlay(__int64 a1) { __int64 v2; // x0 __int64 v3; // x0 __int64 v4; // x0 __int64 v5; // x0 __int64 shouldDownloadLevel; // x0 __int64 v7; // x0 __int64 GameVariable; // x0 __int64 v9; // x8 __int64 v10; // x0 int *v11; // x8 __int64 v12; // x0 __int64 v13; // x0 __int64 v14; // x0 __int64 v15; // x0 __int64 v16; // x0 __int64 v17; // x20 __int64 v18; // x0 __int64 v19; // x20 __int64 v20; // x0 __int64 v21; // x8 int v22; // w9 __int16 v23; // w8 __int64 v24; // x0 __int64 v25; // x8 __int64 v26; // x9 _BYTE *v27; // x19 __int64 v28; // x0 __int64 v29; // x9 int v30; // w8 const std::string::value_type *v31; // x1 std::string *v32; // x1 __int64 v33; // x19 __int64 v34; // x0 __int64 v35; // x21 float v36; // s8 __int64 v37; // x0 __int64 v38; // x21 float v39; // s8 __int64 v40; // x0 __int64 v41; // x21 float v42; // s8 __int64 v43; // x0 __int64 v44; // x0 __int64 v45; // x20 __int64 v46; // x20 float v47; // s8 __int64 v48; // x0 __int16 v49; // [xsp+1Ch] [xbp-B4h] BYREF char v50; // [xsp+1Eh] [xbp-B2h] _WORD v51[2]; // [xsp+20h] [xbp-B0h] BYREF __int16 v52; // [xsp+24h] [xbp-ACh] BYREF char v53; // [xsp+26h] [xbp-AAh] void *__p[2]; // [xsp+28h] [xbp-A8h] BYREF char v55; // [xsp+3Fh] [xbp-91h] void *v56[2]; // [xsp+40h] [xbp-90h] BYREF char v57; // [xsp+57h] [xbp-79h] std::string v58; // [xsp+58h] [xbp-78h] BYREF void *v59[2]; // [xsp+70h] [xbp-60h] BYREF char v60; // [xsp+87h] [xbp-49h] void *v61[2]; // [xsp+88h] [xbp-48h] BYREF char v62; // [xsp+9Fh] [xbp-31h] if ( (*(_BYTE *)(a1 + 488) & 1) != 0 ) return; if ( *(_BYTE *)(a1 + 645) != 1 ) return; v2 = cocos2d::CCDirector::sharedDirector(a1); if ( (*(_BYTE *)(v2 + 176) & 1) != 0 ) return; if ( *(_QWORD *)(a1 + 552) ) { v3 = cocos2d::CCDirector::sharedDirector(v2); v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 192LL))(v3); if ( (*(_BYTE *)(v4 + 129) & 1) != 0 || (v5 = cocos2d::CCDirector::sharedDirector(v4), *(_BYTE *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 192LL))(v5) + 131) == 1) ) { sub_10002A588(a1); return; } } shouldDownloadLevel = LevelInfoLayer::shouldDownloadLevel(a1); if ( (_DWORD)shouldDownloadLevel ) { LevelInfoLayer::downloadLevel(a1); return; } v7 = GameManager::sharedState(shouldDownloadLevel); GameVariable = GameManager::getGameVariable(v7, "0083"); if ( (GameVariable & 1) == 0 ) { v9 = *(_QWORD *)(a1 + 504); if ( *(_DWORD *)(v9 + 608) ) { if ( (*(_BYTE *)(v9 + 1048) & 1) == 0 ) { v10 = MusicDownloadManager::sharedState(); GameVariable = MusicDownloadManager::isSongDownloaded(v10, *(unsigned int *)(*(_QWORD *)(a1 + 504) + 608LL)); if ( (GameVariable & 1) == 0 ) { sub_10002DC68(a1); return; } } } } v11 = *(int **)(a1 + 504); if ( v11[241] >= 1 && v11[242] == v11[243] ) { v12 = GameManager::sharedState(GameVariable); v13 = GameManager::getGameVariable(v12, "0063"); if ( (v13 & 1) == 0 ) { v34 = GameManager::sharedState(v13); GameManager::setGameVariable(v34, "0063", 1); sub_100009900( v61, "This level contains unverified user coins (bronze).\n" "The coins will not count until they become verified (silver)."); v27 = (_BYTE *)FLAlertLayer::create_1(a1 + 440, "Unverified Coins", v61, "OK", 0, 300.0); if ( v62 < 0 ) operator delete(v61[0]); goto LABEL_53; } } if ( (*(_BYTE *)(a1 + 744) & 1) != 0 ) goto LABEL_19; v24 = *(_QWORD *)(a1 + 504); v25 = *(char *)(v24 + 1495); if ( v25 < 0 ) v26 = *(_QWORD *)(v24 + 1480); else v26 = *(char *)(v24 + 1495); if ( v26 && (*(_DWORD *)(v24 + 1520) != *(_DWORD *)(v24 + 788) || *(_DWORD *)(v24 + 1524) != 4) ) { sub_1000CEBEC(); v24 = *(_QWORD *)(a1 + 504); LOBYTE(v25) = *(_BYTE *)(v24 + 1495); } if ( (v25 & 0x80) != 0 ) v25 = *(_QWORD *)(v24 + 1480); else v25 = (unsigned __int8)v25; if ( v25 ) { sub_100009900(v59, "There is a saved checkpoint for this level.\nDo you want to load it?"); v27 = (_BYTE *)FLAlertLayer::create_1(a1 + 440, "Load Save", v59, "New Game", "Load Save", 380.0); if ( v60 < 0 ) operator delete(v59[0]); sub_10034B6D0(v27); v27[656] = 1; (*(void (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v27 + 72LL))(v27, 14); LABEL_53: (*(void (__fastcall **)(_BYTE *))(*(_QWORD *)v27 + 1312LL))(v27); return; } v28 = GameManager::sharedState(v24); if ( (GameManager::getGameVariable(v28, "0082") & 1) != 0 || (v29 = *(_QWORD *)(a1 + 504), v30 = *(_DWORD *)(v29 + 620) - *(_DWORD *)(v29 + 624), v30 < 40001) || (*(_BYTE *)(v29 + 1200) & 1) != 0 ) { LABEL_19: if ( (*(_BYTE *)(a1 + 488) & 1) != 0 ) return; v14 = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0); *(_BYTE *)(a1 + 488) = 1; v15 = FMODAudioEngine::sharedEngine(v14); v16 = FMODAudioEngine::stopAllMusic(v15, 1); v17 = FMODAudioEngine::sharedEngine(v16); sub_100009900(__p, "playSound_01.ogg"); v18 = FMODAudioEngine::playEffect(v17, __p, 1.0, 0.0, 0.3); if ( v55 < 0 ) operator delete(__p[0]); *(_BYTE *)(GameManager::sharedState(v18) + 1136) = 1; v19 = cocos2d::CCDelayTime::create(0.0); cocos2d::CCCallFunc::create(a1, LevelInfoLayer::playStep2, 0); v20 = sub_10021D420(v19); cocos2d::CCNode::runAction(a1, v20); v53 = 115; v52 = 11776; LOBYTE(v51[1]) = -38; v51[0] = 22272; v50 = 0; v49 = -156; v21 = *(_QWORD *)(a1 + 504); v22 = *(_DWORD *)(v21 + 920) - *(_DWORD *)(v21 + 924); if ( v22 < 200001 ) { if ( v22 < 100001 ) { if ( *(_BYTE *)(v21 + 649) == 1 ) { v52 = 5911; v53 = 23; memset(v51, 43, 3); } goto LABEL_57; } v52 = 5911; v53 = 23; memset(v51, 43, 3); v50 = 0; v23 = 13055; } else { v52 = 5911; v53 = 23; memset(v51, 43, 3); v50 = -1; v23 = -256; } v49 = v23; LABEL_57: v35 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v35 + 960LL))(v35, &v52); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v35 + 160LL))(v35, 1.88); v36 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 328LL))(*(_QWORD *)(a1 + 720)) * 0.5; v37 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 328LL))(*(_QWORD *)(a1 + 720)); sub_1000262BC((float *)&v58, v36, *(float *)(v37 + 4) * 0.5); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v35 + 184LL))(v35, &v58); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 720) + 464LL))( *(_QWORD *)(a1 + 720), v35, 4294967291LL); v38 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v38 + 960LL))(v38, &v52); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v38 + 160LL))(v38, 1.63); v39 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 328LL))(*(_QWORD *)(a1 + 720)) * 0.5; v40 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 328LL))(*(_QWORD *)(a1 + 720)); sub_1000262BC((float *)&v58, v39, *(float *)(v40 + 4) * 0.5); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v38 + 184LL))(v38, &v58); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 720) + 464LL))( *(_QWORD *)(a1 + 720), v38, 4294967294LL); v41 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); (*(void (__fastcall **)(__int64, _WORD *))(*(_QWORD *)v41 + 960LL))(v41, v51); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v41 + 160LL))(v41, 1.75); v42 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 328LL))(*(_QWORD *)(a1 + 720)) * 0.5; v43 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 328LL))(*(_QWORD *)(a1 + 720)); sub_1000262BC((float *)&v58, v42, *(float *)(v43 + 4) * 0.5); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v41 + 184LL))(v41, &v58); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 720) + 464LL))( *(_QWORD *)(a1 + 720), v41, 4294967292LL); v44 = *(_QWORD *)(a1 + 720); memset(&v58, 125, 3); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v44 + 960LL))(v44, &v58); v45 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v45 + 960LL))(v45, &v49); v46 = cocos2d::CCProgressTimer::create(v45); *(_QWORD *)(a1 + 728) = v46; v47 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 328LL))(*(_QWORD *)(a1 + 720)) * 0.5; v48 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 328LL))(*(_QWORD *)(a1 + 720)); sub_1000262BC((float *)&v58, v47, *(float *)(v48 + 4) * 0.5); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v46 + 184LL))(v46, &v58); (*(void (__fastcall **)(_QWORD, float))(**(_QWORD **)(a1 + 728) + 160LL))(*(_QWORD *)(a1 + 728), 1.75); cocos2d::CCProgressTimer::setPercentage(*(_QWORD *)(a1 + 728), 0.0); (*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 720) + 464LL))( *(_QWORD *)(a1 + 720), *(_QWORD *)(a1 + 728), 4294967293LL); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 496) + 1000LL))(*(_QWORD *)(a1 + 496), 0); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 736) + 344LL) + 1000LL))( *(_QWORD *)(*(_QWORD *)(a1 + 736) + 344LL), 0); return; } memset(&v58, 0, sizeof(v58)); if ( (unsigned int)v30 <= 0x13880 ) v31 = "This level has a high object count and can be unstable on some devices. This may affect pe" "rformance, load time etc."; else v31 = "This level has a VERY HIGH object count and can be unstable on some devices. This may affect <" "cg>performance, load time etc."; std::string::assign(&v58, v31); if ( (v58.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v32 = &v58; else v32 = (std::string *)v58.__r_.__value_.__r.__words[0]; sub_100009900(v56, (char *)v32); v33 = FLAlertLayer::create_1(a1 + 440, "High Objects", v56, "Cancel", "Play", 380.0); if ( v57 < 0 ) operator delete(v56[0]); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v33 + 72LL))(v33, 10); (*(void (__fastcall **)(__int64))(*(_QWORD *)v33 + 1312LL))(v33); if ( SHIBYTE(v58.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v58.__r_.__value_.__l.__data_); }
GD Web Decomp Icon

GD Web Decomp

Raw Source