//
// LevelBrowserLayer::init from 0x1403e2000 to 0x1403e4088 (8328 bytes)
//
// 2 xrefs:
// > LevelBrowserLayer::create @ 0x1403e1fc2
// > ??> @ 0x140924ec0
//
// This function is hookable on this platform (idp: pc, 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:31:42 +0000
//
// Hidden C++ exception states: #wind=9
bool __fastcall LevelBrowserLayer::init(__int64 a1, cocos2d::CCObject *a2)
{
cocos2d::CCObject *v2; // r13
int v4; // r14d
__int64 v5; // rax
cocos2d::CCTouchDispatcher *v6; // rax
bool result; // al
cocos2d::CCObject *v8; // rcx
__int64 v9; // rbx
unsigned __int64 v10; // rdx
__int64 v11; // rax
int v12; // ebx
cocos2d::CCObject *v13; // rax
cocos2d::CCObject *v14; // rbx
cocos2d::CCObject *v15; // rcx
__int64 v16; // rdx
__int64 v17; // rcx
__int64 v18; // rax
struct cocos2d::CCSprite *v19; // rdi
__int64 v20; // rbx
__int64 v21; // rax
__int64 v22; // rdi
__int64 v23; // rbx
__int64 v24; // rax
struct cocos2d::CCSprite *v25; // rdi
__int64 v26; // rbx
__int64 v27; // rax
__int64 v28; // rbx
__int64 v29; // rcx
cocos2d::CCDirector *v30; // rax
float v31; // xmm6_4
__int64 v32; // rcx
cocos2d::CCDirector *v33; // rax
float v34; // xmm0_4
__int64 v35; // rax
struct cocos2d::CCSprite *v36; // rdi
__int64 v37; // rbx
__int64 v38; // rax
__int64 v39; // rbx
__int64 v40; // rcx
cocos2d::CCDirector *v41; // rax
float v42; // xmm6_4
__int64 v43; // rcx
cocos2d::CCDirector *v44; // rax
float v45; // xmm0_4
__int64 v46; // rax
const char *v47; // rdx
size_t v48; // r8
const char *v49; // rcx
struct cocos2d::CCSprite *v50; // rax
int v51; // ebx
cocos2d::CCObject *v52; // rax
struct cocos2d::CCMenu *v53; // rdi
__int64 v54; // rbx
__int64 v55; // rcx
cocos2d::CCDirector *v56; // rax
float v57; // xmm6_4
__int64 v58; // rcx
cocos2d::CCDirector *v59; // rax
float v60; // xmm0_4
__int64 v61; // rax
__int64 v62; // rcx
char v63; // bl
__int64 v64; // rcx
__int64 v65; // r12
float v66; // xmm11_4
__int64 v67; // rdx
int v68; // edx
const char *v69; // rsi
const char *v70; // rcx
int v71; // eax
cocos2d::CCObject *v72; // rax
__int64 v73; // rdi
__int64 v74; // rcx
cocos2d::CCDirector *v75; // rax
float v76; // xmm0_4
__int64 v77; // rbx
__int64 v78; // rax
__int64 v79; // rax
char v80; // bl
cocos2d::CCSprite *v81; // rax
int v82; // edi
cocos2d::CCObject *v83; // rax
__int64 v84; // rdi
__int64 v85; // rcx
cocos2d::CCDirector *v86; // rax
float v87; // xmm0_4
__int64 v88; // rbx
__int64 v89; // rax
__int64 v90; // rax
struct cocos2d::CCSprite *v91; // rsi
struct cocos2d::CCLabelBMFont *v92; // rax
__int64 v93; // rdi
float v94; // xmm6_4
float *v95; // rax
__int64 v96; // rbx
__int64 v97; // rax
cocos2d::CCObject *v98; // rax
__int64 v99; // rdi
__int64 v100; // rcx
cocos2d::CCDirector *v101; // rax
float v102; // xmm0_4
__int64 v103; // rbx
__int64 v104; // rax
__int64 v105; // rax
cocos2d::CCLayerColor *v106; // rax
struct cocos2d::CCLabelBMFont *v107; // rax
__int64 v108; // rdi
__int64 v109; // rcx
cocos2d::CCDirector *v110; // rax
float v111; // xmm6_4
__int64 v112; // rcx
cocos2d::CCDirector *v113; // rax
float v114; // xmm0_4
__int64 v115; // rbx
__int64 v116; // rax
__int64 v117; // rdi
__int64 v118; // rbx
__int64 v119; // rax
const struct cocos2d::CCPoint *v120; // rax
char *v121; // rdi
__int64 v122; // rbx
__int64 v123; // rax
__int64 v124; // rdx
int v125; // r8d
const char *v126; // rcx
struct cocos2d::CCSprite *v127; // rdi
float v128; // xmm1_4
__int64 v129; // rbx
__int64 v130; // rax
__int64 v131; // rcx
int v132; // eax
__int64 v133; // rbx
const struct cocos2d::CCPoint *v134; // rax
char *v135; // rax
float v136; // xmm2_4
_QWORD *v137; // rbx
cocos2d::CCObject *v138; // rax
_BYTE *v139; // rdx
_QWORD *v140; // rbx
cocos2d::CCObject *v141; // rax
cocos2d::CCObject *v142; // rdi
_BYTE *v143; // rdx
__int64 v144; // rcx
unsigned int v145; // eax
__int64 v146; // r11
__int64 v147; // rax
__int64 v148; // rcx
unsigned int v149; // eax
__int64 v150; // rdi
struct cocos2d::CCSprite *v151; // rbx
cocos2d::CCObject *v152; // rax
float v153; // xmm7_4
__int64 v154; // rbx
__int64 v155; // rcx
cocos2d::CCDirector *v156; // rax
float v157; // xmm6_4
__int64 v158; // rcx
cocos2d::CCDirector *v159; // rax
float v160; // xmm0_4
__int64 v161; // rax
__int64 v162; // rdi
int v163; // eax
cocos2d::CCObject *v164; // rax
__int64 v165; // rbx
__int64 v166; // rcx
cocos2d::CCDirector *v167; // rax
float v168; // xmm6_4
__int64 v169; // rcx
cocos2d::CCDirector *v170; // rax
float v171; // xmm0_4
__int64 v172; // rax
__int64 v173; // r8
__int64 v174; // rcx
char v175; // di
__int64 v176; // rsi
struct cocos2d::CCSprite *v177; // rbx
__int64 (__fastcall *v178)(); // r9
float v179; // xmm7_4
__int64 v180; // rbx
__int64 v181; // rcx
cocos2d::CCDirector *v182; // rax
float v183; // xmm6_4
__int64 v184; // rcx
cocos2d::CCDirector *v185; // rax
float v186; // xmm0_4
__int64 v187; // rax
__int64 v188; // rbx
const char *v189; // rcx
struct cocos2d::CCSprite *v190; // rax
int v191; // ebx
cocos2d::CCObject *v192; // rdi
__int64 v193; // rax
__int64 v194; // rbx
__int64 v195; // rax
const char *v196; // rcx
int v197; // eax
__int64 (__fastcall *v198)(); // r9
cocos2d::CCObject *v199; // rdi
__int64 v200; // rbx
__int64 v201; // rcx
cocos2d::CCDirector *v202; // rax
float v203; // xmm0_4
__int64 v204; // rax
__int64 v205; // rax
__int64 v206; // rsi
struct cocos2d::CCSprite *v207; // rdi
__int64 v208; // rbx
__int64 v209; // rax
float v210; // xmm9_4
__int64 v211; // rbx
__int64 v212; // rcx
cocos2d::CCDirector *v213; // rax
float v214; // xmm6_4
__int64 v215; // rcx
cocos2d::CCDirector *v216; // rax
float v217; // xmm0_4
__int64 v218; // rax
__int64 v219; // rbx
__int64 v220; // rcx
__int64 v221; // rax
int v222; // eax
cocos2d::CCObject *v223; // rdi
__int64 v224; // rbx
__int64 v225; // rcx
cocos2d::CCDirector *v226; // rax
float v227; // xmm6_4
__int64 v228; // rcx
cocos2d::CCDirector *v229; // rax
float v230; // xmm0_4
__int64 v231; // rax
__int64 v232; // rax
int v233; // eax
cocos2d::CCObject *v234; // rdi
__int64 v235; // rbx
__int64 v236; // rcx
cocos2d::CCDirector *v237; // rax
float v238; // xmm6_4
__int64 v239; // rcx
cocos2d::CCDirector *v240; // rax
float v241; // xmm0_4
__int64 v242; // rax
__int64 v243; // rax
int v244; // eax
cocos2d::CCObject *v245; // rdi
__int64 v246; // rbx
__int64 v247; // rcx
cocos2d::CCDirector *v248; // rax
float v249; // xmm6_4
__int64 v250; // rcx
cocos2d::CCDirector *v251; // rax
float v252; // xmm0_4
__int64 v253; // rax
__int64 v254; // rax
__int64 v255; // rcx
__int64 v256; // rax
__int64 v257; // rbx
const char *v258; // rcx
struct cocos2d::CCSprite *v259; // rax
int v260; // ebx
cocos2d::CCObject *v261; // rdi
__int64 v262; // rax
__int64 v263; // rbx
__int64 v264; // rax
__int64 v265; // r14
__int64 v266; // rbx
float v267; // xmm6_4
__int64 v268; // rcx
cocos2d::CCDirector *v269; // rax
float v270; // xmm0_4
__int64 v271; // rax
__int64 v272; // rax
cocos2d::CCObject *v273; // rdi
__int64 v274; // rbx
__int64 v275; // rax
__int64 v276; // rax
cocos2d::CCObject *v277; // rdi
__int64 v278; // rbx
__int64 v279; // rax
__int64 v280; // rax
cocos2d::CCObject *v281; // rdi
__int64 v282; // rbx
__int64 v283; // rax
struct cocos2d::CCSprite *v284; // rsi
struct cocos2d::CCLabelBMFont *v285; // rax
__int64 v286; // rdi
float v287; // xmm6_4
float *v288; // rax
__int64 v289; // rbx
__int64 v290; // rax
cocos2d::CCObject *v291; // rax
__int64 v292; // rax
__int64 v293; // rbx
__int64 v294; // rax
cocos2d::CCSprite *v295; // rsi
cocos2d::CCSprite *v296; // rdi
__int64 v297; // rax
__int64 v298; // rbx
__int64 v299; // rax
cocos2d::CCObject *v300; // rax
__int64 v301; // rax
__int64 v302; // rbx
__int64 v303; // rax
int v304; // eax
cocos2d::CCObject *v305; // rdi
__int64 v306; // rbx
__int64 v307; // rax
__int64 v308; // rax
int v309; // eax
cocos2d::CCObject *v310; // rax
__int64 v311; // rax
__int64 v312; // rbx
__int64 v313; // rax
char v314; // [rsp+40h] [rbp-C0h]
char v315; // [rsp+40h] [rbp-C0h]
__int64 v316[2]; // [rsp+50h] [rbp-B0h] BYREF
cocos2d::CCObject *v317; // [rsp+60h] [rbp-A0h] BYREF
char v318; // [rsp+68h] [rbp-98h]
float v319; // [rsp+70h] [rbp-90h] BYREF
float v320; // [rsp+74h] [rbp-8Ch]
cocos2d::CCObject *v321; // [rsp+78h] [rbp-88h] BYREF
void *v322; // [rsp+80h] [rbp-80h] BYREF
void *v323; // [rsp+88h] [rbp-78h] BYREF
char v324[8]; // [rsp+90h] [rbp-70h] BYREF
__int128 v325; // [rsp+98h] [rbp-68h] BYREF
__int64 v326; // [rsp+A8h] [rbp-58h]
__int64 v327; // [rsp+B0h] [rbp-50h]
char v328[8]; // [rsp+B8h] [rbp-48h] BYREF
__int128 v329; // [rsp+C0h] [rbp-40h] BYREF
__int64 v330; // [rsp+D0h] [rbp-30h]
unsigned __int64 v331; // [rsp+D8h] [rbp-28h]
v2 = a2;
v4 = 0;
if ( a2 && *((_BYTE *)a2 + 462) )
{
*(_BYTE *)(a1 + 748) = 1;
v5 = cocos2d::CCDirector::sharedDirector(a1);
v6 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 144LL))(v5);
cocos2d::CCTouchDispatcher::registerForcePrio(v6, (struct cocos2d::CCObject *)a1, 2, 0);
}
else
{
*(_BYTE *)(a1 + 748) = 0;
}
LOWORD(v316[0]) = 0;
BYTE2(v316[0]) = 0;
BYTE3(v316[0]) = *(_BYTE *)(a1 + 748) != 0 ? 0x96 : 0;
result = cocos2d::CCLayerColor::initWithColor((cocos2d::CCLayerColor *)a1, (const struct cocos2d::_ccColor4B *)v316);
if ( result )
{
if ( *(cocos2d::CCObject **)(a1 + 664) != v2 )
{
if ( v2 )
cocos2d::CCObject::retain(v2);
v8 = *(cocos2d::CCObject **)(a1 + 664);
if ( v8 )
cocos2d::CCObject::release(v8);
*(_QWORD *)(a1 + 664) = v2;
}
v9 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v321 = (cocos2d::CCObject *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v321);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v9 = qword_14090BFD0;
}
if ( GameManager::getGameVariable(v9, "0218")
|| GameManager::getGameVariable(v9, "0219")
|| GameManager::getGameVariable(v9, "0077") )
{
v11 = *(_QWORD *)(a1 + 664);
if ( v11 )
{
v12 = *(_DWORD *)(v11 + 320);
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v321 = (cocos2d::CCObject *)operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v321);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
}
v10 = 0x140000000uLL;
switch ( v12 )
{
case 6:
case 9:
case 10:
case 16:
case 17:
case 21:
case 22:
case 23:
case 28:
case 29:
case 32:
case 33:
case 34:
case 98:
case 99:
case 100:
case 101:
break;
default:
v13 = (cocos2d::CCObject *)GJSearchObject::create_2(6);
v14 = v13;
v2 = *(cocos2d::CCObject **)(a1 + 664);
if ( v2 != v13 )
{
if ( v13 )
cocos2d::CCObject::retain(v13);
v15 = *(cocos2d::CCObject **)(a1 + 664);
if ( v15 )
cocos2d::CCObject::release(v15);
*(_QWORD *)(a1 + 664) = v14;
v2 = v14;
}
break;
}
}
}
if ( v2 )
{
if ( *(_BYTE *)(a1 + 748) )
{
LABEL_33:
LOBYTE(v10) = 1;
(*(void (__fastcall **)(__int64, unsigned __int64))(*(_QWORD *)a1 + 920LL))(a1, v10);
LABEL_34:
LOBYTE(v10) = 1;
(*(void (__fastcall **)(__int64, unsigned __int64))(*(_QWORD *)a1 + 992LL))(a1, v10);
LOBYTE(v16) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1008LL))(a1, v16);
v18 = cocos2d::CCDirector::sharedDirector(v17);
cocos2d::CCDirector::getWinSize(v18, &v319);
if ( !*(_BYTE *)(a1 + 748) )
{
v19 = cocos2d::CCSprite::create("GJ_gradientBG.png");
*(_QWORD *)(a1 + 800) = v19;
v20 = *(_QWORD *)v19;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v321, 0.0, 0.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v20 + 288))(v19, v21);
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(
a1,
*(_QWORD *)(a1 + 800),
4294967294LL);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 800) + 120LL))(*(_QWORD *)(a1 + 800));
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 800) + 136LL))(*(_QWORD *)(a1 + 800));
v22 = **(_QWORD **)(a1 + 800);
v23 = *(_QWORD *)(a1 + 800);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v321, -5.0, -5.0);
(*(void (__fastcall **)(__int64, __int64))(v22 + 184))(v23, v24);
LevelBrowserLayer::updateBackgroundColor(a1);
v25 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png");
v26 = *(_QWORD *)v25;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v321, 0.0, 0.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v26 + 288))(v25, v27);
v28 = *(_QWORD *)v25;
v30 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v29);
v31 = cocos2d::CCDirector::getScreenBottom(v30) - 1.0;
v33 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v32);
v34 = cocos2d::CCDirector::getScreenLeft(v33) - 1.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v321, v34, v31);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v28 + 184))(v25, v35);
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v25, 1);
v36 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png");
v37 = *(_QWORD *)v36;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v321, 1.0, 0.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v37 + 288))(v36, v38);
v39 = *(_QWORD *)v36;
v41 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v40);
v42 = cocos2d::CCDirector::getScreenBottom(v41) - 1.0;
v44 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v43);
v45 = cocos2d::CCDirector::getScreenRight(v44) + 1.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v321, v45, v42);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v39 + 184))(v36, v46);
cocos2d::CCSprite::setFlipX(v36, 1);
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v36, 1);
}
v47 = "GJ_arrow_01_001.png";
if ( *(_BYTE *)(a1 + 748) )
v47 = "GJ_closeBtn_001.png";
v329 = 0;
v330 = 0;
v331 = 0;
v48 = -1;
do
++v48;
while ( v47[v48] );
sub_14003D230(&v329, v47, v48);
v49 = (const char *)&v329;
if ( v331 > 0xF )
v49 = (const char *)v329;
v50 = cocos2d::CCSprite::createWithSpriteFrameName(v49);
v51 = (int)v50;
if ( *(_BYTE *)(a1 + 748) )
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v50 + 160LL))(v50);
v52 = CCMenuItemSpriteExtra::create(v51, 0, a1, (__int64)sub_1403EB6CC);
v321 = v52;
*((_DWORD *)v52 + 93) = 1070386381;
v53 = cocos2d::CCMenu::create(v52, 0);
(*(void (__fastcall **)(__int64, struct cocos2d::CCMenu *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v53, 1);
v54 = *(_QWORD *)v53;
v56 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v55);
v57 = cocos2d::CCDirector::getScreenTop(v56) - 23.0;
v59 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v58);
v60 = cocos2d::CCDirector::getScreenLeft(v59) + 24.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v317, v60, v57);
(*(void (__fastcall **)(struct cocos2d::CCMenu *, __int64))(v54 + 184))(v53, v61);
v63 = *(_BYTE *)(cocos2d::CCApplication::sharedApplication(v62) + 209);
v318 = v63;
v65 = cocos2d::CCMenu::create(v64);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v65, 10);
v66 = v320 * 0.5;
v67 = *(_QWORD *)(a1 + 664);
if ( v67 )
{
v68 = *(_DWORD *)(v67 + 320);
if ( v68 == 32 || (unsigned int)(v68 - 33) < 2 || (unsigned int)(v68 - 21) <= 2 )
v66 = v66 + -30.0;
}
v69 = "GJ_arrow_03_001.png";
v70 = "GJ_arrow_03_001.png";
if ( v63 )
v70 = "controllerBtn_DPad_Left_001.png";
v71 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName(v70);
v72 = CCMenuItemSpriteExtra::create(v71, 0, a1, (__int64)LevelBrowserLayer::onPrevPage);
*(_QWORD *)(a1 + 624) = v72;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v65 + 464LL))(v65, v72);
v73 = **(_QWORD **)(a1 + 624);
v75 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v74);
v76 = cocos2d::CCDirector::getScreenLeft(v75) + 24.0;
v77 = *(_QWORD *)(a1 + 624);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v317, v76, v66);
cocos2d::CCNode::convertToNodeSpace(v65, v316, v78);
(*(void (__fastcall **)(__int64, __int64))(v73 + 184))(v77, v79);
v80 = v318;
if ( v318 )
v69 = "controllerBtn_DPad_Right_001.png";
v81 = cocos2d::CCSprite::createWithSpriteFrameName(v69);
v82 = (int)v81;
if ( !v80 )
cocos2d::CCSprite::setFlipX(v81, 1);
v83 = CCMenuItemSpriteExtra::create(v82, 0, a1, (__int64)LevelBrowserLayer::onNextPage);
*(_QWORD *)(a1 + 616) = v83;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v65 + 464LL))(v65, v83);
v84 = **(_QWORD **)(a1 + 616);
v86 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v85);
v87 = cocos2d::CCDirector::getScreenRight(v86) - 24.0;
v88 = *(_QWORD *)(a1 + 616);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v317, v87, v66);
cocos2d::CCNode::convertToNodeSpace(v65, v316, v89);
(*(void (__fastcall **)(__int64, __int64))(v84 + 184))(v88, v90);
v91 = cocos2d::CCSprite::create("GJ_button_02.png");
v92 = cocos2d::CCLabelBMFont::create((const char *)&word_14070D060, (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 680) = v92;
(*(void (__fastcall **)(struct cocos2d::CCSprite *, struct cocos2d::CCLabelBMFont *, __int64))(*(_QWORD *)v91 + 456LL))(
v91,
v92,
1);
v93 = **(_QWORD **)(a1 + 680);
v94 = (float)(*(float *)((*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v91 + 320LL))(v91)
+ 4)
* 0.5)
+ 1.0;
v95 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v91 + 320LL))(v91);
v96 = *(_QWORD *)(a1 + 680);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v317, *v95 * 0.5, v94);
(*(void (__fastcall **)(__int64, __int64))(v93 + 184))(v96, v97);
LevelBrowserLayer::updatePageLabel(a1);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v91 + 160LL))(v91);
v98 = CCMenuItemSpriteExtra::create((int)v91, 0, a1, (__int64)LevelBrowserLayer::onGoToPage);
*(_QWORD *)(a1 + 688) = v98;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v65 + 464LL))(v65, v98);
v99 = **(_QWORD **)(a1 + 688);
v101 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v100);
v102 = (float)(cocos2d::CCDirector::getScreenRight(v101) - 24.0) + 1.0;
v103 = *(_QWORD *)(a1 + 688);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v317, v102, v66 + 122.0);
cocos2d::CCNode::convertToNodeSpace(v65, v316, v104);
(*(void (__fastcall **)(__int64, __int64))(v99 + 184))(v103, v105);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 624) + 336LL))(*(_QWORD *)(a1 + 624), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 616) + 336LL))(*(_QWORD *)(a1 + 616), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 688) + 336LL))(*(_QWORD *)(a1 + 688), 0);
v106 = LoadingCircle::create();
*(_QWORD *)(a1 + 736) = v106;
*((_QWORD *)v106 + 69) = a1;
*(_BYTE *)(*(_QWORD *)(a1 + 736) + 560LL) = 0;
cocos2d::CCObject::retain(*(cocos2d::CCObject **)(a1 + 736));
LoadingCircle::show(*(_QWORD *)(a1 + 736));
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 736) + 336LL))(*(_QWORD *)(a1 + 736), 0);
v107 = cocos2d::CCLabelBMFont::create(" ", "goldFont.fnt");
*(_QWORD *)(a1 + 672) = v107;
(*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *))(*(_QWORD *)a1 + 464LL))(a1, v107);
v108 = **(_QWORD **)(a1 + 672);
v110 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v109);
v111 = cocos2d::CCDirector::getScreenTop(v110) - 3.0;
v113 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v112);
v114 = (float)(cocos2d::CCDirector::getScreenRight(v113) - 7.0) - 0.0;
v115 = *(_QWORD *)(a1 + 672);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v317, v114, v111);
(*(void (__fastcall **)(__int64, __int64))(v108 + 184))(v115, v116);
v117 = **(_QWORD **)(a1 + 672);
v118 = *(_QWORD *)(a1 + 672);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v317, 1.0, 1.0);
(*(void (__fastcall **)(__int64, __int64))(v117 + 288))(v118, v119);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 672) + 160LL))(*(_QWORD *)(a1 + 672));
v317 = (cocos2d::CCObject *)&v325;
v325 = 0;
v326 = 0;
v327 = 0;
*(_QWORD *)&v325 = sub_14003D460(0x20u);
v326 = 31;
v327 = 31;
strcpy((char *)v325, "No Internet connection!");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v316, 0.5, 1.0);
v121 = TextArea::create((__int64)&v325, &qword_140704F78, 1.0, 600.0, v120, 1101004800, 0, 0);
*(_QWORD *)(a1 + 600) = v121;
v122 = *(_QWORD *)v121;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v317, v319 * 0.5, (float)(v320 * 0.5) + 10.0);
(*(void (__fastcall **)(char *, __int64))(v122 + 184))(v121, v123);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 600) + 160LL))(*(_QWORD *)(a1 + 600));
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 600), 2);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 600) + 336LL))(*(_QWORD *)(a1 + 600), 0);
v124 = *(_QWORD *)(a1 + 664);
if ( v124 )
{
v125 = *(_DWORD *)(v124 + 320);
if ( v125 == 32
|| (unsigned int)(*(_DWORD *)(v124 + 320) - 33) < 2
|| (unsigned int)(v125 - 21) <= 1
|| v125 == 23 )
{
v127 = cocos2d::CCSprite::createWithSpriteFrameName("theSafeLabel_001.png");
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v127, 2);
v128 = (float)(v319 * 0.5) + 13.0;
}
else
{
if ( v125 == 6 && *(_DWORD *)(v124 + 464) == 1 )
{
v126 = "topListsLabel_001.png";
}
else if ( v125 == 6 || v125 == 17 )
{
v126 = "featuredLabel_001.png";
}
else if ( *(_DWORD *)(v124 + 320) == 28 )
{
v126 = "weeklyLevelsLabel_001.png";
}
else
{
if ( *(_DWORD *)(v124 + 320) != 29 )
goto LABEL_73;
v126 = "bonusLevelsLabel_001.png";
}
v127 = cocos2d::CCSprite::createWithSpriteFrameName(v126);
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v127, 2);
v128 = v319 * 0.5;
}
v129 = *(_QWORD *)v127;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v317, v128, (float)((float)(v320 * 0.5) + 110.0) + 24.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v129 + 184))(v127, v130);
}
LABEL_73:
v314 = 0;
v131 = *(_QWORD *)(a1 + 664);
if ( v131 )
{
v132 = *(_DWORD *)(v131 + 320);
if ( (v132 == 98 || (unsigned int)(v132 - 99) <= 1) && !*(_BYTE *)(v131 + 462) )
{
v133 = cocos2d::CCMenu::create(v131);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v133, 2);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v317,
(float)(v319 * 0.5) - 150.0,
(float)(v320 * 0.5) - 121.5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v316, (const struct cocos2d::CCPoint *)&v317);
v135 = GJSelectionStrip::create(
v133,
a1,
v134,
0.71499997,
a1,
(__int64)LevelBrowserLayer::onToggleAllObjects);
*(_QWORD *)(a1 + 712) = v135;
GJSelectionStrip::addCountLabel((__int64)v135, 27.0, 0xAu);
v136 = 53.0;
if ( *(_DWORD *)(*(_QWORD *)(a1 + 664) + 320LL) == 98 )
{
v137 = *(_QWORD **)(a1 + 712);
v138 = GJSelectionStrip::addButton(
(__int64)v137,
"threadBtn_export_001.png",
53.0,
(__int64)LevelBrowserLayer::onExportSelected,
1068708659);
v316[0] = (__int64)v138;
v139 = (_BYTE *)v137[49];
if ( v139 == (_BYTE *)v137[50] )
{
sub_1400699B0(v137 + 48, v139, v316);
}
else
{
*(_QWORD *)v139 = v138;
v137[49] += 8LL;
}
v136 = 79.0;
}
v140 = *(_QWORD **)(a1 + 712);
v141 = GJSelectionStrip::addButton(
(__int64)v140,
"threadBtn_delete_001.png",
v136,
(__int64)LevelBrowserLayer::onProcessSelected,
1067030938);
v142 = v141;
v316[0] = (__int64)v141;
v143 = (_BYTE *)v140[49];
if ( v143 == (_BYTE *)v140[50] )
{
sub_1400699B0(v140 + 48, v143, v316);
}
else
{
*(_QWORD *)v143 = v141;
v140[49] += 8LL;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v142 + 64LL))(v142, 5);
if ( *(_QWORD *)(a1 + 712) )
{
v145 = LevelBrowserLayer::selectedCount(a1);
GJSelectionStrip::setCount(v146, v145);
}
v147 = cocos2d::CCNotificationCenter::sharedNotificationCenter(v144);
cocos2d::CCNotificationCenter::addObserver(
v147,
a1,
LevelBrowserLayer::onSelectionChanged,
"LevelSelectionChangedNotification",
0);
}
}
v148 = *(_QWORD *)(a1 + 664);
if ( !v148 )
{
LABEL_99:
v162 = cocos2d::CCMenu::create(v148);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v162, 2);
v163 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png");
v164 = CCMenuItemSpriteExtra::create(v163, 0, a1, (__int64)LevelBrowserLayer::onInfo);
*((_DWORD *)v164 + 93) = 0x40000000;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v162 + 464LL))(v162, v164);
v165 = *(_QWORD *)v162;
v167 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v166);
v168 = cocos2d::CCDirector::getScreenBottom(v167) + 30.0;
v170 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v169);
v171 = cocos2d::CCDirector::getScreenLeft(v170) + 30.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v322, v171, v168);
(*(void (__fastcall **)(__int64, __int64))(v165 + 184))(v162, v172);
v173 = *(_QWORD *)(a1 + 664);
if ( !v173 )
goto LABEL_150;
v174 = *(unsigned int *)(v173 + 320);
if ( *(_DWORD *)(v173 + 320) == 32 || (unsigned int)(*(_DWORD *)(v173 + 320) - 33) < 2 )
{
v174 = (unsigned int)(v174 - 32);
if ( (_DWORD)v174 && (v174 = (unsigned int)(v174 - 1), (unsigned int)v174 >= 2) )
v4 = 2;
else
LOBYTE(v4) = *(_BYTE *)(v173 + 436) != 0;
}
else
{
if ( (unsigned int)(v174 - 21) > 2 )
goto LABEL_150;
v4 = 2;
}
dword_1408FE4A4 = v4;
v265 = cocos2d::CCMenu::create(v174);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v265, 2);
v266 = *(_QWORD *)v265;
v267 = v320 * 0.5;
v269 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v268);
v270 = (float)(cocos2d::CCDirector::getScreenLeft(v269) + 30.0) + 0.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v322, v270, v267);
(*(void (__fastcall **)(__int64, __int64))(v266 + 184))(v265, v271);
LOWORD(v316[0]) = -26986;
BYTE2(v316[0]) = -106;
v272 = sub_14006C4D0("threadBtn_vaultOn_001.png", dword_1408FE4A4 == 0, (__int64)v316);
*(_QWORD *)(a1 + 808) = v272;
v273 = CCMenuItemSpriteExtra::create(v272, 0, a1, (__int64)LevelBrowserLayer::onSafeMode);
*((_DWORD *)v273 + 93) = 1067030938;
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v273 + 64LL))(v273, 0);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v265 + 464LL))(v265, v273);
v274 = *(_QWORD *)v273;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v317, 0.0, 90.0);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v274 + 184))(v273, v275);
LOWORD(v316[0]) = -26986;
BYTE2(v316[0]) = -106;
v276 = sub_14006C4D0("threadBtn_uncompletedOn_001.png", dword_1408FE4A4 == 1, (__int64)v316);
*(_QWORD *)(a1 + 816) = v276;
v277 = CCMenuItemSpriteExtra::create(v276, 0, a1, (__int64)LevelBrowserLayer::onSafeMode);
*((_DWORD *)v277 + 93) = 1067030938;
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v277 + 64LL))(v277, 1);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v265 + 464LL))(v265, v277);
v278 = *(_QWORD *)v277;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v317, 0.0, 55.0);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v278 + 184))(v277, v279);
LOWORD(v316[0]) = -26986;
BYTE2(v316[0]) = -106;
v280 = sub_14006C4D0("threadBtn_timeOn_001.png", dword_1408FE4A4 == 2, (__int64)v316);
*(_QWORD *)(a1 + 824) = v280;
v281 = CCMenuItemSpriteExtra::create(v280, 0, a1, (__int64)LevelBrowserLayer::onSafeMode);
*((_DWORD *)v281 + 93) = 1067030938;
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v281 + 64LL))(v281, 2);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v265 + 464LL))(v265, v281);
v282 = *(_QWORD *)v281;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v317, 0.0, 20.0);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v282 + 184))(v281, v283);
LABEL_150:
if ( !v314 )
{
LABEL_154:
if ( v318 )
{
GameToolbox::addBackButton(a1, (__int64)v321);
GameToolbox::addRThumbScrollButton(a1);
}
LevelBrowserLayer::loadPage(a1, v2);
sub_14003D310((__int64)&v329);
return 1;
}
LABEL_151:
if ( GJSearchObject::isLevelSearchObject(*(_QWORD *)(a1 + 664)) )
{
v284 = cocos2d::CCSprite::createWithSpriteFrameName("gj_folderBtn_001.png");
v285 = cocos2d::CCLabelBMFont::create("0", (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 696) = v285;
(*(void (__fastcall **)(struct cocos2d::CCSprite *, struct cocos2d::CCLabelBMFont *, __int64))(*(_QWORD *)v284 + 456LL))(
v284,
v285,
1);
v286 = **(_QWORD **)(a1 + 696);
v287 = (float)(*(float *)((*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v284 + 320LL))(v284)
+ 4)
* 0.5)
+ 0.5;
v288 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v284 + 320LL))(v284);
v289 = *(_QWORD *)(a1 + 696);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v322, *v288 * 0.5, v287);
(*(void (__fastcall **)(__int64, __int64))(v286 + 184))(v289, v290);
v291 = CCMenuItemSpriteExtra::create((int)v284, 0, a1, (__int64)LevelBrowserLayer::onGoToFolder);
*(_QWORD *)(a1 + 704) = v291;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v65 + 464LL))(v65, v291);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v324, 0.0, -35.0);
v293 = v292;
v294 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 688) + 200LL))(*(_QWORD *)(a1 + 688));
cocos2d::CCPoint::operator+(v294, &v317, v293);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject **))(**(_QWORD **)(a1 + 704) + 184LL))(
*(_QWORD *)(a1 + 704),
&v317);
}
v295 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_02_001.png");
(*(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v295 + 160LL))(v295);
v296 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_02_001.png");
(*(void (__fastcall **)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))(*(_QWORD *)v295 + 456LL))(
v295,
v296,
1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v322, 15.0, 0.0);
v298 = v297;
cocos2d::CCNode::convertToNodeSpace(v295, v324, &unk_14090AEF0);
cocos2d::CCPoint::operator+(v299, &v317, v298);
(*(void (__fastcall **)(cocos2d::CCSprite *, cocos2d::CCObject **))(*(_QWORD *)v296 + 184LL))(v296, &v317);
cocos2d::CCSprite::setFlipX(v296, 1);
cocos2d::CCSprite::setFlipX(v295, 1);
v300 = CCMenuItemSpriteExtra::create((int)v295, 0, a1, (__int64)LevelBrowserLayer::onGoToLastPage);
*(_QWORD *)(a1 + 632) = v300;
*((_DWORD *)v300 + 93) = 1067030938;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v65 + 464LL))(v65, *(_QWORD *)(a1 + 632));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v323, -2.0, -65.0);
v302 = v301;
v303 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 688) + 200LL))(*(_QWORD *)(a1 + 688));
cocos2d::CCPoint::operator+(v303, &v317, v302);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject **))(**(_QWORD **)(a1 + 632) + 184LL))(
*(_QWORD *)(a1 + 632),
&v317);
v304 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_findBtn_001.png");
v305 = CCMenuItemSpriteExtra::create(v304, 0, a1, (__int64)LevelBrowserLayer::onSearch);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v65 + 464LL))(v65, v305);
v306 = *(_QWORD *)v305;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v316, 24.0, (float)(v66 + 122.0) - 30.0);
cocos2d::CCNode::convertToNodeSpace(v65, &v322, v307);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v306 + 184))(v305, v308);
v309 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_findBtnOff_001.png");
v310 = CCMenuItemSpriteExtra::create(v309, 0, a1, (__int64)LevelBrowserLayer::onClearSearch);
*(_QWORD *)(a1 + 640) = v310;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v65 + 464LL))(v65, v310);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v328, 0.0, -35.0);
v312 = v311;
v313 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v305 + 200LL))(v305);
cocos2d::CCPoint::operator+(v313, &v317, v312);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject **))(**(_QWORD **)(a1 + 640) + 184LL))(
*(_QWORD *)(a1 + 640),
&v317);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 640) + 336LL))(*(_QWORD *)(a1 + 640), 0);
goto LABEL_154;
}
v149 = *(_DWORD *)(v148 + 320);
if ( v149 == 98 || v149 == 102 || v149 == 101 )
{
v206 = cocos2d::CCMenu::create(v148);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v206, 2);
v207 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_newBtn_001.png");
v317 = CCMenuItemSpriteExtra::create((int)v207, 0, a1, (__int64)LevelBrowserLayer::onNew);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v206 + 464LL))(v206, v317);
v208 = *(_QWORD *)v206;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v323, v319 * 0.5, (float)((float)(v320 - 220.0) * 0.5) - 4.0);
(*(void (__fastcall **)(__int64, __int64))(v208 + 184))(v206, v209);
v210 = (float)(*((float *)v207 + 108) * 0.5) + 4.0;
v211 = *(_QWORD *)v206;
v213 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v212);
v214 = cocos2d::CCDirector::getScreenBottom(v213) + v210;
v216 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v215);
v217 = cocos2d::CCDirector::getScreenRight(v216) - v210;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v323, v217, v214);
(*(void (__fastcall **)(__int64, __int64))(v211 + 184))(v206, v218);
if ( !*(_BYTE *)(a1 + 748) )
{
v219 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v316[0] = (__int64)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v316[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v219 = qword_14090BFD0;
}
if ( !GameManager::getGameVariable(v219, "0218")
&& !GameManager::getGameVariable(v219, "0219")
&& !GameManager::getGameVariable(v219, "0077") )
{
v220 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v323 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v323);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v220 = qword_14090BFD0;
}
if ( *(_DWORD *)(v220 + 692) != *(_DWORD *)(v220 + 696)
|| (v221 = GJAccountManager::sharedState(), *(_DWORD *)(v221 + 360) != *(_DWORD *)(v221 + 364)) )
{
v222 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_myServerBtn_001.png");
v223 = CCMenuItemSpriteExtra::create(v222, 0, a1, (__int64)LevelBrowserLayer::onMyOnlineLevels);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v206 + 464LL))(v206, v223);
v224 = *(_QWORD *)v223;
v226 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v225);
v227 = cocos2d::CCDirector::getScreenBottom(v226) + v210;
v229 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v228);
v230 = cocos2d::CCDirector::getScreenLeft(v229) + v210;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v323, v230, v227);
cocos2d::CCNode::convertToNodeSpace(v206, v316, v231);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v224 + 184))(v223, v232);
}
}
if ( *(_DWORD *)(*(_QWORD *)(a1 + 664) + 320LL) == 98 )
{
v233 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_importBtn_001.png");
v234 = CCMenuItemSpriteExtra::create(v233, 0, a1, (__int64)LevelBrowserLayer::onImportLevels);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v206 + 464LL))(v206, v234);
v235 = *(_QWORD *)v234;
v237 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v236);
v238 = (float)(cocos2d::CCDirector::getScreenBottom(v237) + v210) + 46.0;
v240 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v239);
v241 = (float)((float)(cocos2d::CCDirector::getScreenLeft(v240) + v210) - 5.0) + 0.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v324, v241, v238);
cocos2d::CCNode::convertToNodeSpace(v206, &v322, v242);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v235 + 184))(v234, v243);
v244 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_manageBackupBtn_001.png");
v245 = CCMenuItemSpriteExtra::create(v244, 0, a1, (__int64)LevelBrowserLayer::onBackups);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v206 + 464LL))(v206, v245);
v246 = *(_QWORD *)v245;
v248 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v247);
v249 = (float)(cocos2d::CCDirector::getScreenBottom(v248) + v210) + 82.0;
v251 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v250);
v252 = (float)((float)(cocos2d::CCDirector::getScreenLeft(v251) + v210) - 5.0) + 0.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v322, v252, v249);
cocos2d::CCNode::convertToNodeSpace(v206, v324, v253);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v246 + 184))(v245, v254);
v256 = cocos2d::CCNotificationCenter::sharedNotificationCenter(v255);
cocos2d::CCNotificationCenter::addObserver(
v256,
a1,
LevelBrowserLayer::onLevelsImported,
"LevelsImportedNotification",
0);
}
v257 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v322 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v322);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v257 = qword_14090BFD0;
}
if ( !GameManager::getGameVariable(v257, "0218")
&& !GameManager::getGameVariable(v257, "0219")
&& !GameManager::getGameVariable(v257, "0077") )
{
v258 = "GJ_viewLevelsBtn_001.png";
if ( *(_DWORD *)(*(_QWORD *)(a1 + 664) + 320LL) == 98 )
v258 = "GJ_viewListsBtn_001.png";
v259 = cocos2d::CCSprite::createWithSpriteFrameName(v258);
v260 = (int)v259;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v259 + 160LL))(v259);
v261 = CCMenuItemSpriteExtra::create(v260, 0, a1, (__int64)LevelBrowserLayer::onLocalMode);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v206 + 464LL))(v206, v261);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v322, 2.0, 52.0);
v263 = v262;
v264 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v317 + 200LL))(v317);
cocos2d::CCPoint::operator+(v264, v316, v263);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v261 + 184LL))(v261, v316);
}
}
goto LABEL_151;
}
if ( v149 != 99 )
{
if ( v149 == 100 )
goto LABEL_106;
if ( v149 != 103 )
{
v148 = v149;
if ( v149 - 100 > 2 && v149 - 9 > 1 && v149 != 14 )
{
v150 = cocos2d::CCMenu::create(v149);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v150, 2);
v151 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png");
v152 = CCMenuItemSpriteExtra::create((int)v151, 0, a1, (__int64)LevelBrowserLayer::onRefresh);
*(_QWORD *)(a1 + 648) = v152;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v150 + 464LL))(v150, v152);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 648) + 336LL))(*(_QWORD *)(a1 + 648), 0);
v153 = (float)(*((float *)v151 + 108) * 0.5) + 4.0;
v154 = *(_QWORD *)v150;
v156 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v155);
v157 = cocos2d::CCDirector::getScreenBottom(v156) + v153;
v159 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v158);
v160 = cocos2d::CCDirector::getScreenRight(v159) - v153;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v317, v160, v157);
(*(void (__fastcall **)(__int64, __int64))(v154 + 184))(v150, v161);
}
goto LABEL_99;
}
}
if ( *((_DWORD *)v2 + 80) != 103 )
{
v175 = 0;
LABEL_107:
v315 = v175;
v176 = cocos2d::CCMenu::create(v148);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v176, 2);
v177 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_deleteBtn_001.png");
v178 = LevelBrowserLayer::onDeleteAll;
if ( v175 )
v178 = LevelBrowserLayer::onRemoveAllFavorites;
v317 = CCMenuItemSpriteExtra::create((int)v177, 0, a1, (__int64)v178);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v176 + 464LL))(v176, v317);
v179 = (float)(*((float *)v177 + 108) * 0.5) + 4.0;
v180 = *(_QWORD *)v176;
v182 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v181);
v183 = cocos2d::CCDirector::getScreenBottom(v182) + v179;
v185 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v184);
v186 = cocos2d::CCDirector::getScreenRight(v185) - v179;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v316, v186, v183);
(*(void (__fastcall **)(__int64, __int64))(v180 + 184))(v176, v187);
v188 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v323 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v323);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v188 = qword_14090BFD0;
}
if ( !GameManager::getGameVariable(v188, "0218")
&& !GameManager::getGameVariable(v188, "0219")
&& !GameManager::getGameVariable(v188, "0077") )
{
v189 = "GJ_viewLevelsBtn_001.png";
if ( *(_DWORD *)(*(_QWORD *)(a1 + 664) + 320LL) != 103 )
v189 = "GJ_viewListsBtn_001.png";
v190 = cocos2d::CCSprite::createWithSpriteFrameName(v189);
v191 = (int)v190;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v190 + 160LL))(v190);
v192 = CCMenuItemSpriteExtra::create(v191, 0, a1, (__int64)LevelBrowserLayer::onSavedMode);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v176 + 464LL))(v176, v192);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v323, 2.0, 52.0);
v194 = v193;
v195 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v317 + 200LL))(v317);
cocos2d::CCPoint::operator+(v195, v316, v194);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v192 + 184LL))(v192, v316);
v175 = v315;
}
if ( *(_DWORD *)(*(_QWORD *)(a1 + 664) + 320LL) != 103 )
{
v196 = "gj_heartOn_001.png";
if ( v175 )
v196 = "gj_heartOff_001.png";
v197 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName(v196);
v198 = LevelBrowserLayer::onFavorites;
if ( v175 )
v198 = LevelBrowserLayer::onSaved;
v199 = CCMenuItemSpriteExtra::create(v197, 0, a1, (__int64)v198);
*((_DWORD *)v199 + 93) = 1066192077;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *, __int64))(*(_QWORD *)v176 + 456LL))(v176, v199, 100);
v200 = *(_QWORD *)v199;
v202 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v201);
v203 = (float)(cocos2d::CCDirector::getScreenBottom(v202) + v179) + 50.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v323, v179 + 0.0, v203);
cocos2d::CCNode::convertToNodeSpace(v176, &v317, v204);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v200 + 184))(v199, v205);
}
v314 = 1;
goto LABEL_99;
}
LABEL_106:
v175 = 1;
goto LABEL_107;
}
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v321 = (cocos2d::CCObject *)operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v321);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
}
*(_DWORD *)(*(_QWORD *)&qword_14090BFB0 + 1608LL) = *((_DWORD *)v2 + 80);
}
if ( !*(_BYTE *)(a1 + 748) )
goto LABEL_34;
goto LABEL_33;
}
return result;
}