// // GJWorldNode::init from 0xaa7168 to 0xaa7930 (1992 bytes) // // 2 xrefs: // > GJWorldNode::create @ 0xaa79b8 // > @ 0xc20c8 // // 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 13:00:51 +0000 // __int64 __fastcall GJWorldNode::init(cocos2d::CCArray **this, int a2, WorldSelectLayer *a3) { cocos2d::CCString *v5; // x0 const char *CString; // x0 size_t v7; // x0 cocos2d::CCSprite *v8; // x0 __int64 v9; // x20 cocos2d::CCMenu *v10; // x0 cocos2d::CCNode *v11; // x27 unsigned __int64 hasCompletedMainLevel; // x0 int v13; // w24 int v14; // w20 int v15; // w22 GameStatsManager *v16; // x0 GameStatsManager *v17; // x0 __int64 v18; // x28 GameLevelManager *i; // x0 GameLevelManager *v20; // x0 __int64 MainLevel; // x0 cocos2d::CCSprite *v22; // x0 const char *v23; // x1 __int64 v24; // x20 cocos2d::CCArray *v25; // x21 __int64 v26; // x2 __int64 (__fastcall *v27)(cocos2d::CCArray *, __int64 *); // x25 cocos2d::CCNode *v28; // x0 __int64 v29; // x25 float v30; // s9 cocos2d::CCNode *v31; // x0 __int64 v32; // x25 float v33; // s9 const char *v34; // x1 float v35; // s0 __int64 v36; // x0 __int64 v37; // x20 void (__fastcall *v38)(__int64, __int64 *); // x21 const cocos2d::CCPoint *v39; // x1 cocos2d::CCEaseInOut *v40; // x0 cocos2d::CCActionInterval *v41; // x1 cocos2d::CCSequence *v42; // x20 const cocos2d::CCPoint *v43; // x1 cocos2d::CCEaseInOut *v44; // x0 cocos2d::CCActionInterval *v45; // x1 cocos2d::CCFiniteTimeAction *v46; // x0 cocos2d::CCRepeatForever *v47; // x0 cocos2d::CCActionInterval *v48; // x1 cocos2d::CCAction *v49; // x0 cocos2d::CCArray *v51; // x0 cocos2d::CCObject *v52; // x0 unsigned int j; // w20 __int64 v54; // x0 cocos2d::CCSequence *v55; // x20 cocos2d::CCFiniteTimeAction *v56; // x0 cocos2d::CCAction *v57; // x0 __int64 (__fastcall *v58)(__int64, __int64 *); // [xsp+A0h] [xbp+A0h] void (__fastcall *v59)(__int64, __int64 *); // [xsp+A0h] [xbp+A0h] unsigned int v60; // [xsp+A8h] [xbp+A8h] unsigned __int8 v61; // [xsp+AFh] [xbp+AFh] unsigned int v62; // [xsp+B8h] [xbp+B8h] int v63; // [xsp+BCh] [xbp+BCh] char *v65; // [xsp+C8h] [xbp+C8h] _BYTE v66[8]; // [xsp+D8h] [xbp+D8h] BYREF _BYTE v67[8]; // [xsp+E0h] [xbp+E0h] BYREF __int64 v68; // [xsp+E8h] [xbp+E8h] BYREF __int64 v69; // [xsp+F0h] [xbp+F0h] BYREF __int64 v70; // [xsp+F8h] [xbp+F8h] BYREF char *v71[2]; // [xsp+100h] [xbp+100h] BYREF cocos2d::CCSprite *v72; // [xsp+110h] [xbp+110h] __int64 v73[2]; // [xsp+118h] [xbp+118h] BYREF void *v74; // [xsp+128h] [xbp+128h] __int64 v75[2]; // [xsp+130h] [xbp+130h] BYREF void *v76; // [xsp+140h] [xbp+140h] v61 = cocos2d::CCNode::init((cocos2d::CCNode *)this); if ( !v61 ) return v61; *((_DWORD *)this + 92) = a2; *(this + 43) = a3; *((_BYTE *)this + 366) = 0; if ( a2 == 1 ) *((_BYTE *)this + 364) = -1; else *((_BYTE *)this + 364) = 50; *((_BYTE *)this + 365) = -1; if ( a2 > 2 ) v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"worldIsland_%02d.png", (_BYTE *)&dword_0 + 1); else v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"worldIsland_%02d.png", (const char *)(unsigned int)a2); CString = (const char *)cocos2d::CCString::getCString(v5); v71[0] = nullptr; v65 = (char *)CString; v71[1] = nullptr; v72 = nullptr; v7 = strlen(CString); std::string::__init((__int64 *)v71, v65, v7); v8 = (cocos2d::CCSprite *)((char *)v71 + 1); if ( ((__int64)v71[0] & 1) != 0 ) v8 = v72; v9 = cocos2d::CCSprite::createWithSpriteFrameName(v8, (const char *)LOBYTE(v71[0])); v10 = (cocos2d::CCMenu *)(*((__int64 (__fastcall **)(cocos2d::CCArray **, __int64))*this + 57))(this, v9); if ( a2 > 2 ) { (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v9 + 960LL))(v9, &unk_117B208); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v9 + 912LL))(v9, 75); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v9 + 160LL))(v9, 0.8); goto LABEL_38; } v11 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v10); (*((void (__fastcall **)(cocos2d::CCArray **, cocos2d::CCNode *, __int64))*this + 58))(this, v11, 2); v73[0] = 0; v73[1] = 0; v74 = nullptr; std::string::__init(v73, "worldLevelBtn_001.png", 0x15u); v75[0] = 0; v75[1] = 0; v76 = nullptr; hasCompletedMainLevel = std::string::__init(v75, "worldLevelBtn_locked_001.png", 0x1Cu); v13 = 0; v14 = 5 * (a2 - 1); v15 = v14 + 2001; do { v16 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)hasCompletedMainLevel); hasCompletedMainLevel = GameStatsManager::hasCompletedMainLevel(v16, v15 + v13); if ( !(_BYTE)hasCompletedMainLevel ) break; ++v13; } while ( v13 != 5 ); if ( a2 <= 1 || (v17 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)hasCompletedMainLevel), GameStatsManager::hasCompletedMainLevel(v17, v14 + 2000)) ) { ++v13; } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, (const cocos2d::CCPoint *)&dword_155DC18); v63 = 1; v60 = v13 - 1; v18 = 0; for ( i = (GameLevelManager *)v67; ; i = (GameLevelManager *)(unsigned int)++v63 ) { v20 = (GameLevelManager *)GameLevelManager::sharedState(i); MainLevel = GameLevelManager::getMainLevel(v20, (const char *)(unsigned int)v15, 1u); if ( v60 == (_DWORD)v18 && v15 > 2001 ) v62 = *(unsigned __int8 *)(MainLevel + 650) ^ 1; else v62 = 0; GJWorldNode::positionForLevelButton(v15, (cocos2d::CCPoint *)v67); if ( v62 >= ((int)v18 < v13) ) { v22 = (cocos2d::CCSprite *)((char *)v75 + 1); v23 = (const char *)LOBYTE(v75[0]); if ( (v75[0] & 1) != 0 ) v22 = (cocos2d::CCSprite *)v76; } else { v22 = (cocos2d::CCSprite *)((char *)v73 + 1); v23 = (const char *)LOBYTE(v73[0]); if ( (v73[0] & 1) != 0 ) v22 = (cocos2d::CCSprite *)v74; } v24 = cocos2d::CCSprite::createWithSpriteFrameName(v22, v23); v25 = (cocos2d::CCArray *)CCMenuItemSpriteExtra::create(v24, 0, (__int64)this, (__int64)GJWorldNode::onLevel, 0); CCMenuItemSpriteExtra::setSizeMult((__int64)v25, 1.2); v26 = *(_QWORD *)v25; *((_DWORD *)v25 + 100) = 1067030938; (*(void (__fastcall **)(cocos2d::CCArray *, _QWORD))(v26 + 72))(v25, (unsigned int)v15); (*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCArray *))(*(_QWORD *)v11 + 456LL))(v11, v25); v27 = *(__int64 (__fastcall **)(cocos2d::CCArray *, __int64 *))(*(_QWORD *)v25 + 184LL); cocos2d::CCNode::convertToNodeSpace(&v70, v11, (const cocos2d::CCPoint *)v67); v28 = (cocos2d::CCNode *)v27(v25, &v70); v29 = cocos2d::CCNode::create(v28); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v29 + 320LL))(v29, &unk_155DC20); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v24 + 464LL))(v24, v29, 1); v58 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v29 + 184LL); (*(void (__fastcall **)(__int64 *__return_ptr, __int64))(*(_QWORD *)v24 + 336LL))(&v68, v24); v30 = *(float *)&v68 * 0.5; (*(void (__fastcall **)(__int64 *__return_ptr, __int64))(*(_QWORD *)v24 + 336LL))(&v69, v24); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v70, v30, *((float *)&v69 + 1) * 0.5); v31 = (cocos2d::CCNode *)v58(v29, &v70); v32 = cocos2d::CCNode::create(v31); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v32 + 320LL))(v32, &unk_155DC20); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v24 + 464LL))(v24, v32, 0xFFFFFFFFLL); v59 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v32 + 184LL); (*(void (__fastcall **)(__int64))(*(_QWORD *)v24 + 336LL))(v24); v33 = *(float *)&v68 * 0.5; (*(void (__fastcall **)(__int64 *__return_ptr, __int64))(*(_QWORD *)v24 + 336LL))(&v69, v24); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v70, v33, *((float *)&v69 + 1) * 0.5); v59(v32, &v70); if ( (int)v18 >= v13 ) { (*(void (__fastcall **)(cocos2d::CCArray *, _QWORD))(*(_QWORD *)v25 + 1056LL))(v25, 0); goto LABEL_28; } cocos2d::CCPoint::operator=(v66, v67); if ( v62 ) { cocos2d::CCPoint::operator=((char *)this + 356, v67); v52 = (cocos2d::CCObject *)cocos2d::CCArray::create(v51); *(this + 40) = v52; cocos2d::CCObject::retain(v52); for ( j = 0; j < (unsigned int)cocos2d::CCArray::count(*(this + 40)); ++j ) { v54 = cocos2d::CCArray::objectAtIndex(*(this + 40), j); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v54 + 344LL))(v54, 0); } *(this + 41) = v25; (*(void (__fastcall **)(cocos2d::CCArray *, _QWORD))(*(_QWORD *)v25 + 1056LL))(v25, 0); } if ( v18 ) break; if ( *(this + 41) ) *((_BYTE *)this + 372) = 1; LABEL_29: ++v18; ++v15; } GJWorldNode::addDotsToLevel((GJWorldNode *)this, v15, v62); if ( *(this + 41) && !*((_BYTE *)this + 352) ) { *((_BYTE *)this + 352) = (unsigned __int8)&dword_0 + 1; v55 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)((char *)&dword_0 + 1), v35 + 0.2); v56 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(this, GJWorldNode::unlockActiveItem, 0); v57 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v55, v56, 0); cocos2d::CCNode::runAction((cocos2d::CCNode *)this, v57); } LABEL_28: if ( v63 != 5 ) goto LABEL_29; v36 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_02_001.png", v34); *(this + 47) = (cocos2d::CCArray *)v36; (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v36 + 160LL))(v36, 0.6); (*(void (__fastcall **)(_QWORD, float))(*(_QWORD *)*(this + 47) + 360LL))(*(this + 47), -90.0); v37 = (__int64)*(this + 47); v38 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v37 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v69, 0.0, 40.0); cocos2d::CCPoint::operator+(&v70, v66); v38(v37, &v70); (*((void (__fastcall **)(cocos2d::CCArray **, _QWORD, __int64))*this + 58))(this, *(this + 47), 10); if ( !v13 ) goto LABEL_33; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v70, 0.0, -5.0); v40 = (cocos2d::CCEaseInOut *)cocos2d::CCMoveBy::create((cocos2d::CCMoveBy *)&v70, 0.5, v39); v42 = (cocos2d::CCSequence *)cocos2d::CCEaseInOut::create(v40, v41, 1.8); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v70, 0.0, 5.0); v44 = (cocos2d::CCEaseInOut *)cocos2d::CCMoveBy::create((cocos2d::CCMoveBy *)&v70, 0.5, v43); v46 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCEaseInOut::create(v44, v45, 1.8); v47 = (cocos2d::CCRepeatForever *)cocos2d::CCSequence::create(v42, v46, 0); v49 = (cocos2d::CCAction *)cocos2d::CCRepeatForever::create(v47, v48); cocos2d::CCNode::runAction(*(this + 47), v49); if ( v60 > 3 || *(this + 41) ) LABEL_33: (*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*(this + 47) + 344LL))(*(this + 47), 0); if ( (v75[0] & 1) != 0 ) operator delete(v76); if ( (v73[0] & 1) != 0 ) operator delete(v74); LABEL_38: if ( ((__int64)v71[0] & 1) != 0 ) operator delete(v72); return v61; }
GD Web Decomp Icon

GD Web Decomp

Raw Source