// // WorldSelectLayer::init from 0x1003ab1b0 to 0x1003ab98c (2012 bytes) // // 2 xrefs: // > WorldSelectLayer::scene @ 0x1003ab06f // > WorldSelectLayer::create @ 0x1003ab168 // // 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 12:29:24 +0000 // __int64 __fastcall WorldSelectLayer::init(_QWORD *a1, int a2, double a3) { __int64 result; // rax __int64 v5; // rax __int64 v6; // rax __int64 v7; // rax char *v8; // r14 __int64 v9; // r14 __int64 v10; // rdi __int64 v11; // r15 double v12; // xmm0_8 char *v13; // rax char *v14; // r14 double v15; // xmm0_8 char *v16; // r13 __int64 v17; // rdi __int64 v18; // rax double v19; // xmm0_8 double v20; // xmm0_8 unsigned __int8 *v21; // r12 __int64 v22; // rdi __int64 v23; // rax double v24; // xmm0_8 __int64 v25; // r12 double v26; // xmm0_8 char isControllerConnected; // r15 const char *v28; // rdi unsigned __int8 *v29; // r14 void *v30; // rax void *v31; // rsi __int64 v32; // rdi __int64 v33; // r14 __int64 v34; // rax float v35; // xmm0_4 double v36; // xmm0_8 char *v37; // r14 void *v38; // rax void *v39; // rsi __int64 v40; // rdi __int64 v41; // r14 __int64 v42; // rax double v43; // xmm0_8 char *v44; // rax void *v45; // r12 int v46; // edx int v47; // ecx int v48; // r8d int v49; // r9d __int64 v50; // rsi __int64 v51; // rdi __int64 v52; // rax double v53; // xmm0_8 __int64 v54; // rax bool v55; // al __int64 v56; // rdi __int64 v57; // r14 int v58; // r15d bool v59; // al _BYTE *v60; // rdi _OWORD *v61; // r14 __int64 v62; // rax __int64 v63; // rax __int64 v64; // rsi __int64 v65; // rax __int64 v66; // rax _OWORD *v67; // r14 __int64 v68; // rax __int64 v69; // rax unsigned int v70; // [rsp+8h] [rbp-58h] BYREF const char *v71; // [rsp+10h] [rbp-50h] int v72; // [rsp+18h] [rbp-48h] float v73; // [rsp+1Ch] [rbp-44h] BYREF float v74; // [rsp+20h] [rbp-40h] __int16 v75; // [rsp+24h] [rbp-3Ch] BYREF char v76; // [rsp+26h] [rbp-3Ah] double v77; // [rsp+28h] [rbp-38h] BYREF unsigned __int8 v78; // [rsp+32h] [rbp-2Eh] char v79; // [rsp+33h] [rbp-2Dh] float v80; // [rsp+34h] [rbp-2Ch] result = cocos2d::CCLayer::init(a1); if ( !(_BYTE)result ) return result; v72 = a2; v78 = result; v5 = cocos2d::CCTextureCache::sharedTextureCache(a1); cocos2d::CCTextureCache::addImage(v5, "WorldSheet.png", 0); v6 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile_2(v6, "WorldSheet.plist", a3); (*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1072LL))(a1, 1); (*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1088LL))(a1, 1); v7 = cocos2d::CCDirector::sharedDirector(a1, 1); cocos2d::CCDirector::getWinSize(&v73, v7); v8 = cocos2d::CCSprite::create_1((__int64)"GJ_gradientBG.png"); a1[52] = v8; sub_100278250((float *)&v77, 0.0, 0.0); (*(void (__fastcall **)(char *, double *))(*(_QWORD *)v8 + 296LL))(v8, &v77); (*(void (__fastcall **)(_QWORD *, _QWORD, __int64))(*a1 + 464LL))(a1, a1[52], 4294967294LL); (*(void (__fastcall **)(_QWORD, float))(*(_QWORD *)a1[52] + 128LL))( a1[52], (float)(v73 + 10.0) / *(float *)(a1[52] + 432LL)); (*(void (__fastcall **)(_QWORD, float))(*(_QWORD *)a1[52] + 144LL))( a1[52], (float)(v74 + 10.0) / *(float *)(a1[52] + 436LL)); v9 = a1[52]; sub_100278250((float *)&v77, -5.0, -5.0); (*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v9 + 184LL))(v9, &v77); v10 = a1[52]; memset(&v77, 51, 3); (*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v10 + 960LL))(v10, &v77); v11 = cocos2d::CCMenu::create(); (*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v11, 2); sub_100278250((float *)&v77, v73 + -40.0, v74 + -25.0); v12 = (*(double (__fastcall **)(__int64, double *))(*(_QWORD *)v11 + 184LL))(v11, &v77); v13 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"garageRope_001.png", v12); v14 = (char *)CCMenuItemSpriteExtra::create((__int64)v13, 0, (__int64)a1, (__int64)WorldSelectLayer::onGarage, 0); CCMenuItemSpriteExtra::setSizeMult((__int64)v14, 1.2); CCMenuItemSpriteExtra::useAnimationType(v14, 1); sub_100278250((float *)&v77, 0.0, -8.0); sub_100278300(v14 + 468, &v77); *(_QWORD *)(v14 + 476) = 0x3E4CCCCD3E4CCCCDLL; v15 = (*(double (__fastcall **)(__int64, char *))(*(_QWORD *)v11 + 456LL))(v11, v14); v76 = -1; v75 = -1; v16 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_sideArt_001.png", v15); sub_100278250((float *)&v77, 0.0, 0.0); (*(void (__fastcall **)(char *, double *))(*(_QWORD *)v16 + 296LL))(v16, &v77); v17 = cocos2d::CCDirector::sharedDirector(v16, &v77); v80 = sub_100479760(v17) + -1.0; v18 = cocos2d::CCDirector::sharedDirector(v17, &v77); v19 = sub_100479750(v18); sub_100278250((float *)&v77, v80, *(float *)&v19 + -1.0); (*(void (__fastcall **)(char *, double *))(*(_QWORD *)v16 + 184LL))(v16, &v77); (*(void (__fastcall **)(_QWORD *, char *, __int64))(*a1 + 464LL))(a1, v16, 1); v20 = (*(double (__fastcall **)(char *, __int16 *))(*(_QWORD *)v16 + 960LL))(v16, &v75); v21 = (unsigned __int8 *)cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_sideArt_001.png", v20); sub_100278250((float *)&v77, 1.0, 0.0); (*(void (__fastcall **)(unsigned __int8 *, double *))(*(_QWORD *)v21 + 296LL))(v21, &v77); v22 = cocos2d::CCDirector::sharedDirector(v21, &v77); v80 = sub_100479770(v22) + 1.0; v23 = cocos2d::CCDirector::sharedDirector(v22, &v77); v24 = sub_100479750(v23); sub_100278250((float *)&v77, v80, *(float *)&v24 + -1.0); (*(void (__fastcall **)(unsigned __int8 *, double *))(*(_QWORD *)v21 + 184LL))(v21, &v77); cocos2d::CCSprite::setFlipX(v21, 1u); (*(void (__fastcall **)(_QWORD *, unsigned __int8 *, __int64))(*a1 + 464LL))(a1, v21, 1); (*(void (__fastcall **)(unsigned __int8 *, __int16 *))(*(_QWORD *)v21 + 960LL))(v21, &v75); v80 = v74; v25 = cocos2d::CCMenu::create(); v26 = (*(double (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v25, 5); isControllerConnected = PlatformToolbox::isControllerConnected(v26); v28 = "controllerBtn_DPad_Left_001.png"; if ( !isControllerConnected ) v28 = "navArrowBtn_001.png"; v29 = (unsigned __int8 *)cocos2d::CCSprite::createWithSpriteFrameName((__int64)v28, v26); (*(void (__fastcall **)(unsigned __int8 *, float))(*(_QWORD *)v29 + 160LL))(v29, 0.60000002); v80 = v80 * 0.5; v79 = isControllerConnected; if ( isControllerConnected ) { v71 = "controllerBtn_DPad_Right_001.png"; } else { cocos2d::CCSprite::setFlipX(v29, 1u); v71 = "navArrowBtn_001.png"; } v30 = CCMenuItemSpriteExtra::create((__int64)v29, 0, (__int64)a1, (__int64)WorldSelectLayer::onPrev, 0); a1[54] = v30; v31 = v30; (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v25 + 456LL))(v25, v30); v32 = a1[54]; CCMenuItemSpriteExtra::setSizeMult(v32, 2.0); v33 = a1[54]; v34 = cocos2d::CCDirector::sharedDirector(v32, v31); v35 = sub_100479760(v34); sub_100278250((float *)&v70, v35 + 25.0, v80); cocos2d::CCNode::convertToNodeSpace(&v77, v25, &v70); v36 = (*(double (__fastcall **)(__int64, double *))(*(_QWORD *)v33 + 184LL))(v33, &v77); v37 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)v71, v36); (*(void (__fastcall **)(char *, float))(*(_QWORD *)v37 + 160LL))(v37, 0.60000002); v38 = CCMenuItemSpriteExtra::create((__int64)v37, 0, (__int64)a1, (__int64)WorldSelectLayer::onNext, 0); a1[55] = v38; v39 = v38; (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v25 + 456LL))(v25, v38); v40 = a1[55]; CCMenuItemSpriteExtra::setSizeMult(v40, 2.0); v41 = a1[55]; v42 = cocos2d::CCDirector::sharedDirector(v40, v39); *(float *)&v36 = sub_100479770(v42); sub_100278250((float *)&v70, *(float *)&v36 + -25.0, v80); cocos2d::CCNode::convertToNodeSpace(&v77, v25, &v70); v43 = (*(double (__fastcall **)(__int64, double *))(*(_QWORD *)v41 + 184LL))(v41, &v77); v44 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_arrow_01_001.png", v43); v45 = CCMenuItemSpriteExtra::create((__int64)v44, 0, (__int64)a1, (__int64)WorldSelectLayer::onBack, 0); CCMenuItemSpriteExtra::setSizeMult((__int64)v45, 1.6); v50 = sub_1008735E0((_DWORD)v45, 0, v46, v47, v48, v49); (*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v50, 1); v51 = cocos2d::CCDirector::sharedDirector(a1, v50); v80 = sub_100479760(v51) + 25.0; v52 = cocos2d::CCDirector::sharedDirector(v51, v50); v53 = sub_100479740(v52); sub_100278250((float *)&v77, v80, *(float *)&v53 + -22.0); (*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v50 + 184LL))(v50, &v77); if ( v79 ) GameToolbox::addBackButton(a1, v45); WorldSelectLayer::setupWorlds(a1); v54 = a1[53]; if ( v54 ) v55 = *(_DWORD *)(v54 + 588) > 0; else v55 = 0; (*(void (__fastcall **)(_QWORD, bool))(*(_QWORD *)a1[54] + 344LL))(a1[54], v55); v56 = a1[53]; v57 = a1[55]; if ( v56 ) { v58 = *(_DWORD *)(v56 + 588); v59 = v58 < (int)(BoomScrollLayer::getTotalPages(v56) - 1); } else { v59 = 0; } (*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v57 + 344LL))(v57, v59); sub_1002782D0(&v77, &dword_100BE3518); (*(void (__fastcall **)(_QWORD *, double *))(*a1 + 1168LL))(a1, &v77); *(_BYTE *)(GameManager::sharedState() + 1064) = 0; v60 = (_BYTE *)a1[57]; if ( !v60 ) { v64 = (unsigned int)v72; if ( v72 <= 0 ) goto LABEL_22; goto LABEL_21; } if ( v60[372] != 1 ) { v64 = (*(unsigned int (__fastcall **)(_BYTE *))(*(_QWORD *)v60 + 64LL))(v60) - 1; LABEL_21: WorldSelectLayer::goToPage(a1, v64, 1); goto LABEL_22; } v61 = cocos2d::CCDelayTime::create((__m128)0x3F800000u); v62 = cocos2d::CCCallFunc::create(a1, WorldSelectLayer::animateInActiveIsland, 0); v63 = sub_10039EB60((__int64)v61, v62, 0); cocos2d::CCNode::runAction((__int64)a1, v63); *((_BYTE *)a1 + 464) = 1; (*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)a1[53] + 1000LL))(a1[53], 0); LABEL_22: v65 = GameStatsManager::sharedState(); if ( GameStatsManager::hasCompletedMainLevel(v65, 2010) ) { v66 = GameManager::sharedState(); if ( !(unsigned __int8)GameManager::getUGV(v66, "18") ) { *((_BYTE *)a1 + 464) = 1; v67 = cocos2d::CCDelayTime::create((__m128)0x3F800000u); v68 = cocos2d::CCCallFunc::create(a1, WorldSelectLayer::showCompleteDialog, 0); v69 = sub_10039EB60((__int64)v67, v68, 0); cocos2d::CCNode::runAction((__int64)a1, v69); } } return v78; }
GD Web Decomp Icon

GD Web Decomp

Raw Source