// // LevelLeaderboard::init from 0x932568 to 0x9336c4 (4444 bytes) // // 2 xrefs: // > LevelLeaderboard::create @ 0x9337f4 // > @ 0x4b690 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // bool LevelLeaderboard::init(LevelLeaderboard *a1, GJGameLevel *a2, LevelLeaderboardType a3, LevelLeaderboardMode a4) { LevelLeaderboardType v7; // w2 GJLevelType m_levelType; // w1 _BOOL4 v9; // w27 cocos2d::CCDirector *v10; // x0 cocos2d::CCNode *v11; // x23 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // x24 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24 cocos2d::CCMenu *v14; // x0 void *v15; // x0 cocos2d::CCLabelBMFont *v16; // x19 void (__fastcall *v17)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23 char *v18; // x1 cocos2d::CCSprite *v19; // x23 float width; // s9 __int64 v21; // x24 float v22; // s8 float v23; // s0 void (__fastcall *v24)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24 __int64 v25; // x23 unsigned int v26; // w6 CCMenuItemSpriteExtra *SpriteButton; // x0 char *v28; // x2 cocos2d::CCMenu *v29; // x23 unsigned int v30; // w6 CCMenuItemSpriteExtra *m_pointsBtn; // x0 char *v32; // x2 cocos2d::CCMenu *v33; // x20 cocos2d::CCLayer *m_mainLayer; // x19 CCMenuItemSpriteExtra *m_timeBtn; // x23 void (__fastcall *v36)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20 CCMenuItemSpriteExtra *v37; // x23 void (__fastcall *v38)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20 char *p_m_fBrVertexMod; // x0 cocos2d::CCSprite *v40; // x0 CCMenuItemSpriteExtra *v41; // x19 cocos2d::CCMenu *v42; // x23 void (__fastcall *v43)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20 cocos2d::CCSprite *v44; // x19 CCMenuItemSpriteExtra *v45; // x0 CCMenuItemSpriteExtra *m_refreshBtn; // x19 cocos2d::CCMenu *v47; // x23 void (__fastcall *v48)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20 LoadingCircle *v49; // x0 LoadingCircle *m_circle; // x0 TextArea *v51; // x0 TextArea *m_noInternet; // x19 char *v53; // x0 void (__fastcall *v54)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCMenu *v55; // x27 float v56; // s11 int v57; // w19 unsigned int v58; // w24 cocos2d::CCPoint v59; // x0 char *v60; // x1 cocos2d::CCSprite *v61; // x0 CCMenuItemSpriteExtra *v62; // x23 unsigned int *v63; // x0 int v64; // w2 cocos2d::CCNode *v65; // x19 void *v66; // x0 void *v67; // x0 cocos2d::CCMenu *v68; // x20 void (__fastcall *v69)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23 GameLevelManager *v70; // x0 cocos2d::CCLabelBMFont *v71; // x19 cocos2d::CCArray **p_m_pTargetArray; // x20 unsigned int *p_m_nExtraKerning; // x19 int m_nExtraKerning; // w0 GameLevelManager *v76; // x0 void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // x3 cocos2d::CCMenu *v78; // x23 CCMenuItemSpriteExtra *v79; // x23 char *v80; // x0 cocos2d::CCMenu *v81; // x20 void (__fastcall *v82)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x19 bool isPlatformer; // w0 unsigned int *v84; // x1 int v85; // w2 unsigned int *v86; // x1 int v87; // w2 unsigned int *p_m_fTextureTop; // x1 int m_fTextureTop_low; // w2 unsigned int *v90; // x1 int v91; // w2 unsigned int *v92; // x1 int v93; // w0 unsigned int *v94; // x1 int v95; // w0 unsigned int *v96; // x1 int v97; // w2 unsigned int *v98; // x1 int v99; // w2 char v100; // [xsp+97h] [xbp+97h] cocos2d::CCSprite *v101; // [xsp+A0h] [xbp+A0h] void (__fastcall *v102)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+A8h] [xbp+A8h] char *v103; // [xsp+B0h] [xbp+B0h] char *m_buttonMenu; // [xsp+B0h] [xbp+B0h] _BOOL4 v106; // [xsp+B8h] [xbp+B8h] int v107; // [xsp+B8h] [xbp+B8h] float v108; // [xsp+C0h] [xbp+C0h] float v109; // [xsp+C4h] [xbp+C4h] cocos2d::CCLabelBMFont *v110; // [xsp+C8h] [xbp+C8h] BYREF cocos2d::CCSprite *v111; // [xsp+D0h] [xbp+D0h] BYREF const char *v112; // [xsp+D8h] [xbp+D8h] BYREF const char *v113; // [xsp+E0h] [xbp+E0h] BYREF char v114[8]; // [xsp+E8h] [xbp+E8h] BYREF const char *v115; // [xsp+F0h] [xbp+F0h] BYREF const char *v116; // [xsp+F8h] [xbp+F8h] BYREF cocos2d::CCPoint v117; // [xsp+100h] [xbp+100h] BYREF cocos2d::CCRect v118; // [xsp+108h] [xbp+108h] BYREF cocos2d::CCPoint v119; // 0:kr18_8.8 cocos2d::CCPoint v120; // 0:kr20_8.8 cocos2d::CCPoint v121; // 0:kr28_8.8 cocos2d::CCPoint v122; // 0:kr30_8.8 cocos2d::CCPoint v123; // 0:kr40_8.8 cocos2d::SEL_MenuHandler v124; // 0:x2.16 cocos2d::SEL_MenuHandler v125; // 0:x2.16 cocos2d::SEL_MenuHandler v126; // 0:x2.16 cocos2d::CCRect v127; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 v100 = FLAlertLayer::init(a1, 0x96u); if ( v100 ) { v7 = a3; if ( a3 == Local ) { isPlatformer = GJGameLevel::isPlatformer(a2); v7 = Local; if ( !isPlatformer ) v7 = 1; } m_levelType = a2->m_levelType; a1->m_level = a2; v9 = m_levelType == Editor; a1->m_mode = a4; if ( m_levelType == Editor ) v7 = Local; a1->m_type = v7; cocos2d::CCObject::retain(a2); v106 = GJGameLevel::isPlatformer(a2); v10 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v10); cocos2d::CCRect::CCRect(&v118, 0.0, 0.0, 80.0, 80.0); v11 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"GJ_square02.png", (const char *)&v118, v127); ((void (__fastcall *)(cocos2d::CCNode *, __int64))v11->__vftable[1].~CCNode_0)(v11, 0xFFFFFFFFLL); setContentSize = v11->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v118, 440.0, 290.0); setContentSize(v11, (const cocos2d::CCSize *)&v118); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v11, -1); setPosition = v11->setPosition; cocos2d::CCPoint::CCPoint(&v118.origin, v108 * 0.5, v109 * 0.5); setPosition(v11, &v118.origin); v14 = cocos2d::CCMenu::create(); a1->m_buttonMenu = v14; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v14, 10); sub_D18D28(&v118); sub_D153B8((int)&v110, *(char **)&v118.origin); v15 = (void *)(*(_QWORD *)&v118.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v118.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v86 = (unsigned int *)(*(_QWORD *)&v118.origin - 8LL); do v87 = __ldaxr(v86); while ( __stlxr(v87 - 1, v86) ); } else { v87 = *(_DWORD *)(*(_QWORD *)&v118.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v118.origin - 8LL) = v87 - 1; } if ( v87 <= 0 ) operator delete(v15); } sub_D15FD4(&v110, " Leaderboard", 12); v16 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v16, 20); v17 = v16->setPosition; cocos2d::CCPoint::CCPoint(&v118.origin, v108 * 0.5, (float)((float)(v109 * 0.5) + 145.0) - 18.0); v17(v16, &v118.origin); cocos2d::CCLabelBMFont::limitLabelWidth(v16, 300.0, 0.8, 0.0); if ( v106 ) { if ( a4 == Points ) v18 = "GJ_pointsIcon_001.png"; else v18 = "GJ_timeIcon_001.png"; sub_D153B8((int)&v111, v18); v19 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v111); width = v19->m_obRect.size.width; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v19, 20); v103 = (char *)v19->setPosition; v21 = (__int64)v16->getPosition(v16); v22 = v16->getContentSize(v16)->width; v23 = v16->getScale(v16); cocos2d::CCPoint::CCPoint(&v117, (float)((float)(v22 * v23) * 0.5) + 2.5, -3.0); cocos2d::CCPoint::operator+(&v118, v21, &v117); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCRect *))v103)(v19, &v118); v24 = v16->setPosition; v25 = (__int64)v16->getPosition(v16); cocos2d::CCPoint::CCPoint(&v117, -2.5 - (float)(width * 0.5), 0.0); cocos2d::CCPoint::operator+(&v118, v25, &v117); v24(v16, &v118.origin); sub_D153B8((int)&v112, "GJ_timeIcon_001.png"); m_buttonMenu = (char *)a1->m_buttonMenu; cocos2d::CCPoint::CCPoint(&v118.origin, 0.0, -0.5); if ( a4 ) v26 = 1; else v26 = 2; SpriteButton = LevelLeaderboard::getSpriteButton( (void (__cdecl *)(cocos2d::CCObject *))a1, &v112, (size_t)LevelLeaderboard::onChangeMode, 0.7, 0, (__int64)m_buttonMenu, &v118.origin, v26); a1->m_timeBtn = SpriteButton; v28 = (char *)(v112 - 24); if ( v112 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v94 = (unsigned int *)(v112 - 8); do v95 = __ldaxr(v94); while ( __stlxr(v95 - 1, v94) ); } else { v95 = *((_DWORD *)v112 - 2); *((_DWORD *)v112 - 2) = v95 - 1; } if ( v95 <= 0 ) operator delete(v28); SpriteButton = a1->m_timeBtn; } SpriteButton->setEnabled(SpriteButton, a4 != Time); a1->m_timeBtn->setTag(a1->m_timeBtn, 0); sub_D153B8((int)&v113, "GJ_pointsIcon_001.png"); v29 = a1->m_buttonMenu; cocos2d::CCPoint::CCPoint(&v118.origin, 0.0, -1.0); if ( a4 == Points ) v30 = 2; else v30 = 1; m_pointsBtn = LevelLeaderboard::getSpriteButton( (void (__cdecl *)(cocos2d::CCObject *))a1, &v113, (size_t)LevelLeaderboard::onChangeMode, 0.7, 0, (__int64)v29, &v118.origin, v30); a1->m_pointsBtn = m_pointsBtn; v32 = (char *)(v113 - 24); if ( v113 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v92 = (unsigned int *)(v113 - 8); do v93 = __ldaxr(v92); while ( __stlxr(v93 - 1, v92) ); } else { v93 = *((_DWORD *)v113 - 2); *((_DWORD *)v113 - 2) = v93 - 1; } if ( v93 <= 0 ) operator delete(v32); m_pointsBtn = a1->m_pointsBtn; } m_pointsBtn->setEnabled(m_pointsBtn, a4 != Points); a1->m_pointsBtn->setTag(a1->m_pointsBtn, 1); v33 = a1->m_buttonMenu; m_mainLayer = a1->m_mainLayer; cocos2d::CCPoint::CCPoint(&v117, (float)((float)(v108 * 0.5) + -220.0) + 25.0, (float)(v109 * 0.5) + 40.0); cocos2d::CCNode::convertToWorldSpace(m_mainLayer, &v117); cocos2d::CCNode::convertToNodeSpace(v33, &v118.origin); m_timeBtn = a1->m_timeBtn; v36 = m_timeBtn->setPosition; cocos2d::CCPoint::CCPoint(&v117, 0.0, 20.0); cocos2d::CCPoint::operator+(&v118, v114, &v117); v36(m_timeBtn, &v118.origin); v37 = a1->m_pointsBtn; v38 = v37->setPosition; cocos2d::CCPoint::CCPoint(&v117, 0.0, -20.0); cocos2d::CCPoint::operator+(&v118, v114, &v117); v38(v37, &v118.origin); if ( v9 ) { sub_D153B8((int)&v115, "edit_delBtn_001.png"); v78 = a1->m_buttonMenu; cocos2d::CCPoint::CCPoint(&v118.origin, 0.0, -0.5); v79 = LevelLeaderboard::getSpriteButton( (void (__cdecl *)(cocos2d::CCObject *))a1, &v115, (size_t)LevelLeaderboard::onDeleteLocalScores, 0.7, 0, (__int64)v78, &v118.origin, 4u); v80 = (char *)(v115 - 24); if ( v115 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v98 = (unsigned int *)(v115 - 8); do v99 = __ldaxr(v98); while ( __stlxr(v99 - 1, v98) ); } else { v99 = *((_DWORD *)v115 - 2); *((_DWORD *)v115 - 2) = v99 - 1; } if ( v99 <= 0 ) operator delete(v80); } cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v116, (float)((float)(v108 * 0.5) + 220.0) - 25.0, (float)((float)(v109 * 0.5) + 145.0) - 23.0); v81 = a1->m_buttonMenu; v82 = v79->setPosition; cocos2d::CCNode::convertToWorldSpace(a1->m_mainLayer, (const cocos2d::CCPoint *)&v116); v123 = cocos2d::CCNode::convertToNodeSpace(v81, &v117); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v82)(v79, &v118, v123.x, v123.y); } p_m_fBrVertexMod = (char *)&v111[-1].m_fBrVertexMod; if ( (__int64 *)&v111[-1].m_fBrVertexMod != &qword_124B6B0 ) { if ( &pthread_create ) { p_m_fTextureTop = (unsigned int *)&v111[-1].m_fTextureTop; do m_fTextureTop_low = __ldaxr(p_m_fTextureTop); while ( __stlxr(m_fTextureTop_low - 1, p_m_fTextureTop) ); } else { m_fTextureTop_low = LODWORD(v111[-1].m_fTextureTop); LODWORD(v111[-1].m_fTextureTop) = m_fTextureTop_low - 1; } if ( m_fTextureTop_low <= 0 ) operator delete(p_m_fBrVertexMod); } } if ( a1->m_level->m_accountID.random == a1->m_level->m_accountID.seed ) { v76 = GameLevelManager::sharedState(); GameLevelManager::accountIDForUserID(v76, a1->m_level->m_userID.random - a1->m_level->m_userID.seed); } v40 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png"); v124.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v124.adj = (size_t)LevelLeaderboard::onClose; v41 = CCMenuItemSpriteExtra::create(v40, nullptr, v124); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v41); CCMenuItemSpriteExtra::setSizeMult(v41, 1.6); v42 = a1->m_buttonMenu; v43 = v41->setPosition; cocos2d::CCPoint::CCPoint( &v117, (float)((float)(v108 * 0.5) + -220.0) + 10.0, (float)((float)(v109 * 0.5) + 145.0) - 10.0); v119 = cocos2d::CCNode::convertToNodeSpace(v42, &v117); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v43)(v41, &v118, v119.x, v119.y); v44 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png"); v44->setScale(v44, 0.6); v125.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v125.adj = (size_t)LevelLeaderboard::onUpdate; v45 = CCMenuItemSpriteExtra::create(v44, nullptr, v125); a1->m_refreshBtn = v45; CCMenuItemSpriteExtra::setSizeMult(v45, 1.5); a1->m_buttonMenu->addChild(a1->m_buttonMenu, a1->m_refreshBtn); m_refreshBtn = a1->m_refreshBtn; v47 = a1->m_buttonMenu; v48 = m_refreshBtn->setPosition; cocos2d::CCPoint::CCPoint(&v117, (float)((float)(v108 * 0.5) + 220.0) - 25.0, (float)(v109 * 0.5) + 100.0); v120 = cocos2d::CCNode::convertToNodeSpace(v47, &v117); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v48)( m_refreshBtn, &v118, v120.x, v120.y); a1->m_refreshBtn->setVisible(a1->m_refreshBtn, 0); v49 = LoadingCircle::create(); a1->m_circle = v49; v49->m_parentLayer = a1->m_mainLayer; m_circle = a1->m_circle; m_circle->m_fade = 0; cocos2d::CCObject::retain(m_circle); LoadingCircle::show(a1->m_circle); a1->m_circle->setVisible(a1->m_circle, 0); sub_D153B8((int)&v116, "No Internet connection!"); cocos2d::CCPoint::CCPoint(&v118.origin, 0.5, 1.0); v51 = (TextArea *)TextArea::create((__int64)&v116, "bigFont.fnt", &v118.origin, 0, 1.0, 600.0, 20.0); a1->m_noInternet = v51; m_noInternet = v51; v53 = (char *)(v116 - 24); if ( v116 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v84 = (unsigned int *)(v116 - 8); do v85 = __ldaxr(v84); while ( __stlxr(v85 - 1, v84) ); } else { v85 = *((_DWORD *)v116 - 2); *((_DWORD *)v116 - 2) = v85 - 1; } if ( v85 <= 0 ) operator delete(v53); m_noInternet = a1->m_noInternet; } v54 = m_noInternet->setPosition; m_noInternet->m_height = 30.0; cocos2d::CCPoint::CCPoint(&v118.origin, v108 * 0.5, (float)(v109 * 0.5) + 10.0); v54(m_noInternet, &v118.origin); a1->m_noInternet->setScale(a1->m_noInternet, 0.6); a1->m_mainLayer->addChild_0(a1->m_mainLayer, a1->m_noInternet, 2); a1->m_noInternet->setVisible(a1->m_noInternet, 0); if ( !v9 ) { v55 = cocos2d::CCMenu::create(); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v55, 2); if ( v106 ) { v107 = 4; v56 = 15.0; } else { v56 = 0.0; v107 = 3; } v57 = 0; while ( 1 ) { sub_D153B8((int)&v116, &byte_F288A0); switch ( v57 ) { case 2: sub_D1798C(&v116, "levelLeaderboard_globalWeeklyBtn_001.png", 40); v58 = 2; break; case 3: sub_D1798C(&v116, "levelLeaderboard_localBtn_001.png", 33); v58 = 3; break; case 1: sub_D1798C(&v116, "levelLeaderboard_globalBtn_001.png", 34); v58 = 1; break; default: sub_D1798C(&v116, "levelLeaderboard_friendsBtn_001.png", 35); v58 = 0; break; } v59 = (cocos2d::CCPoint)v116; v60 = (char *)(v116 - 24); if ( *((_QWORD *)v116 - 3) ) { v61 = cocos2d::CCSprite::createWithSpriteFrameName(v116); v126.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v101 = v61; v126.adj = (size_t)LevelLeaderboard::onChangeType; v62 = CCMenuItemSpriteExtra::create(v61, nullptr, v126); v62->setTag(v62, v58); v55->addChild(v55, v62); v102 = v62->setPosition; cocos2d::CCPoint::CCPoint( &v117, (float)((float)(v108 * 0.5) + 220.0) - 25.0, (float)((float)((float)(v109 * 0.5) + 42.0) - (float)((float)v57 * 42.0)) + v56); v121 = cocos2d::CCNode::convertToNodeSpace(v55, &v117); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v102)( v62, &v118, v121.x, v121.y); if ( a1->m_type == v58 ) { v62->setEnabled(v62, 0); setColor = v101->setColor; LOWORD(v118.origin.x) = -26986; BYTE2(v118.origin.x) = -106; setColor(v101, (const cocos2d::ccColor3B *)&v118); } v59 = (cocos2d::CCPoint)v116; v60 = (char *)(v116 - 24); if ( v116 - 24 == (const char *)&qword_124B6B0 ) goto LABEL_27; LABEL_36: if ( &pthread_create ) { v63 = (unsigned int *)(*(_QWORD *)&v59 - 8LL); do v64 = __ldaxr(v63); while ( __stlxr(v64 - 1, v63) ); } else { v64 = *(_DWORD *)(*(_QWORD *)&v59 - 8LL); *(_DWORD *)(*(_QWORD *)&v59 - 8LL) = v64 - 1; } if ( v64 > 0 ) goto LABEL_27; ++v57; operator delete(v60); if ( v57 == v107 ) break; } else { if ( v60 != (char *)&qword_124B6B0 ) goto LABEL_36; LABEL_27: if ( ++v57 == v107 ) break; } } } if ( GJGameLevel::getNormalPercent(a1->m_level) > a1->m_level->m_newNormalPercent2.random - a1->m_level->m_newNormalPercent2.seed ) { sub_D153B8((int)&v117, "Level Leaderboards"); sub_D153B8( (int)&v118, "Q: My score is wrong!?\n" "A: Level leaderboards changed in update 2.11. Scores from before update 2.11 need to be replayed. You can see yo" "ur leaderboard percentage by pressing the info button on the bottom left of the level page, or toggle the Leader" "board percent option."); v65 = (cocos2d::CCNode *)InfoAlertButton::create(1.0); v66 = (void *)(*(_QWORD *)&v118.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v118.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v96 = (unsigned int *)(*(_QWORD *)&v118.origin - 8LL); do v97 = __ldaxr(v96); while ( __stlxr(v97 - 1, v96) ); } else { v97 = *(_DWORD *)(*(_QWORD *)&v118.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v118.origin - 8LL) = v97 - 1; } if ( v97 <= 0 ) operator delete(v66); } v67 = (void *)(*(_QWORD *)&v117 - 24LL); if ( (__int64 *)(*(_QWORD *)&v117 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v90 = (unsigned int *)(*(_QWORD *)&v117 - 8LL); do v91 = __ldaxr(v90); while ( __stlxr(v91 - 1, v90) ); } else { v91 = *(_DWORD *)(*(_QWORD *)&v117 - 8LL); *(_DWORD *)(*(_QWORD *)&v117 - 8LL) = v91 - 1; } if ( v91 <= 0 ) operator delete(v67); } a1->m_buttonMenu->addChild(a1->m_buttonMenu, v65); v68 = a1->m_buttonMenu; v69 = v65->setPosition; cocos2d::CCPoint::CCPoint( &v117, (float)((float)(v108 * 0.5) + 220.0) - 5.0, (float)((float)(v109 * 0.5) + 145.0) - 5.0); v122 = cocos2d::CCNode::convertToNodeSpace(v68, &v117); ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *, float, float))v69)(v65, &v118, v122.x, v122.y); } if ( GameManager::sharedState()->m_scoreValid || a1->m_type == Local ) { LevelLeaderboard::loadScores(a1); v71 = v110; p_m_pTargetArray = &v110[-1].m_pTargetArray; if ( &v110[-1].m_pTargetArray == (cocos2d::CCArray **)&qword_124B6B0 ) return v100; } else { LevelLeaderboard::setupLeaderboard(a1, nullptr); GameLevelManager::sharedState()->m_leaderboardManagerDelegate = &a1->LeaderboardManagerDelegate; v70 = GameLevelManager::sharedState(); GameLevelManager::updateUserScore(v70); v71 = v110; p_m_pTargetArray = &v110[-1].m_pTargetArray; if ( &v110[-1].m_pTargetArray == (cocos2d::CCArray **)&qword_124B6B0 ) return v100; } if ( &pthread_create ) { p_m_nExtraKerning = (unsigned int *)&v71[-1].m_nExtraKerning; do m_nExtraKerning = __ldaxr(p_m_nExtraKerning); while ( __stlxr(m_nExtraKerning - 1, p_m_nExtraKerning) ); } else { m_nExtraKerning = v71[-1].m_nExtraKerning; v71[-1].m_nExtraKerning = m_nExtraKerning - 1; } if ( m_nExtraKerning <= 0 ) operator delete(p_m_pTargetArray); } return v100; }
GD Web Decomp Icon

GD Web Decomp

Raw Source