//
// MenuLayer::init from 0x6eb430 to 0x6ec8bc (5260 bytes)
//
// 3 xrefs:
// > MenuLayer::scene @ 0x6ec9c8
// > ??> @ 0x9e7b8
// > ??> @ 0x1426bb0
//
// 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 12:51:46 +0000
//
__int64 __fastcall MenuLayer::init(cocos2d::CCLabelBMFont **this)
{
GameManager *v2; // x0
unsigned int v3; // w24
GameManager *v5; // x0
GameManager *v6; // x0
GameManager *v7; // x0
GameManager *v8; // x0
cocos2d::CCDirector *v9; // x0
cocos2d::CCDirector *v10; // x0
MenuGameLayer *WinSize; // x0
__int64 v12; // x0
const char *v13; // x1
cocos2d::CCDirector **v14; // x22
float v15; // s9
__int64 (__fastcall *v16)(cocos2d::CCDirector **, __int64 *); // x23
cocos2d::CCDirector *v17; // x0
float v18; // s0
cocos2d::CCMenu *v19; // x0
cocos2d::CCNode *v20; // x23
const char *v21; // x1
__int64 v22; // x0
__int64 v23; // x25
void (__fastcall *v24)(cocos2d::CCNode *, __int64 *); // x22
const char *v25; // x1
__int64 v26; // x0
__int64 (__fastcall *v27)(__int64, __int64 *); // x22
__int64 v28; // x26
GameManager *v29; // x0
const char *v30; // x1
__int64 v31; // x0
__int64 (__fastcall *v32)(__int64, __int64 *); // x22
__int64 v33; // x26
GameManager *v34; // x0
cocos2d::CCDirector *v35; // x0
const char *v36; // x1
cocos2d::CCDirector *v37; // x0
cocos2d::CCMenu *ScreenBottom; // x0
float v39; // s0
float v40; // s12
cocos2d::CCMenu *v41; // x22
const char *v42; // x1
__int64 v43; // x26
__int64 v44; // x0
const char *v45; // x1
__int64 v46; // x26
const char *v47; // x1
__int64 v48; // x26
__int64 v49; // x0
GameManager *v50; // x0
GameManager *v51; // x0
const char *v52; // x1
void (__fastcall *v53)(cocos2d::CCMenu *, __int64 *); // x26
cocos2d::CCDirector *v54; // x0
cocos2d::CCDirector *v55; // x0
float v56; // s0
float v57; // s9
const char *v58; // x1
__int64 v59; // x26
cocos2d::CCMenu *v60; // x26
cocos2d::CCDirector **v61; // x27
void (__fastcall *v62)(cocos2d::CCDirector **, __int64 *); // x26
cocos2d::CCDirector *v63; // x0
float v64; // s0
const char *v65; // x1
__int64 v66; // x26
cocos2d::CCDirector **v67; // x26
const char *v68; // x1
__int64 v69; // x28
__int64 v70; // x28
const char *v71; // x1
__int64 v72; // x28
__int64 v73; // x28
const char *v74; // x1
const char *v75; // x1
cocos2d::CCDirector *v76; // x0
float v77; // s0
__int64 (__fastcall *v78)(cocos2d::CCDirector **); // x1
cocos2d::CCDirector **v79; // x0
void (__fastcall *v80)(__int64, __int64 *); // x26
void (__fastcall *v81)(__int64, __int64 *); // x26
void (__fastcall *v82)(cocos2d::CCNode *, __int64 *); // x26
__int64 (__fastcall *v83)(__int64, __int64 *); // x26
GameManager *v84; // x0
GameManager *v85; // x0
const char *v86; // x1
__int64 v87; // x26
cocos2d::CCMenu *v88; // x0
cocos2d::CCMenu *v89; // x27
cocos2d::CCDirector **v90; // x26
cocos2d::CCDirector *v91; // x0
float v92; // s0
GameManager *v93; // x0
GameManager *v94; // x0
unsigned __int64 v95; // x0
const char *v96; // x1
__int64 v97; // x0
__int64 v98; // x0
__int64 v99; // x26
void (__fastcall *v100)(__int64, __int64 *); // x27
const char *v101; // x2
__int64 v102; // x0
__int64 v103; // x26
void (__fastcall *v104)(__int64, __int64 *); // x27
GameManager *v105; // x0
GameManager *v106; // x0
GameManager *v107; // x0
const char *v108; // x1
GameManager *v109; // x0
GameManager *v110; // x0
GameManager *updated; // x0
const char *v112; // x1
__int64 v113; // x0
cocos2d::CCDirector **v114; // x23
void (__fastcall *v115)(cocos2d::CCDirector **, __int64 *); // x25
cocos2d::CCDirector *v116; // x0
float v117; // s0
GameManager *v118; // x0
GameManager *v119; // x0
unsigned __int64 UGV; // x0
cocos2d::CCDelayTime *v121; // x0
MusicDownloadManager *v122; // x0
GameManager *v123; // x0
GameManager *v124; // x0
unsigned __int64 v125; // x0
cocos2d::CCSequence *v126; // x20
cocos2d::CCFiniteTimeAction *v127; // x0
cocos2d::CCAction *v128; // x0
__int64 v129; // x0
__int64 v130; // x26
void (__fastcall *v131)(__int64, __int64 *); // x28
const cocos2d::CCPoint *v132; // x0
MusicDownloadManager *v133; // x0
GameLevelManager *v134; // x0
GameLevelManager *v135; // x0
cocos2d::CCSequence *v136; // x20
cocos2d::CCFiniteTimeAction *v137; // x0
cocos2d::CCAction *v138; // x0
cocos2d::CCSequence *v139; // x20
cocos2d::CCFiniteTimeAction *v140; // x0
cocos2d::CCAction *v141; // x0
const char *v142; // x1
__int64 v143; // x0
__int64 v144; // x23
void (__fastcall *v145)(__int64, __int64 *); // x26
const cocos2d::CCPoint *v146; // x0
void (__fastcall *v147)(cocos2d::CCNode *, __int64 *); // x25
const char *v148; // x1
__int64 v149; // x25
const cocos2d::CCPoint *v150; // x0
void (__fastcall *v151)(__int64, __int64 *); // x28
const char *v152; // x1
__int64 v153; // x25
cocos2d::CCNode *v154; // x28
const cocos2d::CCPoint *v155; // x0
void (__fastcall *v156)(__int64, __int64 *); // x27
const char *v157; // x1
__int64 v158; // x25
cocos2d::CCNode *v159; // x27
const cocos2d::CCPoint *v160; // x0
void (__fastcall *v161)(__int64, __int64 *); // x27
GameManager *v162; // x0
GameManager *v163; // x0
GJAccountManager *GameVariable; // x0
__int64 v165; // x0
float v166; // s9
cocos2d::CCDirector **v167; // x26
void (__fastcall *v168)(cocos2d::CCDirector **, __int64 *); // x27
cocos2d::CCDirector *v169; // x0
float v170; // s0
const char *v171; // x1
__int64 v172; // x28
void (__fastcall *v173)(__int64, __int64 *); // x27
const char *v174; // x2
__int64 v175; // x27
cocos2d::CCDirector **v176; // x0
__int64 (__fastcall *v177)(cocos2d::CCDirector **); // x1
void (__fastcall *v178)(__int64, __int64 *); // x26
const char *v179; // x2
__int64 v180; // x25
void (__fastcall *v181)(__int64, __int64 *); // x26
void (__fastcall *v182)(__int64, __int64 *); // x26
__int64 v183; // x27
__int64 v184; // x26
__int64 v185; // x0
__int64 v186; // x26
__int64 (__fastcall *v187)(__int64, __int64 *); // x27
const cocos2d::CCPoint *v188; // x0
__int64 v189; // x28
__int64 v190; // x0
__int64 v191; // x26
__int64 (__fastcall *v192)(__int64, __int64 *); // x27
__int64 v193; // [xsp+98h] [xbp+98h]
__int64 v194; // [xsp+A0h] [xbp+A0h]
__int64 v195; // [xsp+A8h] [xbp+A8h]
void (__fastcall *v196)(cocos2d::CCDirector **, __int64 *); // [xsp+B0h] [xbp+B0h]
__int64 v197; // [xsp+B0h] [xbp+B0h]
__int64 v198; // [xsp+B8h] [xbp+B8h]
__int64 v199; // [xsp+B8h] [xbp+B8h]
cocos2d::CCNode *v200; // [xsp+C0h] [xbp+C0h]
cocos2d::CCNode *v201; // [xsp+C0h] [xbp+C0h]
cocos2d::CCNode *v202; // [xsp+C0h] [xbp+C0h]
cocos2d::CCNode *v203; // [xsp+C0h] [xbp+C0h]
cocos2d::CCNode *v204; // [xsp+C0h] [xbp+C0h]
cocos2d::CCNode *v205; // [xsp+C0h] [xbp+C0h]
cocos2d::CCNode *v206; // [xsp+C0h] [xbp+C0h]
__int64 v207; // [xsp+C8h] [xbp+C8h]
__int64 v208; // [xsp+C8h] [xbp+C8h]
__int64 v209; // [xsp+C8h] [xbp+C8h]
__int64 v210; // [xsp+C8h] [xbp+C8h]
__int64 (__fastcall *v211)(cocos2d::CCDirector **, __int64 *); // [xsp+C8h] [xbp+C8h]
__int64 v212; // [xsp+D0h] [xbp+D0h] BYREF
_BYTE v213[8]; // [xsp+D8h] [xbp+D8h] BYREF
__int64 v214; // [xsp+E0h] [xbp+E0h] BYREF
__int64 v215; // [xsp+E8h] [xbp+E8h] BYREF
__int64 v216; // [xsp+F0h] [xbp+F0h] BYREF
v2 = (GameManager *)(unsigned __int8)cocos2d::CCLayer::init((cocos2d::CCLayer *)this);
v3 = (unsigned __int8)v2;
if ( (_BYTE)v2 )
{
v5 = (GameManager *)GameManager::sharedState(v2);
v6 = (GameManager *)GameManager::fadeInMenuMusic(v5);
v7 = (GameManager *)GameManager::sharedState(v6);
*((_BYTE *)v7 + 584) = 1;
v8 = (GameManager *)GameManager::sharedState(v7);
*((_DWORD *)v8 + 177) = 0;
*(_BYTE *)(GameManager::sharedState(v8) + 1064) = 0;
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, __int64))*this + 134))(this, 1);
v9 = (cocos2d::CCDirector *)(*((__int64 (__fastcall **)(cocos2d::CCLabelBMFont **, __int64))*this + 136))(this, 1);
v10 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v9);
WinSize = (MenuGameLayer *)cocos2d::CCDirector::getWinSize(&v212, v10);
v12 = MenuGameLayer::create(WinSize);
*(this + 63) = (cocos2d::CCLabelBMFont *)v12;
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, __int64))*this + 57))(this, v12);
v14 = (cocos2d::CCDirector **)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_logo_001.png",
v13);
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, cocos2d::CCDirector **, __int64))*this + 58))(this, v14, 2);
v15 = *(float *)&v212 * 0.5;
v16 = *((__int64 (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v14 + 23);
v17 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v14);
cocos2d::CCDirector::getScreenTop(v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v216, v15, v18 - 50.0);
v19 = (cocos2d::CCMenu *)v16(v14, &v216);
v20 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v19);
v22 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_playBtn_001.png", v21);
v23 = CCMenuItemSpriteExtra::create(v22, 0, (__int64)this, (__int64)MenuLayer::onPlay, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v20 + 456LL))(v20, v23);
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, cocos2d::CCNode *))*this + 57))(this, v20);
v24 = *(void (__fastcall **)(cocos2d::CCNode *, __int64 *))(*(_QWORD *)v20 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v216,
*(float *)&v212 * 0.5,
(float)(*((float *)&v212 + 1) * 0.5) + 10.0);
v24(v20, &v216);
v26 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_garageBtn_001.png", v25);
v195 = CCMenuItemSpriteExtra::create(v26, 0, (__int64)this, (__int64)MenuLayer::onGarage, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v20 + 456LL))(v20, v195);
v27 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v195 + 184LL);
v28 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v23 + 192LL))(v23);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, -110.0, 0.0);
cocos2d::CCPoint::operator+(&v216, v28);
v29 = (GameManager *)v27(v195, &v216);
if ( !*(_BYTE *)(GameManager::sharedState(v29) + 927) )
{
v129 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_chrSel_001.png", v30);
*(this + 60) = (cocos2d::CCLabelBMFont *)v129;
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, __int64))*this + 57))(this, v129);
v130 = (__int64)*(this + 60);
v131 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v130 + 184LL);
v132 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v195 + 192LL))(v195);
cocos2d::CCNode::convertToWorldSpace(&v214, v20, v132);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, -50.0, -50.0);
cocos2d::CCPoint::operator+(&v216, &v214);
v131(v130, &v216);
}
v31 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_creatorBtn_001.png", v30);
v194 = CCMenuItemSpriteExtra::create(v31, 0, (__int64)this, (__int64)MenuLayer::onCreator, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v20 + 456LL))(v20, v194);
v32 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v194 + 184LL);
v33 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v23 + 192LL))(v23);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, 110.0, 0.0);
cocos2d::CCPoint::operator+(&v216, v33);
v34 = (GameManager *)v32(v194, &v216);
v35 = (cocos2d::CCDirector *)*(unsigned __int8 *)(GameManager::sharedState(v34) + 928);
if ( !(_DWORD)v35 )
{
v186 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_lvlEdit_001.png", v36);
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, __int64))*this + 57))(this, v186);
v187 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v186 + 184LL);
v188 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v194 + 192LL))(v194);
cocos2d::CCNode::convertToWorldSpace(&v214, v20, v188);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, 50.0, -50.0);
cocos2d::CCPoint::operator+(&v216, &v214);
v35 = (cocos2d::CCDirector *)v187(v186, &v216);
}
v37 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v35);
ScreenBottom = (cocos2d::CCMenu *)cocos2d::CCDirector::getScreenBottom(v37);
v40 = v39 + 45.0;
v41 = (cocos2d::CCMenu *)cocos2d::CCMenu::create(ScreenBottom);
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, cocos2d::CCMenu *))*this + 57))(this, v41);
v43 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_achBtn_001.png", v42);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v43 + 160LL))(v43, 1.0);
v44 = CCMenuItemSpriteExtra::create(v43, 0, (__int64)this, (__int64)MenuLayer::onAchievements, 0);
(*(void (__fastcall **)(cocos2d::CCMenu *, __int64))(*(_QWORD *)v41 + 456LL))(v41, v44);
v46 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_optionsBtn_001.png", v45);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v46 + 160LL))(v46, 1.0);
v193 = CCMenuItemSpriteExtra::create(v46, 0, (__int64)this, (__int64)MenuLayer::onOptions, 0);
(*(void (__fastcall **)(cocos2d::CCMenu *, __int64))(*(_QWORD *)v41 + 456LL))(v41, v193);
v48 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_statsBtn_001.png", v47);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v48 + 160LL))(v48, 1.0);
v49 = CCMenuItemSpriteExtra::create(v48, 0, (__int64)this, (__int64)MenuLayer::onStats, 0);
v50 = (GameManager *)(*(__int64 (__fastcall **)(cocos2d::CCMenu *, __int64))(*(_QWORD *)v41 + 456LL))(v41, v49);
v51 = (GameManager *)GameManager::sharedState(v50);
if ( !(unsigned __int8)GameManager::safeModeEnabled(v51) )
{
v184 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_ngBtn_001.png", v52);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v184 + 160LL))(v184, 1.0);
v185 = CCMenuItemSpriteExtra::create(v184, 0, (__int64)this, (__int64)MenuLayer::onNewgrounds, 0);
(*(void (__fastcall **)(cocos2d::CCMenu *, __int64))(*(_QWORD *)v41 + 456LL))(v41, v185);
}
v53 = *(void (__fastcall **)(cocos2d::CCMenu *, __int64 *))(*(_QWORD *)v41 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v216, *(float *)&v212 * 0.5, v40);
v53(v41, &v216);
v54 = (cocos2d::CCDirector *)cocos2d::CCMenu::alignItemsHorizontallyWithPadding(v41, 5.0);
v55 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v54);
cocos2d::CCDirector::getScreenBottom(v55);
v57 = v56 + 30.0;
v59 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"robtoplogo_small.png", v58);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v59 + 160LL))(v59, 0.8);
v60 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v59, 0, (__int64)this, (__int64)MenuLayer::onRobTop, 0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v60, 1.1);
v61 = (cocos2d::CCDirector **)cocos2d::CCMenu::create(v60, nullptr);
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, cocos2d::CCDirector **, __int64))*this + 58))(this, v61, 2);
v62 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v61 + 23);
v63 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v61);
cocos2d::CCDirector::getScreenLeft(v63);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v216, v64 + 50.0, v57 - 5.0);
v62(v61, &v216);
v66 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"gj_fbIcon_001.png", v65);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v66 + 160LL))(v66, 0.8);
v67 = (cocos2d::CCDirector **)CCMenuItemSpriteExtra::create(
v66,
0,
(__int64)this,
(__int64)MenuLayer::onFacebook,
0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v67, 1.5);
(*((void (__fastcall **)(cocos2d::CCDirector **, cocos2d::CCDirector **))*v61 + 57))(v61, v67);
v69 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"gj_twIcon_001.png", v68);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v69 + 160LL))(v69, 0.8);
v70 = CCMenuItemSpriteExtra::create(v69, 0, (__int64)this, (__int64)MenuLayer::onTwitter, 0);
CCMenuItemSpriteExtra::setSizeMult(v70, 1.5);
v207 = v70;
(*((void (__fastcall **)(cocos2d::CCDirector **, __int64))*v61 + 57))(v61, v70);
v72 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"gj_ytIcon_001.png", v71);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v72 + 160LL))(v72, 0.8);
v73 = CCMenuItemSpriteExtra::create(v72, 0, (__int64)this, (__int64)MenuLayer::onYouTube, 0);
CCMenuItemSpriteExtra::setSizeMult(v73, 1.5);
(*((void (__fastcall **)(cocos2d::CCDirector **, __int64))*v61 + 57))(v61, v73);
v200 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"gj_twitchIcon_001.png",
v74);
(*(void (__fastcall **)(float))(*(_QWORD *)v200 + 160LL))(0.8);
v201 = (cocos2d::CCNode *)CCMenuItemSpriteExtra::create(
(__int64)v200,
0,
(__int64)this,
(__int64)MenuLayer::onTwitch,
0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v201, 1.5);
(*((void (__fastcall **)(cocos2d::CCDirector **, cocos2d::CCNode *))*v61 + 57))(v61, v201);
v198 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"gj_discordIcon_001.png", v75);
(*(void (__fastcall **)(float))(*(_QWORD *)v198 + 160LL))(0.8);
v199 = CCMenuItemSpriteExtra::create(v198, 0, (__int64)this, (__int64)MenuLayer::onDiscord, 0);
CCMenuItemSpriteExtra::setSizeMult(v199, 1.5);
(*((void (__fastcall **)(cocos2d::CCDirector **, __int64))*v61 + 57))(v61, v199);
v196 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v67 + 23);
v76 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v67);
cocos2d::CCDirector::getScreenLeft(v76);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, v77 + 22.0, v57 + 25.0);
cocos2d::CCNode::convertToNodeSpace(&v216, (cocos2d::CCNode *)v61, (const cocos2d::CCPoint *)&v215);
v196(v67, &v216);
v78 = *((__int64 (__fastcall **)(cocos2d::CCDirector **))*v67 + 24);
v79 = v67;
v80 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v207 + 184LL);
v197 = v78(v79);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, 29.0, 0.0);
cocos2d::CCPoint::operator+(&v216, v197);
v80(v207, &v216);
v81 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v73 + 184LL);
v208 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v207 + 192LL))(v207);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, 29.0, 0.0);
cocos2d::CCPoint::operator+(&v216, v208);
v81(v73, &v216);
v82 = *(void (__fastcall **)(cocos2d::CCNode *, __int64 *))(*(_QWORD *)v201 + 184LL);
v209 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v73 + 192LL))(v73);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, 29.0, 0.0);
cocos2d::CCPoint::operator+(&v216, v209);
v82(v201, &v216);
v83 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v199 + 184LL);
v210 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v73 + 192LL))(v73);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, 29.0, -29.0);
cocos2d::CCPoint::operator+(&v216, v210);
v84 = (GameManager *)v83(v199, &v216);
v85 = (GameManager *)GameManager::sharedState(v84);
if ( (unsigned __int8)GameManager::safeModeEnabled(v85) )
(*((void (__fastcall **)(cocos2d::CCDirector **, _QWORD))*v61 + 43))(v61, 0);
v87 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_newsBtn_001.png", v86);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v87 + 160LL))(v87, 0.85);
v88 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v87, 0, (__int64)this, (__int64)MenuLayer::onNews, 0);
*(this + 61) = (cocos2d::CCLabelBMFont *)v87;
v89 = v88;
v90 = (cocos2d::CCDirector **)cocos2d::CCMenu::create(v88, nullptr);
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, cocos2d::CCDirector **, __int64))*this + 58))(this, v90, 2);
v211 = *((__int64 (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v90 + 23);
v91 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v90);
cocos2d::CCDirector::getScreenRight(v91);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v216, v92 - 43.0, v40);
v93 = (GameManager *)v211(v90, &v216);
v94 = (GameManager *)GameManager::sharedState(v93);
v95 = (unsigned __int8)GameManager::offlineModeEnabled(v94);
if ( (_BYTE)v95 )
{
(*(void (__fastcall **)(cocos2d::CCMenu *, _QWORD))(*(_QWORD *)v89 + 344LL))(v89, 0);
v95 = (*(__int64 (__fastcall **)(cocos2d::CCMenu *, _QWORD))(*(_QWORD *)v89 + 1056LL))(v89, 0);
}
*(_BYTE *)(GameManager::sharedState((GameManager *)v95) + 600) = 0;
if ( (unsigned __int8)PlatformToolbox::isControllerConnected((PlatformToolbox *)"Path of Light Rank 1") )
{
v202 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"controllerBtn_Start_001.png",
v96);
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, cocos2d::CCNode *))*this + 57))(this, v202);
v146 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v23 + 192LL))(v23);
cocos2d::CCNode::convertToWorldSpace(&v216, v20, v146);
cocos2d::CCNode::convertToNodeSpace(&v214, (cocos2d::CCNode *)this, (const cocos2d::CCPoint *)&v216);
v147 = *(void (__fastcall **)(cocos2d::CCNode *, __int64 *))(*(_QWORD *)v202 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, 0.0, -66.0);
cocos2d::CCPoint::operator+(&v216, &v214);
v147(v202, &v216);
v149 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_Y_001.png", v148);
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, __int64))*this + 57))(this, v149);
v203 = (cocos2d::CCNode *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v194 + 512LL))(v194);
v150 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v194 + 192LL))(v194);
cocos2d::CCNode::convertToWorldSpace(&v215, v203, v150);
cocos2d::CCNode::convertToNodeSpace(&v216, (cocos2d::CCNode *)this, (const cocos2d::CCPoint *)&v215);
cocos2d::CCPoint::operator=(&v214, &v216);
v151 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v149 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, 0.0, -45.0);
cocos2d::CCPoint::operator+(&v216, &v214);
v151(v149, &v216);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v149 + 160LL))(v149, 0.8);
v153 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_X_001.png", v152);
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, __int64))*this + 57))(this, v153);
v154 = (cocos2d::CCNode *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v195 + 512LL))(v195);
v155 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v195 + 192LL))(v195);
cocos2d::CCNode::convertToWorldSpace(&v215, v154, v155);
cocos2d::CCNode::convertToNodeSpace(&v216, (cocos2d::CCNode *)this, (const cocos2d::CCPoint *)&v215);
cocos2d::CCPoint::operator=(&v214, &v216);
v156 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v153 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, 0.0, -45.0);
cocos2d::CCPoint::operator+(&v216, &v214);
v156(v153, &v216);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v153 + 160LL))(v153, 0.8);
v158 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_DPad_Down_001.png", v157);
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, __int64))*this + 57))(this, v158);
v159 = (cocos2d::CCNode *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v193 + 512LL))(v193);
v160 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v193 + 192LL))(v193);
cocos2d::CCNode::convertToWorldSpace(&v215, v159, v160);
cocos2d::CCNode::convertToNodeSpace(&v216, (cocos2d::CCNode *)this, (const cocos2d::CCPoint *)&v215);
cocos2d::CCPoint::operator=(&v214, &v216);
v161 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v158 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, 0.0, -34.0);
cocos2d::CCPoint::operator+(&v216, &v214);
v161(v158, &v216);
v162 = (GameManager *)(*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)v158 + 160LL))(v158, 0.5);
v163 = (GameManager *)GameManager::sharedState(v162);
GameVariable = (GJAccountManager *)(unsigned __int8)GameManager::getGameVariable(v163, "0028");
if ( !(_BYTE)GameVariable )
{
v165 = GJAccountManager::sharedState(GameVariable);
v166 = 0.0;
if ( *(_DWORD *)(v165 + 352) - *(_DWORD *)(v165 + 356) > 0 )
v166 = 15.0;
v167 = (cocos2d::CCDirector **)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"controllerBtn_LThumb_001.png",
"Path of Light Rank 1");
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, cocos2d::CCDirector **))*this + 57))(this, v167);
v168 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v167 + 23);
v169 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v167);
cocos2d::CCDirector::getScreenLeft(v169);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v216,
v170 + 25.0,
v166 + (float)((float)((float)(*((float *)&v212 + 1) * 0.5) + 15.0) + 10.0));
v168(v167, &v216);
v172 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_A_001.png", v171);
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, __int64))*this + 57))(this, v172);
v173 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v172 + 184LL);
v204 = (cocos2d::CCNode *)(*((__int64 (__fastcall **)(cocos2d::CCDirector **))*v167 + 24))(v167);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, 0.0, -30.0);
cocos2d::CCPoint::operator+(&v216, v204);
v173(v172, &v216);
v175 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Mouse", "goldFont.fnt", v174);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v175 + 160LL))(v175, 0.5);
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, __int64))*this + 57))(this, v175);
v205 = *(cocos2d::CCNode **)(*(_QWORD *)v175 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v216, 0.0, 0.6);
((void (__fastcall *)(__int64, __int64 *))v205)(v175, &v216);
v176 = v167;
v177 = *((__int64 (__fastcall **)(cocos2d::CCDirector **))*v167 + 24);
v178 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v175 + 184LL);
v206 = (cocos2d::CCNode *)v177(v176);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, 16.0, 1.0);
cocos2d::CCPoint::operator+(&v216, v206);
v178(v175, &v216);
v180 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Click", "goldFont.fnt", v179);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v180 + 160LL))(v180, 0.5);
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, __int64))*this + 57))(this, v180);
v181 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v180 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v216, 0.0, 0.6);
v181(v180, &v216);
v182 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v180 + 184LL);
v183 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v172 + 192LL))(v172);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, 16.0, 1.0);
cocos2d::CCPoint::operator+(&v216, v183);
v182(v180, &v216);
}
}
v97 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_profileButton_001.png", v96);
v98 = CCMenuItemSpriteExtra::create(v97, 0, (__int64)this, (__int64)MenuLayer::onMyProfile, 0);
*(this + 58) = (cocos2d::CCLabelBMFont *)v98;
(*(void (__fastcall **)(cocos2d::CCNode *, __int64, __int64))(*(_QWORD *)v20 + 464LL))(v20, v98, 2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v213, 45.0, 105.0);
v99 = (__int64)*(this + 58);
v100 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v99 + 184LL);
cocos2d::CCNode::convertToNodeSpace(&v216, v20, (const cocos2d::CCPoint *)v213);
v100(v99, &v216);
v102 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)&byte_11E1A70, "goldFont.fnt", v101);
*(this + 57) = (cocos2d::CCLabelBMFont *)v102;
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, __int64, __int64))*this + 58))(this, v102, 2);
v103 = (__int64)*(this + 57);
v104 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v103 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, 2.0, 36.0);
cocos2d::CCPoint::operator+(&v216, v213);
v104(v103, &v216);
v105 = (GameManager *)cocos2d::CCLabelBMFont::limitLabelWidth(*(this + 57), 70.0, 0.7, 0.0);
v106 = (GameManager *)GameManager::sharedState(v105);
v107 = (GameManager *)GameManager::modUIRank(v106);
if ( (_DWORD)v107 == 2 )
{
v189 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"modBadge_02_001.png", v108);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v189 + 160LL))(v189, 1.3);
v190 = CCMenuItemSpriteExtra::create(v189, 0, (__int64)this, (__int64)MenuLayer::onReportQueue, 0);
*(this + 59) = (cocos2d::CCLabelBMFont *)v190;
CCMenuItemSpriteExtra::setSizeMult(v190, 1.5);
(*(void (__fastcall **)(cocos2d::CCNode *, _QWORD, __int64))(*(_QWORD *)v20 + 464LL))(v20, *(this + 59), 2);
v191 = (__int64)*(this + 59);
v192 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v191 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v214, 0.0, 75.0);
cocos2d::CCPoint::operator+(&v215, v213);
cocos2d::CCNode::convertToNodeSpace(&v216, v20, (const cocos2d::CCPoint *)&v215);
v107 = (GameManager *)v192(v191, &v216);
}
v109 = (GameManager *)GameManager::sharedState(v107);
v110 = (GameManager *)(unsigned __int8)GameManager::getGameVariable(v109, "0048");
if ( !(_BYTE)v110 && *(_BYTE *)(GameManager::sharedState(v110) + 927) )
{
v143 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_viewProfileTxt_001.png", v142);
*(this + 56) = (cocos2d::CCLabelBMFont *)v143;
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, __int64, __int64))*this + 58))(this, v143, 2);
v144 = (__int64)*(this + 56);
v145 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v144 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, 76.0, -1.0);
cocos2d::CCPoint::operator+(&v216, v213);
v145(v144, &v216);
}
updated = (GameManager *)MenuLayer::updateUserProfileButton((MenuLayer *)this);
*(_QWORD *)(GameManager::sharedState(updated) + 576) = this;
v113 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_dailyRewardBtn_001.png", v112);
v114 = (cocos2d::CCDirector **)CCMenuItemSpriteExtra::create(v113, 0, (__int64)this, (__int64)MenuLayer::onDaily, 0);
(*(void (__fastcall **)(cocos2d::CCMenu *, cocos2d::CCDirector **))(*(_QWORD *)v41 + 456LL))(v41, v114);
v115 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v114 + 23);
v116 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v114);
cocos2d::CCDirector::getScreenRight(v116);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v215, v117 - 40.0, (float)(*((float *)&v212 + 1) * 0.5) + 20.0);
cocos2d::CCNode::convertToNodeSpace(&v216, v41, (const cocos2d::CCPoint *)&v215);
v115(v114, &v216);
v118 = (GameManager *)CCMenuItemSpriteExtra::setSizeMult((__int64)v114, 1.5);
v119 = (GameManager *)GameManager::sharedState(v118);
UGV = (unsigned __int8)GameManager::getUGV(v119, "30");
if ( !(_BYTE)UGV )
{
*((_BYTE *)this + 432) = (unsigned __int8)&dword_0 + 1;
v139 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)((char *)&dword_0 + 1), 0.01);
v140 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(this, MenuLayer::showTOS, 0);
v141 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v139, v140, 0);
UGV = cocos2d::CCNode::runAction((cocos2d::CCNode *)this, v141);
}
v121 = (cocos2d::CCDelayTime *)*(unsigned __int8 *)(GameLevelManager::sharedState((GameLevelManager *)UGV) + 1536);
if ( !(_DWORD)v121 )
{
v136 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(v121, 0.01);
v137 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(this, MenuLayer::firstNetworkTest, 0);
v138 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v136, v137, 0);
v121 = (cocos2d::CCDelayTime *)cocos2d::CCNode::runAction((cocos2d::CCNode *)this, v138);
}
v122 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v121);
v123 = (GameManager *)MusicDownloadManager::addMusicDownloadDelegate(v122, (MusicDownloadDelegate *)(this + 53));
v124 = (GameManager *)GameManager::sharedState(v123);
v125 = (unsigned __int8)GameManager::offlineModeEnabled(v124);
if ( !(_BYTE)v125 )
{
v133 = (MusicDownloadManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)v125);
MusicDownloadManager::tryUpdateNewsFeed(v133);
v134 = (GameLevelManager *)MenuLayer::updateNewsBadge((MenuLayer *)this);
v135 = (GameLevelManager *)GameLevelManager::sharedState(v134);
v125 = GameLevelManager::syncFollowListIfNeeded(v135);
}
v126 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)v125, 0.01);
v127 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(this, MenuLayer::checkParentalPending, 0);
v128 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v126, v127, 0);
cocos2d::CCNode::runAction((cocos2d::CCNode *)this, v128);
}
return v3;
}