// // TopArtistsLayer::init from 0x631620 to 0x631b40 (1312 bytes) // // 1 xrefs: // > TopArtistsLayer::create @ 0x6313fe // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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:55:17 +0000 // GameManager *__fastcall TopArtistsLayer::init(cocos2d::CCObject **this) { GameManager *v2; // r0 GameManager *v3; // r10 int v4; // r5 void (__fastcall *v5)(int, _DWORD *); // r7 int (__fastcall *v6)(int, _DWORD *); // r7 cocos2d::CCMenu *v7; // r0 cocos2d::CCObject *v8; // r0 const char *v9; // r2 int v10; // r5 void (__fastcall *v11)(int, _DWORD *); // r7 const char *v12; // r1 int v13; // r0 int v14; // r7 int (__fastcall *v15)(int, _DWORD *); // r11 cocos2d::CCMenu *v16; // r0 const cocos2d::CCPoint *v17; // r8 const char *v18; // r1 float v19; // s19 int v20; // r7 int v21; // r0 const char *v22; // r1 cocos2d::CCSprite *v23; // r6 int v24; // r0 int v25; // r11 LoadingCircle *v26; // r0 cocos2d::CCLayerColor *v27; // r0 int v28; // r3 const char *v29; // r2 cocos2d::CCObject *v30; // r0 int v31; // r6 void (__fastcall *v32)(int, _BYTE *); // r8 int v33; // r6 int (__fastcall *v34)(int, _BYTE *); // r8 GameLevelManager *v35; // r0 GameLevelManager *v36; // r0 const char *TopArtistsKey; // r0 const char *v38; // r7 size_t v39; // r0 GameLevelManager *v40; // r0 GameLevelManager *v41; // r0 char *v42; // r1 _BOOL4 StoredOnlineLevels; // r0 _BOOL4 v44; // r7 void (__fastcall *v45)(cocos2d::CCObject **, int *, char *); // r8 GameLevelManager *v46; // r0 char *v47; // r1 const char *PageInfo; // r11 size_t v49; // r0 char *v50; // r2 char *v51; // r2 GameLevelManager *v52; // r0 float v53; // r2 int v54; // r3 GameLevelManager *v55; // r0 GameLevelManager *v56; // r0 GameLevelManager *v57; // r0 cocos2d::CCPoint *v59; // [sp+8h] [bp-64h] cocos2d::CCPoint *v60; // [sp+8h] [bp-64h] cocos2d::CCPoint *v61; // [sp+8h] [bp-64h] int v62; // [sp+Ch] [bp-60h] float v63; // [sp+14h] [bp-58h] BYREF float v64; // [sp+18h] [bp-54h] char v65[8]; // [sp+1Ch] [bp-50h] BYREF _BYTE v66[8]; // [sp+24h] [bp-48h] BYREF int (__fastcall *v67)(TopArtistsLayer *, cocos2d::CCObject *); // [sp+2Ch] [bp-40h] int v68; // [sp+30h] [bp-3Ch] _DWORD v69[2]; // [sp+34h] [bp-38h] BYREF int v70[2]; // [sp+3Ch] [bp-30h] BYREF char *v71; // [sp+44h] [bp-28h] int v72[3]; // [sp+48h] [bp-24h] BYREF _DWORD v73[4]; // [sp+54h] [bp-18h] BYREF v2 = FLAlertLayer::init((FLAlertLayer *)this, 150); v3 = v2; if ( v2 ) { cocos2d::CCDirector::sharedDirector(v2); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v63); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v73, 0.0, 0.0, 80.0, 80.0); v4 = cocos2d::extension::CCScale9Sprite::create("GJ_square02.png", v73); (*(void (__fastcall **)(int, int))(*(_DWORD *)v4 + 456))(v4, 255); v5 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v4 + 160); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v73, 440.0, 290.0); v5(v4, v73); (*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v4, -1); v6 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v4 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v73, v63 * 0.5, v64 * 0.5); v7 = (cocos2d::CCMenu *)v6(v4, v73); v8 = (cocos2d::CCObject *)cocos2d::CCMenu::create(v7); *(this + 111) = v8; (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v8, 10); v10 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Featured Artists", "bigFont.fnt", v9); (*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v10, 20); v11 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v10 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v73, v63 * 0.5, (float)((float)(v64 * 0.5) + 145.0) - 18.0); v11(v10, v73); (*(void (__fastcall **)(int, int))(*(_DWORD *)v10 + 80))(v10, 1058642330); *(this + 125) = (cocos2d::CCObject *)-1; v13 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v12); v67 = TopArtistsLayer::onClose; v68 = 0; v14 = CCMenuItemSpriteExtra::create(v13, 0, (int)this, (int)TopArtistsLayer::onClose, 0); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v14); CCMenuItemSpriteExtra::setSizeMult(v14, 1.6); v15 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v14 + 92); v59 = *(this + 111); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v69, (float)((float)(v63 * 0.5) - 220.0) + 10.0, (float)((float)(v64 * 0.5) + 145.0) - 10.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v73, v59); v16 = (cocos2d::CCMenu *)v15(v14, v73); v17 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v16); (*(void (__fastcall **)(_DWORD, const cocos2d::CCPoint *, int))(*(_DWORD *)*(this + 115) + 232))( *(this + 115), v17, 10); v19 = v64 * 0.5; v20 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_03_001.png", v18); (*(void (__fastcall **)(int, int))(*(_DWORD *)v20 + 80))(v20, 1061997773); v69[0] = TopArtistsLayer::onPrevPage; v69[1] = 0; v21 = CCMenuItemSpriteExtra::create(v20, 0, (int)this, (int)TopArtistsLayer::onPrevPage, 0); *(this + 135) = (cocos2d::CCObject *)v21; CCMenuItemSpriteExtra::setSizeMult(v21, 1.2); (*(void (__fastcall **)(const cocos2d::CCPoint *, _DWORD))(*(_DWORD *)v17 + 228))(v17, *(this + 135)); v62 = (int)*(this + 135); v60 = *(cocos2d::CCPoint **)(*(_DWORD *)v62 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, (float)((float)(v63 * 0.5) - 220.0) + 22.0, v19); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v73, v17); ((void (__fastcall *)(int, _DWORD *))v60)(v62, v73); v23 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_arrow_03_001.png", v22); (*(void (__fastcall **)(cocos2d::CCSprite *, int))(*(_DWORD *)v23 + 80))(v23, 1061997773); cocos2d::CCSprite::setFlipX(v23, 1); v73[0] = TopArtistsLayer::onNextPage; v73[1] = 0; v24 = CCMenuItemSpriteExtra::create((int)v23, 0, (int)this, (int)TopArtistsLayer::onNextPage, 0); *(this + 134) = (cocos2d::CCObject *)v24; CCMenuItemSpriteExtra::setSizeMult(v24, 1.2); (*(void (__fastcall **)(const cocos2d::CCPoint *, _DWORD))(*(_DWORD *)v17 + 228))(v17, *(this + 134)); v25 = (int)*(this + 134); v61 = *(cocos2d::CCPoint **)(*(_DWORD *)v25 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v65, (float)((float)(v63 * 0.5) + 220.0) - 22.0, v19); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v66, v17); ((void (__fastcall *)(int, _BYTE *))v61)(v25, v66); (*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 135) + 172))(*(this + 135), 0); v26 = (LoadingCircle *)(*(int (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 134) + 172))(*(this + 134), 0); v27 = LoadingCircle::create(v26); v28 = (int)*(this + 115); *(this + 133) = v27; *((_DWORD *)v27 + 111) = v28; *((_BYTE *)*(this + 133) + 448) = 0; cocos2d::CCObject::retain(*(this + 133)); LoadingCircle::show((cocos2d::CCNode **)*(this + 133)); (*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 133) + 172))(*(this + 133), 0); v30 = (cocos2d::CCObject *)cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)" ", "goldFont.fnt", v29); *(this + 137) = v30; (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v30); v31 = (int)*(this + 137); v32 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v31 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v66, (float)((float)(v63 * 0.5) + 220.0) - 8.0, (float)((float)(v64 * 0.5) + 145.0) - 8.0); v32(v31, v66); v33 = (int)*(this + 137); v34 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v33 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, 1.0, 1.0); v35 = (GameLevelManager *)v34(v33, v66); v36 = (GameLevelManager *)GameLevelManager::sharedState(v35); TopArtistsKey = (const char *)GameLevelManager::getTopArtistsKey(v36, nullptr); v70[0] = 0; v70[1] = 0; v71 = nullptr; v38 = TopArtistsKey; v39 = strlen(TopArtistsKey); v40 = (GameLevelManager *)std::string::__init(v70, v38, v39); v41 = (GameLevelManager *)GameLevelManager::sharedState(v40); if ( (v70[0] & 1) != 0 ) v42 = v71; else v42 = (char *)v70 + 1; StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v41, v42); v44 = StoredOnlineLevels; if ( StoredOnlineLevels ) { v45 = *((void (__fastcall **)(cocos2d::CCObject **, int *, char *))*this + 170); v46 = (GameLevelManager *)GameLevelManager::sharedState((GameLevelManager *)StoredOnlineLevels); if ( (v70[0] & 1) != 0 ) v47 = v71; else v47 = (char *)v70 + 1; PageInfo = (const char *)GameLevelManager::getPageInfo(v46, v47); memset(v72, 0, sizeof(v72)); v49 = strlen(PageInfo); std::string::__init(v72, PageInfo, v49); if ( (v70[0] & 1) != 0 ) v50 = v71; else v50 = (char *)v70 + 1; v45(this, v72, v50); std::string::~string((int)v72); if ( (v70[0] & 1) != 0 ) v51 = v71; else v51 = (char *)v70 + 1; (*((void (__fastcall **)(cocos2d::CCObject **, _BOOL4, char *))*this + 168))(this, v44, v51); } else { v52 = (GameLevelManager *)GameLevelManager::sharedState(nullptr); GameLevelManager::makeTimeStamp(v52, "upd_artists", v53, v54); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 133) + 172))(*(this + 133), 1); v55 = (GameLevelManager *)TopArtistsLayer::setupLeaderboard((TopArtistsLayer *)this, nullptr); v56 = (GameLevelManager *)GameLevelManager::sharedState(v55); *((_DWORD *)v56 + 234) = this + 130; v57 = (GameLevelManager *)GameLevelManager::sharedState(v56); GameLevelManager::getTopArtists(v57, nullptr, 0); } std::string::~string((int)v70); } return v3; }
GD Web Decomp Icon

GD Web Decomp

Raw Source