// // LeaderboardsLayer::init from 0x100457558 to 0x100457ddc (2180 bytes) // // 1 xrefs: // > LeaderboardsLayer::create @ 0x100457508 // // 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 11:05:24 +0000 // bool __fastcall LeaderboardsLayer::init(__int64 a1, int a2, __int64 a3) { __int64 v4; // x22 _BOOL8 v6; // x19 __int64 v7; // x23 char *v8; // x1 __int64 v9; // x23 char *v10; // x1 __int64 v11; // x23 char *v12; // x1 __int64 v13; // x23 char *v14; // x1 __int64 v15; // x23 char *v16; // x1 __int64 v17; // x23 char *v18; // x1 __int64 v19; // x23 char *v20; // x1 __int64 v21; // x23 char *v22; // x1 __int64 v23; // x23 char *v24; // x1 __int64 v25; // x23 char *v26; // x1 __int64 v27; // x23 char *v28; // x1 __int64 v29; // x23 char *v30; // x1 __int64 v31; // x0 float *v32; // x23 void *v33; // x24 __int64 v34; // x0 float v35; // s8 __int64 v36; // x0 float v37; // s0 unsigned __int8 *v38; // x23 __int64 v39; // x0 float v40; // s8 __int64 v41; // x0 float v42; // s0 _QWORD *v43; // x0 _DWORD *v44; // x23 __int64 v45; // x23 void *v46; // x0 void *v47; // x24 __int64 v48; // x0 float v49; // s8 __int64 v50; // x0 float v51; // s0 void *v52; // x0 void *v53; // x21 __int64 v54; // x1 __int64 v55; // x2 __int64 v56; // x3 __int64 v57; // x4 __int64 v58; // x5 __int64 v59; // x6 __int64 v60; // x7 __int64 v61; // x22 __int64 v62; // x0 float v63; // s8 __int64 v64; // x0 float v65; // s0 void *v67[2]; // [xsp+8h] [xbp-78h] BYREF char v68; // [xsp+1Fh] [xbp-61h] double v69; // [xsp+20h] [xbp-60h] BYREF void *__p[2]; // [xsp+28h] [xbp-58h] BYREF char v71; // [xsp+3Fh] [xbp-41h] LODWORD(v4) = a2; v6 = cocos2d::CCLayer::init((_WORD *)a1); if ( v6 ) { if ( (unsigned int)v4 <= 1 ) v4 = 1; else v4 = (unsigned int)v4; *(_BYTE *)(GameManager::sharedState() + 712) = 0; *(_DWORD *)(GameManager::sharedState() + 708) = 6; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1072LL))(a1, 1); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1088LL))(a1, 1); if ( (*(_BYTE *)(GameManager::sharedState() + 656) & 1) == 0 ) { v7 = GameLevelManager::sharedState(); GameLevelManager::sharedState(); GameLevelManager::getLeaderboardKey(1, 0, __p); if ( v71 >= 0 ) v8 = (char *)__p; else v8 = (char *)__p[0]; sub_1000ADE4C(v7, v8); if ( v71 < 0 ) operator delete(__p[0]); v9 = GameLevelManager::sharedState(); GameLevelManager::sharedState(); GameLevelManager::getLeaderboardKey(1, 1, __p); if ( v71 >= 0 ) v10 = (char *)__p; else v10 = (char *)__p[0]; sub_1000ADE4C(v9, v10); if ( v71 < 0 ) operator delete(__p[0]); v11 = GameLevelManager::sharedState(); GameLevelManager::sharedState(); GameLevelManager::getLeaderboardKey(1, 2, __p); if ( v71 >= 0 ) v12 = (char *)__p; else v12 = (char *)__p[0]; sub_1000ADE4C(v11, v12); if ( v71 < 0 ) operator delete(__p[0]); v13 = GameLevelManager::sharedState(); GameLevelManager::sharedState(); GameLevelManager::getLeaderboardKey(1, 3, __p); if ( v71 >= 0 ) v14 = (char *)__p; else v14 = (char *)__p[0]; sub_1000ADE4C(v13, v14); if ( v71 < 0 ) operator delete(__p[0]); v15 = GameLevelManager::sharedState(); GameLevelManager::sharedState(); GameLevelManager::getLeaderboardKey(4, 0, __p); if ( v71 >= 0 ) v16 = (char *)__p; else v16 = (char *)__p[0]; sub_1000ADE4C(v15, v16); if ( v71 < 0 ) operator delete(__p[0]); v17 = GameLevelManager::sharedState(); GameLevelManager::sharedState(); GameLevelManager::getLeaderboardKey(4, 1, __p); if ( v71 >= 0 ) v18 = (char *)__p; else v18 = (char *)__p[0]; sub_1000ADE4C(v17, v18); if ( v71 < 0 ) operator delete(__p[0]); v19 = GameLevelManager::sharedState(); GameLevelManager::sharedState(); GameLevelManager::getLeaderboardKey(4, 2, __p); if ( v71 >= 0 ) v20 = (char *)__p; else v20 = (char *)__p[0]; sub_1000ADE4C(v19, v20); if ( v71 < 0 ) operator delete(__p[0]); v21 = GameLevelManager::sharedState(); GameLevelManager::sharedState(); GameLevelManager::getLeaderboardKey(4, 3, __p); if ( v71 >= 0 ) v22 = (char *)__p; else v22 = (char *)__p[0]; sub_1000ADE4C(v21, v22); if ( v71 < 0 ) operator delete(__p[0]); v23 = GameLevelManager::sharedState(); GameLevelManager::sharedState(); GameLevelManager::getLeaderboardKey(2, 0, __p); if ( v71 >= 0 ) v24 = (char *)__p; else v24 = (char *)__p[0]; sub_1000ADE4C(v23, v24); if ( v71 < 0 ) operator delete(__p[0]); v25 = GameLevelManager::sharedState(); GameLevelManager::sharedState(); GameLevelManager::getLeaderboardKey(2, 1, __p); if ( v71 >= 0 ) v26 = (char *)__p; else v26 = (char *)__p[0]; sub_1000ADE4C(v25, v26); if ( v71 < 0 ) operator delete(__p[0]); v27 = GameLevelManager::sharedState(); GameLevelManager::sharedState(); GameLevelManager::getLeaderboardKey(2, 2, __p); if ( v71 >= 0 ) v28 = (char *)__p; else v28 = (char *)__p[0]; sub_1000ADE4C(v27, v28); if ( v71 < 0 ) operator delete(__p[0]); v29 = GameLevelManager::sharedState(); GameLevelManager::sharedState(); GameLevelManager::getLeaderboardKey(2, 3, __p); if ( v71 >= 0 ) v30 = (char *)__p; else v30 = (char *)__p[0]; sub_1000ADE4C(v29, v30); if ( v71 < 0 ) operator delete(__p[0]); } v31 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v31, __p); v32 = (float *)cocos2d::CCSprite::create((__int64)"GJ_gradientBG.png"); sub_1000262BC((float *)&v69, 0.0, 0.0); (*(void (__fastcall **)(float *, double *))(*(_QWORD *)v32 + 296LL))(v32, &v69); (*(void (__fastcall **)(__int64, float *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v32, 4294967294LL); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v32 + 128LL))(v32, (float)(*(float *)__p + 10.0) / v32[108]); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v32 + 144LL))( v32, (float)(*((float *)__p + 1) + 10.0) / v32[109]); sub_1000262BC((float *)&v69, -5.0, -5.0); (*(void (__fastcall **)(float *, double *))(*(_QWORD *)v32 + 184LL))(v32, &v69); BYTE2(v69) = -1; LOWORD(v69) = 26112; (*(void (__fastcall **)(float *, double *))(*(_QWORD *)v32 + 960LL))(v32, &v69); v33 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_sideArt_001.png"); sub_1000262BC((float *)&v69, 0.0, 0.0); (*(void (__fastcall **)(void *, double *))(*(_QWORD *)v33 + 296LL))(v33, &v69); v34 = cocos2d::CCDirector::sharedDirector(); v35 = sub_100207EA8(v34) + -1.0; v36 = cocos2d::CCDirector::sharedDirector(); v37 = sub_100207EA0(v36); sub_1000262BC((float *)&v69, v35, v37 + -1.0); (*(void (__fastcall **)(void *, double *))(*(_QWORD *)v33 + 184LL))(v33, &v69); (*(void (__fastcall **)(__int64, void *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v33, 1); v38 = (unsigned __int8 *)cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_sideArt_001.png"); sub_1000262BC((float *)&v69, 1.0, 0.0); (*(void (__fastcall **)(unsigned __int8 *, double *))(*(_QWORD *)v38 + 296LL))(v38, &v69); v39 = cocos2d::CCDirector::sharedDirector(); v40 = sub_100207EB0(v39) + 1.0; v41 = cocos2d::CCDirector::sharedDirector(); v42 = sub_100207EA0(v41); sub_1000262BC((float *)&v69, v40, v42 + -1.0); (*(void (__fastcall **)(unsigned __int8 *, double *))(*(_QWORD *)v38 + 184LL))(v38, &v69); cocos2d::CCSprite::setFlipX(v38, 1); (*(void (__fastcall **)(__int64, unsigned __int8 *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v38, 1); v43 = LoadingCircle::create(); *(_QWORD *)(a1 + 480) = v43; v43[69] = a1; *((_BYTE *)v43 + 560) = 0; cocos2d::CCObject::retain((__int64)v43); LoadingCircle::show(*(_QWORD *)(a1 + 480)); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 480) + 344LL))(*(_QWORD *)(a1 + 480), 0); sub_100009900(v67, "No Internet connection!"); sub_1000262BC((float *)&v69, 0.5, 1.0); v44 = TextArea::create((__int64)v67, (__int64)"bigFont.fnt", &v69, 0, 0, 1.0, 600.0, 20.0); *(_QWORD *)(a1 + 488) = v44; if ( v68 < 0 ) { operator delete(v67[0]); v44 = *(_DWORD **)(a1 + 488); } v44[162] = 1106247680; sub_1000262BC((float *)&v69, *(float *)__p * 0.5, (float)(*((float *)__p + 1) * 0.5) + 10.0); (*(void (__fastcall **)(_DWORD *, double *))(*(_QWORD *)v44 + 184LL))(v44, &v69); (*(void (__fastcall **)(_QWORD, float))(**(_QWORD **)(a1 + 488) + 160LL))(*(_QWORD *)(a1 + 488), 0.6); (*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 464LL))(a1, *(_QWORD *)(a1 + 488), 2); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 488) + 344LL))(*(_QWORD *)(a1 + 488), 0); v45 = cocos2d::CCMenu::create(); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v45, 10); v46 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_infoIcon_001.png"); v47 = CCMenuItemSpriteExtra::create((__int64)v46, 0, a1, (__int64)LeaderboardsLayer::onInfo, 0); CCMenuItemSpriteExtra::setSizeMult((__int64)v47, 2.0); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v45 + 456LL))(v45, v47); v48 = cocos2d::CCDirector::sharedDirector(); v49 = sub_100207EA8(v48) + 30.0; v50 = cocos2d::CCDirector::sharedDirector(); v51 = sub_100207EA0(v50); sub_1000262BC((float *)&v69, v49, v51 + 30.0); (*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v45 + 184LL))(v45, &v69); sub_10045800C(a1); LeaderboardsLayer::selectLeaderboard(a1, v4, a3); v52 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_arrow_01_001.png"); v53 = CCMenuItemSpriteExtra::create((__int64)v52, 0, a1, (__int64)LeaderboardsLayer::onBack, 0); CCMenuItemSpriteExtra::setSizeMult((__int64)v53, 1.6); v61 = sub_100270434((__int64)v53, v54, v55, v56, v57, v58, v59, v60, 0); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v61, 1); v62 = cocos2d::CCDirector::sharedDirector(); v63 = sub_100207EA8(v62) + 24.0; v64 = cocos2d::CCDirector::sharedDirector(); v65 = sub_100207E98(v64); sub_1000262BC((float *)&v69, v63, v65 + -23.0); (*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v61 + 184LL))(v61, &v69); if ( (unsigned int)PlatformToolbox::isControllerConnected() ) GameToolbox::addBackButton(a1, (__int64)v53); } return v6; }
GD Web Decomp Icon

GD Web Decomp

Raw Source