//
// LevelInfoLayer::init from 0x14041be90 to 0x14041e7fe (10606 bytes)
//
// 2 xrefs:
// > LevelInfoLayer::scene @ 0x14041be3b
// > ??> @ 0x140926714
//
// 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:32:08 +0000
//
// Hidden C++ exception states: #wind=30
bool __fastcall LevelInfoLayer::init(__int64 a1, _DWORD *a2, char a3)
{
int v6; // r12d
bool result; // al
__int64 v8; // rcx
cocos2d::CCObject *v9; // rax
int v10; // edi
__int64 v11; // rax
cocos2d::CCLayerColor *v12; // rax
__int64 v13; // rdx
__int64 v14; // rdx
__int64 v15; // rcx
__int64 v16; // rax
__int64 v17; // rcx
__int64 v18; // rax
__int64 v19; // rcx
__int64 v20; // r15
__int64 v21; // rsi
int v22; // r13d
char v23; // si
struct cocos2d::CCSprite *v24; // rdi
__int64 v25; // rbx
__int64 v26; // rax
__int64 v27; // rbx
__int64 v28; // rax
struct cocos2d::CCSprite *v29; // rdi
bool v30; // bl
const char *v31; // rsi
struct cocos2d::CCSprite *v32; // rdi
__int64 v33; // rbx
__int64 v34; // rax
__int64 v35; // rbx
__int64 v36; // rcx
cocos2d::CCDirector *v37; // rax
float v38; // xmm6_4
__int64 v39; // rcx
cocos2d::CCDirector *v40; // rax
float v41; // xmm0_4
__int64 v42; // rax
struct cocos2d::CCSprite *v43; // rdi
__int64 v44; // rbx
__int64 v45; // rax
__int64 v46; // rbx
__int64 v47; // rcx
cocos2d::CCDirector *v48; // rax
float v49; // xmm6_4
__int64 v50; // rcx
cocos2d::CCDirector *v51; // rax
float v52; // xmm0_4
__int64 v53; // rax
const char *v54; // rcx
struct cocos2d::CCLabelBMFont *v55; // rsi
__int64 v56; // rbx
__int64 v57; // rcx
cocos2d::CCDirector *v58; // rax
float v59; // xmm0_4
__int64 v60; // rax
int v61; // eax
int v62; // ebx
__int64 v63; // r13
unsigned __int64 v64; // rdi
void **v65; // rcx
struct cocos2d::CCLabelBMFont *v66; // rdi
__int64 v67; // rbx
__int64 v68; // rax
float v69; // xmm6_4
double v70; // xmm0_8
__int64 v71; // rax
__int64 v72; // rbx
__int64 v73; // rax
void *v74; // rcx
_DWORD *v75; // rcx
int v76; // ebx
__int64 v77; // rcx
cocos2d::CCString *v78; // rax
int v79; // r12d
void **v80; // rdx
cocos2d::CCString *v81; // rax
const char *CString; // rbx
struct cocos2d::CCLabelBMFont *v83; // rdi
__int64 v84; // rax
cocos2d::CCObject *v85; // rsi
__int64 v86; // rbx
__int64 v87; // rax
int v88; // ebx
float v89; // xmm7_4
float v90; // xmm6_4
double v91; // xmm0_8
int v92; // esi
struct cocos2d::CCSprite *v93; // rdi
__int64 v94; // rbx
__int64 v95; // rax
__int64 v96; // rax
struct cocos2d::CCSprite *v97; // rdi
__int64 v98; // rbx
__int64 v99; // rax
__int64 v100; // rax
struct cocos2d::CCSprite *v101; // rax
cocos2d::CCObject *v102; // rdi
__int64 v103; // rbx
__int64 v104; // rax
__int64 v105; // rcx
struct cocos2d::CCSprite *v106; // rbx
__int64 v107; // rdx
cocos2d::CCObject *v108; // rax
__int64 v109; // rax
__int64 v110; // rbx
__int64 v111; // rax
__int64 v112; // rdx
unsigned __int64 v113; // rbx
int v114; // r12d
void **v115; // rcx
size_t v116; // rdi
size_t v117; // r8
__int64 v118; // rax
int v119; // ecx
char v120; // di
__int64 v121; // rcx
struct cocos2d::CCSprite *v122; // rbx
float v123; // xmm6_4
double v124; // xmm0_8
__int64 v125; // rax
void *v126; // rcx
_DWORD *v127; // r12
__int64 v128; // rcx
int v129; // ebx
__int64 v130; // rdx
__int64 v131; // rcx
__int64 v132; // rax
int v133; // ebx
float v134; // xmm10_4
cocos2d::CCDirector *v135; // rax
float v136; // xmm6_4
__int64 v137; // rcx
cocos2d::CCDirector *v138; // rax
float v139; // xmm0_4
_DWORD *v140; // r8
int v141; // edx
int v142; // eax
int v143; // eax
cocos2d::CCObject *v144; // rbx
__int64 v145; // rcx
int v146; // eax
cocos2d::CCObject *v147; // rbx
int v148; // eax
cocos2d::CCObject *v149; // rbx
const struct cocos2d::CCPoint *v150; // rax
__int64 v151; // rcx
int v152; // eax
cocos2d::CCObject *v153; // rbx
__int64 v154; // rax
__int64 v155; // rax
int v156; // eax
cocos2d::CCObject *v157; // rax
__int64 v158; // rax
const struct cocos2d::CCPoint *v159; // rax
int v160; // eax
cocos2d::CCObject *v161; // rax
__int64 v162; // rax
__int64 v163; // rax
__int64 v164; // rax
int v165; // ecx
unsigned __int64 v166; // rdi
_BYTE *v167; // rbx
unsigned __int64 v168; // rcx
_WORD *v169; // rbx
void *v170; // rcx
void **v171; // rcx
int v172; // eax
cocos2d::CCObject *v173; // rax
__int64 v174; // rax
__int64 v175; // rax
void *v176; // rcx
_DWORD *v177; // r8
__int64 v178; // rax
__int64 v179; // rax
unsigned __int8 v180; // r13
int v181; // edx
int v182; // eax
bool v183; // bl
char v184; // si
float v185; // xmm3_4
float v186; // xmm11_4
cocos2d::CCDirector *v187; // rax
float ScreenLeft; // xmm0_4
struct cocos2d::CCSprite *v189; // rax
int v190; // ebx
cocos2d::CCObject *v191; // rdi
__int64 v192; // rbx
__int64 v193; // rax
struct cocos2d::CCSprite *v194; // rax
int v195; // ebx
cocos2d::CCObject *v196; // rdi
__int64 v197; // rbx
__int64 v198; // rax
struct cocos2d::CCSprite *v199; // rax
int v200; // ebx
cocos2d::CCObject *v201; // rdi
__int64 v202; // rbx
__int64 v203; // rax
struct cocos2d::CCSprite *v204; // rax
int v205; // ebx
cocos2d::CCObject *v206; // rdi
__int64 v207; // rbx
__int64 v208; // rax
const char *v209; // rcx
struct cocos2d::CCSprite *v210; // rax
int v211; // ebx
cocos2d::CCObject *v212; // rax
__int64 v213; // rdi
__int64 v214; // rbx
__int64 v215; // rax
__int64 v216; // rdx
__int64 *v217; // rcx
__int64 v218; // rbx
__int64 *v219; // rdi
unsigned __int8 v220; // al
int v221; // eax
cocos2d::CCObject *v222; // rax
struct cocos2d::CCMenu *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
__int64 v233; // rcx
__int64 v234; // rcx
__int64 v235; // rcx
__int64 v236; // rax
__int64 v237; // rcx
_DWORD *v238; // rsi
int v239; // eax
cocos2d::CCObject *v240; // rax
__int64 v241; // rbx
__int64 v242; // rcx
cocos2d::CCDirector *v243; // rax
float v244; // xmm6_4
__int64 v245; // rcx
cocos2d::CCDirector *v246; // rax
float v247; // xmm0_4
__int64 v248; // rax
__int64 v249; // rcx
__int64 v250; // rdi
__int64 v251; // rbx
__int64 v252; // rax
int v253; // eax
cocos2d::CCObject *v254; // rbx
__int64 v255; // rax
__int64 v256; // rax
__int64 v257; // rax
const char *v258; // rcx
int v259; // eax
cocos2d::CCObject *v260; // r13
__int64 v261; // rax
__int64 v262; // rbx
__int64 v263; // rax
__int64 v264; // rbx
__int64 v265; // rax
struct cocos2d::CCSprite *v266; // rbx
cocos2d::CCObject *v267; // r15
__int64 v268; // rbx
__int64 v269; // rax
__int64 v270; // rax
cocos2d::CCSprite *v271; // rbx
cocos2d::CCObject *v272; // rdi
__int64 v273; // rax
__int64 v274; // rbx
__int64 v275; // rax
__int64 v276; // rcx
unsigned int v277; // eax
__int64 SongObject; // rsi
char v279; // al
cocos2d::CCNode *v280; // rax
__int64 v281; // rdi
__int64 v282; // rcx
cocos2d::CCDirector *v283; // rax
float v284; // xmm0_4
__int64 v285; // rbx
__int64 v286; // rax
__int64 *v287; // rbx
__int64 *v288; // rax
__int64 v289; // rcx
__int64 v290; // rsi
__int64 v291; // rbx
__int64 v292; // rcx
cocos2d::CCDirector *v293; // rax
float v294; // xmm6_4
__int64 v295; // rcx
cocos2d::CCDirector *v296; // rax
float v297; // xmm0_4
__int64 v298; // rax
struct cocos2d::CCSprite *v299; // rax
cocos2d::CCObject *v300; // rdi
__int64 v301; // rbx
__int64 v302; // rax
__int64 v303; // rax
struct cocos2d::CCSprite *v304; // rsi
cocos2d::CCString *v305; // rax
const char *v306; // rax
struct cocos2d::CCLabelBMFont *v307; // rax
__int64 v308; // rdi
float v309; // xmm6_4
float *v310; // rax
__int64 v311; // rbx
__int64 v312; // rax
cocos2d::CCObject *v313; // rdi
_DWORD *v314; // rsi
__int64 v315; // rbx
__int64 v316; // rax
__int64 v317; // rax
struct cocos2d::CCSprite *v318; // rax
cocos2d::CCObject *v319; // rsi
__int64 v320; // rax
__int64 v321; // rbx
__int64 v322; // rax
__int64 v323; // rcx
cocos2d::CCObject *v324; // rbx
struct cocos2d::CCSprite *v325; // rdi
__int64 v326; // rbx
float v327; // xmm6_4
float *v328; // rax
__int64 v329; // rax
__int64 v330; // rcx
char v331; // dl
__int64 v332; // rcx
__int64 v333; // rcx
__int64 v334; // rax
_WORD v335[2]; // [rsp+68h] [rbp-A0h] BYREF
char v336; // [rsp+6Ch] [rbp-9Ch]
void *v337; // [rsp+70h] [rbp-98h] BYREF
void *v338; // [rsp+78h] [rbp-90h] BYREF
_DWORD *v339; // [rsp+80h] [rbp-88h] BYREF
float v340; // [rsp+88h] [rbp-80h] BYREF
float v341; // [rsp+8Ch] [rbp-7Ch]
_BYTE v342[4]; // [rsp+90h] [rbp-78h] BYREF
float v343; // [rsp+94h] [rbp-74h]
cocos2d::CCObject *v344; // [rsp+98h] [rbp-70h]
void **v345; // [rsp+A0h] [rbp-68h] BYREF
char v346[8]; // [rsp+A8h] [rbp-60h] BYREF
_BYTE v347[4]; // [rsp+B0h] [rbp-58h] BYREF
float v348; // [rsp+B4h] [rbp-54h]
cocos2d::CCObject *v349; // [rsp+B8h] [rbp-50h] BYREF
float v350[2]; // [rsp+C0h] [rbp-48h] BYREF
char v351[8]; // [rsp+C8h] [rbp-40h] BYREF
char v352[8]; // [rsp+D0h] [rbp-38h] BYREF
void *v353; // [rsp+D8h] [rbp-30h] BYREF
char v354[8]; // [rsp+E0h] [rbp-28h] BYREF
char v355[8]; // [rsp+E8h] [rbp-20h] BYREF
char v356[8]; // [rsp+F0h] [rbp-18h] BYREF
void *Block[2]; // [rsp+F8h] [rbp-10h] BYREF
__int64 v358; // [rsp+108h] [rbp+0h]
unsigned __int64 v359; // [rsp+110h] [rbp+8h]
void *Buf1[2]; // [rsp+118h] [rbp+10h] BYREF
size_t v361; // [rsp+128h] [rbp+20h]
unsigned __int64 v362; // [rsp+130h] [rbp+28h]
v339 = a2;
v6 = 0;
LODWORD(v344) = 0;
result = cocos2d::CCLayer::init((cocos2d::CCLayer *)a1);
if ( !result )
return result;
*(_QWORD *)(a1 + 504) = a2;
cocos2d::CCObject::retain((cocos2d::CCObject *)a2);
*(_BYTE *)(a1 + 704) = a3;
v9 = (cocos2d::CCObject *)cocos2d::CCArray::create(v8);
*(_QWORD *)(a1 + 512) = v9;
cocos2d::CCObject::retain(v9);
*(_BYTE *)(*(_QWORD *)(a1 + 504) + 1185LL) = 0;
*(_DWORD *)(a1 + 640) = a2[305];
v10 = *(_DWORD *)(*(_QWORD *)(a1 + 504) + 328LL) - *(_DWORD *)(*(_QWORD *)(a1 + 504) + 332LL);
v11 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v338 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v338);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v11 = qword_14090BFD0;
}
*(_DWORD *)(v11 + 996) = v10;
v12 = LoadingCircle::create();
*(_QWORD *)(a1 + 648) = v12;
*((_QWORD *)v12 + 69) = a1;
*(_BYTE *)(*(_QWORD *)(a1 + 648) + 560LL) = 0;
cocos2d::CCObject::retain(*(cocos2d::CCObject **)(a1 + 648));
LoadingCircle::show(*(_QWORD *)(a1 + 648));
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 648) + 336LL))(*(_QWORD *)(a1 + 648), 0);
LOBYTE(v13) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 992LL))(a1, v13);
LOBYTE(v14) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1008LL))(a1, v14);
v16 = cocos2d::CCDirector::sharedDirector(v15);
cocos2d::CCDirector::getWinSize(v16, &v340);
v18 = cocos2d::CCMenu::create(v17);
*(_QWORD *)(a1 + 496) = v18;
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v18, 3);
v20 = cocos2d::CCMenu::create(v19);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v20, 2);
v21 = *(_QWORD *)(a1 + 504);
LODWORD(v349) = *(_DWORD *)(v21 + 992) - *(_DWORD *)(v21 + 996);
v22 = a2[248] - a2[249];
LODWORD(v338) = v22;
if ( v22 > 200000 || (v336 = 1, v22 <= 100000) )
v336 = 0;
v23 = *(_BYTE *)(v21 + 721);
v24 = cocos2d::CCSprite::create("GJ_gradientBG.png");
v25 = *(_QWORD *)v24;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, 0.0, 0.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v25 + 288))(v24, v26);
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v24, 4294967294LL);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v24 + 120LL))(v24);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v24 + 136LL))(v24);
v27 = *(_QWORD *)v24;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, -5.0, -5.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v27 + 184))(v24, v28);
v335[0] = 26112;
LOBYTE(v335[1]) = -1;
v29 = (struct cocos2d::CCSprite *)((char *)v24 + 320);
(**(void (__fastcall ***)(struct cocos2d::CCSprite *, _WORD *))v29)(v29, v335);
v30 = v23 || v336 || *(_BYTE *)(a1 + 704);
if ( v22 <= 200000 )
{
if ( !v30 )
goto LABEL_17;
memset(v335, 51, 3);
}
else
{
v335[0] = 6243;
LOBYTE(v335[1]) = 126;
}
(**(void (__fastcall ***)(struct cocos2d::CCSprite *, _WORD *))v29)(v29, v335);
LABEL_17:
v31 = "GJ_sideArt_001.png";
if ( v30 )
v31 = "gauntletCorner_001.png";
v32 = cocos2d::CCSprite::createWithSpriteFrameName(v31);
v33 = *(_QWORD *)v32;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, 0.0, 0.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v33 + 288))(v32, v34);
v35 = *(_QWORD *)v32;
v37 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v36);
v38 = cocos2d::CCDirector::getScreenBottom(v37) - 1.0;
v40 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v39);
v41 = cocos2d::CCDirector::getScreenLeft(v40) - 1.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, v41, v38);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v35 + 184))(v32, v42);
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v32, 1);
v43 = cocos2d::CCSprite::createWithSpriteFrameName(v31);
v44 = *(_QWORD *)v43;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, 1.0, 0.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v44 + 288))(v43, v45);
v46 = *(_QWORD *)v43;
v48 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v47);
v49 = cocos2d::CCDirector::getScreenBottom(v48) - 1.0;
v51 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v50);
v52 = cocos2d::CCDirector::getScreenRight(v51) + 1.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, v52, v49);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v46 + 184))(v43, v53);
cocos2d::CCSprite::setFlipX(v43, 1);
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v43, 1);
if ( *(_BYTE *)(a1 + 704) )
{
v54 = "Challenge";
}
else
{
sub_14003F4F0((__int64)Buf1, *(_QWORD *)(a1 + 504) + 344LL);
v6 = 17;
LODWORD(v344) = 17;
v54 = (const char *)Buf1;
if ( v362 > 0xF )
v54 = (const char *)Buf1[0];
}
v55 = cocos2d::CCLabelBMFont::create(v54, (const char *)&qword_140704F78);
if ( (v6 & 1) != 0 )
{
v6 &= ~1u;
sub_14003D310((__int64)Buf1);
}
(*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v55, 20);
v56 = *(_QWORD *)v55;
v58 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v57);
v59 = cocos2d::CCDirector::getScreenTop(v58) - 17.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, v340 * 0.5, v59);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v56 + 184))(v55, v60);
v61 = 300;
v62 = (int)v349;
if ( (int)v349 > 0 )
v61 = 260;
cocos2d::CCLabelBMFont::limitLabelWidth(v55, (float)v61, 0.80000001, 0.0);
v63 = 0x7FFFFFFFFFFFFFFFLL;
if ( v62 > 0 )
{
Block[1] = nullptr;
v358 = 7;
v64 = 15;
v359 = 15;
Block[0] = (void *)0x29796C69614428LL;
if ( v336 )
{
v358 = 8;
strcpy((char *)Block, "(Weekly)");
}
else
{
if ( (int)v338 <= 200000 )
{
LABEL_33:
v65 = Block;
if ( v64 > 0xF )
v65 = (void **)Block[0];
v66 = cocos2d::CCLabelBMFont::create((const char *)v65, "goldFont.fnt");
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v66 + 160LL))(v66);
(*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v66, 20);
v67 = *(_QWORD *)v66;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, 0.0, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v67 + 288))(v66, v68);
v69 = *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v55 + 320LL))(v55) * 0.5;
v70 = (*(double (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v55 + 168LL))(v55);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, (float)(*(float *)&v70 * v69) + 3.0, -0.5);
v72 = v71;
v73 = (*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v55 + 200LL))(v55);
cocos2d::CCPoint::operator+(v73, &v338, v72);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, void **))(*(_QWORD *)v66 + 184LL))(v66, &v338);
if ( v359 > 0xF )
{
v74 = Block[0];
if ( v359 + 1 >= 0x1000 )
{
v74 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v74 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v74);
}
v358 = 0;
v359 = 15;
LOBYTE(Block[0]) = 0;
goto LABEL_41;
}
v358 = 7;
memmove(Block, "(Event)", 7u);
HIBYTE(Block[0]) = 0;
}
v64 = v359;
goto LABEL_33;
}
LABEL_41:
v75 = *(_DWORD **)(a1 + 504);
LODWORD(v344) = v75[165] - v75[166];
if ( !(_DWORD)v344 )
{
v76 = v75[162] - v75[163];
v77 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v349 = (cocos2d::CCObject *)operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v349);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v77 = *(_QWORD *)&qword_14090BFB0;
}
v78 = cocos2d::CCDictionary::valueForKey(*(cocos2d::CCDictionary **)(v77 + 1080), v76);
LODWORD(v344) = cocos2d::CCString::intValue(v78);
}
sub_14003F4F0((__int64)Block, *(_QWORD *)(a1 + 504) + 440LL);
v79 = v6 | 8;
v80 = Block;
if ( v359 > 0xF )
v80 = (void **)Block[0];
v81 = cocos2d::CCString::createWithFormat("By %s", (const char *)v80);
CString = cocos2d::CCString::getCString(v81);
sub_14003D310((__int64)Block);
v83 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt");
v84 = (*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v55 + 200LL))(v55);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v350, v340 * 0.5, *(float *)(v84 + 4) - 26.0);
cocos2d::CCLabelBMFont::limitLabelWidth(v83, 300.0, 0.80000001, 0.0);
v85 = CCMenuItemSpriteExtra::create((int)v83, 0, a1, (__int64)LevelInfoLayer::onViewProfile);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v20 + 464LL))(v20, v85);
v86 = *(_QWORD *)v85;
cocos2d::CCNode::convertToNodeSpace(v20, &v337, v350);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v86 + 184))(v85, v87);
v88 = (int)v344;
if ( !(_DWORD)v344 )
{
v335[0] = -166;
LOBYTE(v335[1]) = -1;
(**((void (__fastcall ***)(__int64, _WORD *))v83 + 46))((__int64)v83 + 368, v335);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v85 + 936LL))(v85, 0);
}
v89 = v350[1] - 1.0;
v90 = *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v83 + 320LL))(v83);
v91 = (*(double (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v83 + 168LL))(v83);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v346,
(float)((float)((float)(*(float *)&v91 * v90) * 0.5) + v350[0]) + 6.0,
v89);
if ( *(_BYTE *)(a1 + 704) )
{
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, _QWORD))(*(_QWORD *)v83 + 336LL))(v83, 0);
cocos2d::CCPoint::operator=(v346, v350);
}
v92 = *(_DWORD *)(*(_QWORD *)(a1 + 504) + 692LL) - *(_DWORD *)(*(_QWORD *)(a1 + 504) + 696LL);
if ( v339[265] != v339[266] )
{
v93 = cocos2d::CCSprite::createWithSpriteFrameName("collaborationIcon_001.png");
v94 = *(_QWORD *)v93;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, 0.0, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v94 + 288))(v93, v95);
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a1 + 464LL))(a1, v93);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, char *))(*(_QWORD *)v93 + 184LL))(v93, v346);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, 18.0, 0.0);
cocos2d::CCPoint::operator+(v346, &v338, v96);
cocos2d::CCPoint::operator=(v346, &v338);
if ( v92 <= 40000 )
goto LABEL_54;
goto LABEL_53;
}
if ( v92 > 40000 )
{
LABEL_53:
v97 = cocos2d::CCSprite::createWithSpriteFrameName("highObjectIcon_001.png");
v98 = *(_QWORD *)v97;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, 0.0, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v98 + 288))(v97, v99);
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v97, 10);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, char *))(*(_QWORD *)v97 + 184LL))(v97, v346);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, 18.0, 0.0);
cocos2d::CCPoint::operator+(v346, &v338, v100);
cocos2d::CCPoint::operator=(v346, &v338);
goto LABEL_54;
}
if ( v88 > 0 )
{
v121 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v337 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v337);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v121 = qword_14090BFD0;
}
if ( !GameManager::getGameVariable(v121, "0047") && !*(_BYTE *)(a1 + 704) )
{
v122 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_viewProfileTxt_001.png");
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v122, 2);
v123 = *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v83 + 320LL))(v83) * 0.5;
v124 = (*(double (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v83 + 168LL))(v83);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, (float)(*(float *)&v124 * v123) + 48.0, -1.0);
cocos2d::CCPoint::operator+(v350, &v338, v125);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, void **))(*(_QWORD *)v122 + 184LL))(v122, &v338);
}
}
LABEL_54:
v101 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_playBtn2_001.png");
*(_QWORD *)(a1 + 720) = v101;
v102 = CCMenuItemSpriteExtra::create((int)v101, 0, a1, (__int64)LevelInfoLayer::onPlay);
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 496) + 464LL))(*(_QWORD *)(a1 + 496), v102);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v354, v340 * 0.5, (float)(v341 * 0.5) + 51.0);
v103 = *(_QWORD *)v102;
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 496), &v337, v354);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v103 + 184))(v102, v104);
if ( !*(_BYTE *)(a1 + 704) )
{
v105 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v338 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v338);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v105 = qword_14090BFD0;
}
if ( *(_DWORD *)(v105 + 1064) - *(_DWORD *)(v105 + 1068) > 1 )
{
v106 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_editBtn_001.png");
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v106 + 160LL))(v106);
LOBYTE(v107) = -81;
(*(void (__fastcall **)(__int64, __int64))(*((_QWORD *)v106 + 40) + 40LL))((__int64)v106 + 320, v107);
v108 = CCMenuItemSpriteExtra::create((int)v106, 0, a1, (__int64)LevelInfoLayer::onEdit);
*(_QWORD *)(a1 + 552) = v108;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 496) + 464LL))(
*(_QWORD *)(a1 + 496),
v108);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, -58.0, -34.0);
v110 = v109;
v111 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v102 + 200LL))(v102);
cocos2d::CCPoint::operator+(v111, &v338, v110);
(*(void (__fastcall **)(_QWORD, void **))(**(_QWORD **)(a1 + 552) + 184LL))(*(_QWORD *)(a1 + 552), &v338);
}
}
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(*(_QWORD *)(a1 + 648) + 544LL) + 184LL))(
*(_QWORD *)(*(_QWORD *)(a1 + 648) + 544LL),
v354);
v112 = *(_QWORD *)(a1 + 504);
if ( *(_DWORD *)(v112 + 1220) == 4 )
{
v113 = v359;
}
else
{
*(_OWORD *)Block = 0;
v358 = 0;
v113 = 15;
v359 = 15;
LOBYTE(Block[0]) = 0;
v114 = v79 | 2;
LODWORD(v344) = v114;
sub_14003F4F0((__int64)Buf1, v112 + 408);
v79 = v114 | 0x24;
LODWORD(v344) = v79;
v115 = Buf1;
if ( v362 > 0xF )
v115 = (void **)Buf1[0];
v116 = v361;
v117 = v361;
if ( v361 )
v117 = 0;
if ( memcmp(v115, Block, v117) || v116 )
goto LABEL_70;
v118 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v337 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v337);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v118 = *(_QWORD *)&qword_14090BFB0;
}
v119 = *(_DWORD *)(v118 + 1608);
if ( v119 == 99 || v119 == 100 )
{
LABEL_70:
v120 = 0;
goto LABEL_80;
}
}
v120 = 1;
LABEL_80:
if ( (v79 & 4) != 0 )
{
LOBYTE(v79) = v79 & 0xFB;
sub_14003D310((__int64)Buf1);
}
if ( (v79 & 2) != 0 && v113 > 0xF )
{
v126 = Block[0];
if ( v113 + 1 >= 0x1000 )
{
v126 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v126 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v126);
}
if ( v120 )
{
LevelInfoLayer::downloadLevel(a1);
LABEL_90:
v127 = v339;
goto LABEL_91;
}
*(_OWORD *)Buf1 = 0;
v361 = 0;
v362 = 15;
LOBYTE(Buf1[0]) = 0;
sub_14003F4F0((__int64)Block, *(_QWORD *)(a1 + 504) + 408LL);
v129 = sub_14003D160(Block, Buf1);
sub_14003D310((__int64)Block);
sub_14003D310((__int64)Buf1);
if ( v129 )
goto LABEL_90;
*(_BYTE *)(a1 + 644) = 1;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 496) + 336LL))(*(_QWORD *)(a1 + 496), 0);
LOBYTE(v130) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 648) + 336LL))(*(_QWORD *)(a1 + 648), v130);
v131 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v337 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v337);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v131 = *(_QWORD *)&qword_14090BFB0;
}
*(_QWORD *)(v131 + 1416) = a1 + 416;
v132 = *(_QWORD *)(a1 + 504);
v133 = *(_DWORD *)(v132 + 860);
*(_DWORD *)(v132 + 860) = -1;
GameLevelManager::updateLevel((cocos2d::CCActionManager **)v131, *(_QWORD *)(a1 + 504));
v127 = v339;
v339[215] = v133;
LABEL_91:
LevelInfoLayer::setupLevelInfo(a1);
if ( !*(_BYTE *)(a1 + 704) )
{
if ( *(_DWORD *)(*(_QWORD *)(a1 + 504) + 972LL) == 5 )
LevelInfoLayer::setupPlatformerStats(a1);
else
LevelInfoLayer::setupProgressBars(a1);
}
v134 = v341 - 51.0;
v135 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v128);
v136 = cocos2d::CCDirector::getScreenTop(v135) - 30.0;
v138 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v137);
v139 = (float)(cocos2d::CCDirector::getScreenRight(v138) - 30.0) - 0.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v356, v139, v136);
cocos2d::CCNode::convertToNodeSpace(v20, v347, v356);
if ( *(_DWORD *)(*(_QWORD *)(a1 + 504) + 992LL) - *(_DWORD *)(*(_QWORD *)(a1 + 504) + 996LL) <= 0 )
goto LABEL_109;
v140 = *(_DWORD **)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v337 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v337);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v140 = *(_DWORD **)&qword_14090BFB0;
}
v141 = *(_DWORD *)(*(_QWORD *)(a1 + 504) + 992LL) - *(_DWORD *)(*(_QWORD *)(a1 + 504) + 996LL);
if ( v141 > 0 )
{
if ( v141 > 200000 )
{
LABEL_107:
v142 = v140[246];
goto LABEL_108;
}
if ( v141 <= 100000 )
{
v142 = v140[240];
}
else
{
if ( v141 <= 100000 )
{
if ( v141 > 100000 == 2 )
goto LABEL_107;
LABEL_109:
v143 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_deleteBtn_001.png");
v144 = CCMenuItemSpriteExtra::create(v143, 0, a1, (__int64)LevelInfoLayer::confirmDelete);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v20 + 464LL))(v20, v144);
(*(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v144 + 184LL))(v144, v347);
v348 = v348 + -50.0;
goto LABEL_110;
}
v142 = v140[243];
}
LABEL_108:
if ( v141 == v142 )
goto LABEL_110;
goto LABEL_109;
}
LABEL_110:
v145 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v337 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v337);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v145 = qword_14090BFD0;
}
if ( !GameManager::getGameVariable(v145, "0219") )
{
v146 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png");
v147 = CCMenuItemSpriteExtra::create(v146, 0, a1, (__int64)LevelInfoLayer::onUpdate);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v20 + 464LL))(v20, v147);
(*(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v147 + 184LL))(v147, v347);
v348 = v348 + -50.0;
}
v148 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoBtn_001.png");
v149 = CCMenuItemSpriteExtra::create(v148, 0, a1, (__int64)LevelInfoLayer::onInfo);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v20 + 464LL))(v20, v149);
(*(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v149 + 184LL))(v149, v347);
v150 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v149 + 200LL))(v149);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v352, v150);
v151 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v337 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v337);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v151 = qword_14090BFD0;
}
if ( !GameManager::getGameVariable(v151, "0219") )
{
v152 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_levelLeaderboardBtn_001.png");
v153 = CCMenuItemSpriteExtra::create(v152, 0, a1, (__int64)LevelInfoLayer::onLevelLeaderboard);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v20 + 464LL))(v20, v153);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, 0.0, -50.0);
cocos2d::CCPoint::operator+(v352, &v339, v154);
(*(void (__fastcall **)(cocos2d::CCObject *, _DWORD **))(*(_QWORD *)v153 + 184LL))(v153, &v339);
v155 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v153 + 200LL))(v153);
cocos2d::CCPoint::operator=(v352, v155);
}
v156 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_like2Btn_001.png");
v157 = CCMenuItemSpriteExtra::create(v156, 0, a1, (__int64)LevelInfoLayer::onLike);
*(_QWORD *)(a1 + 520) = v157;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v20 + 464LL))(v20, v157);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, 0.0, -50.0);
cocos2d::CCPoint::operator+(v352, &v339, v158);
(*(void (__fastcall **)(_QWORD, _DWORD **))(**(_QWORD **)(a1 + 520) + 184LL))(*(_QWORD *)(a1 + 520), &v339);
v159 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 520) + 200LL))(*(_QWORD *)(a1 + 520));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v351, v159);
if ( *(_DWORD *)(*(_QWORD *)(a1 + 504) + 1020LL) == *(_DWORD *)(*(_QWORD *)(a1 + 504) + 1024LL) )
{
v160 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_starBtn_001.png");
v161 = CCMenuItemSpriteExtra::create(v160, 0, a1, (__int64)LevelInfoLayer::onRateStars);
*(_QWORD *)(a1 + 528) = v161;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v20 + 464LL))(v20, v161);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, 0.0, -50.0);
cocos2d::CCPoint::operator+(v351, &v339, v162);
(*(void (__fastcall **)(_QWORD, _DWORD **))(**(_QWORD **)(a1 + 528) + 184LL))(*(_QWORD *)(a1 + 528), &v339);
v163 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 528) + 200LL))(*(_QWORD *)(a1 + 528));
cocos2d::CCPoint::operator=(v351, v163);
}
if ( *(_DWORD *)(*(_QWORD *)(a1 + 504) + 1004LL) - *(_DWORD *)(*(_QWORD *)(a1 + 504) + 1008LL) == 1 )
{
*(_OWORD *)Block = 0;
v358 = 0;
v359 = 0;
Block[0] = sub_14003D460(0x20u);
v358 = 22;
v359 = 31;
strcpy((char *)Block[0], "GJ_rateDiffBtn_001.png");
v164 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v337 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v337);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v164 = qword_14090BFD0;
}
v165 = *(_DWORD *)(v164 + 1064) - *(_DWORD *)(v164 + 1068);
if ( v165 == 1 || v165 == 2 || *(_BYTE *)(v164 + 1076) )
{
v166 = v359;
if ( v359 < 0x19 )
{
v168 = v359 >> 1;
if ( v359 <= 0x7FFFFFFFFFFFFFFFLL - (v359 >> 1) )
{
v63 = 31;
if ( v359 + v168 > 0x1F )
v63 = v359 + v168;
}
v169 = sub_14003D460(v63 + 1);
v358 = 25;
v359 = v63;
qmemcpy(v169, "GJ_rateDiffBtnMod_001.pn", 24);
v169[12] = (unsigned __int8)aGjRatediffbtnm[24];
if ( v166 > 0xF )
{
v170 = Block[0];
if ( v166 + 1 >= 0x1000 )
{
v170 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v170 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v170);
}
Block[0] = v169;
}
else
{
v167 = Block[0];
v358 = 25;
memmove(Block[0], "GJ_rateDiffBtnMod_001.png", 0x19u);
v167[25] = 0;
}
}
v171 = Block;
if ( v359 > 0xF )
v171 = (void **)Block[0];
v172 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName((const char *)v171);
v173 = CCMenuItemSpriteExtra::create(v172, 0, a1, (__int64)LevelInfoLayer::onRateDemon);
*(_QWORD *)(a1 + 536) = v173;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v20 + 464LL))(v20, v173);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, 0.0, -50.0);
cocos2d::CCPoint::operator+(v351, &v339, v174);
(*(void (__fastcall **)(_QWORD, _DWORD **))(**(_QWORD **)(a1 + 536) + 184LL))(*(_QWORD *)(a1 + 536), &v339);
v175 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 536) + 200LL))(*(_QWORD *)(a1 + 536));
cocos2d::CCPoint::operator=(v351, v175);
if ( v359 > 0xF )
{
v176 = Block[0];
if ( v359 + 1 >= 0x1000 )
{
v176 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v176 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v176);
}
}
if ( *(_BYTE *)(a1 + 704) )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v20 + 336LL))(v20, 0);
LevelInfoLayer::updateSideButtons(a1);
v177 = (_DWORD *)qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v337 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v337);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v177 = (_DWORD *)qword_14090BFD0;
}
if ( v177[173] - v177[174] == *(_DWORD *)(*(_QWORD *)(a1 + 504) + 648LL) - *(_DWORD *)(*(_QWORD *)(a1 + 504) + 652LL) )
goto LABEL_154;
v178 = GJAccountManager::sharedState();
if ( *(_DWORD *)(v178 + 360) != *(_DWORD *)(v178 + 364) )
{
v179 = GJAccountManager::sharedState();
if ( *(_DWORD *)(v179 + 360) - *(_DWORD *)(v179 + 364) == *(_DWORD *)(*(_QWORD *)(a1 + 504) + 660LL)
- *(_DWORD *)(*(_QWORD *)(a1 + 504) + 664LL) )
{
v177 = (_DWORD *)qword_14090BFD0;
LABEL_154:
v180 = 1;
goto LABEL_155;
}
}
v180 = 0;
v177 = (_DWORD *)qword_14090BFD0;
LABEL_155:
if ( !v177 )
{
v337 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v337);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v177 = (_DWORD *)qword_14090BFD0;
}
v181 = v177[267];
v182 = v177[266] - v181;
v183 = v182 == 1 || v182 == 2;
if ( v180 || v182 > 1 )
{
v184 = 1;
goto LABEL_167;
}
v184 = 0;
if ( v177[266] - v181 > 0 )
{
LABEL_167:
v336 = 1;
goto LABEL_168;
}
v336 = 0;
LABEL_168:
v185 = (float)(v180 + v183 + (v184 != 0));
v186 = fminf(1.0, (float)(v134 - 92.0) / (float)((float)(v185 * 50.0) + 48.0)) * 50.0;
v187 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v180 + v183 + (unsigned int)(v184 != 0));
ScreenLeft = cocos2d::CCDirector::getScreenLeft(v187);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v342,
(float)(ScreenLeft + 30.0) + 0.0,
(float)((float)(v186 * v185) * 0.5) + (float)((float)(v134 + 92.0) * 0.5));
if ( v183 )
{
v189 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_starBtnMod_001.png");
v190 = (int)v189;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v189 + 160LL))(v189);
v191 = CCMenuItemSpriteExtra::create(v190, 0, a1, (__int64)LevelInfoLayer::onRateStarsMod);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v20 + 464LL))(v20, v191);
v192 = *(_QWORD *)v191;
cocos2d::CCNode::convertToNodeSpace(v20, &v337, v342);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v192 + 184))(v191, v193);
v343 = v343 - v186;
}
if ( v184 )
{
v194 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_deleteServerBtn_001.png");
v195 = (int)v194;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v194 + 160LL))(v194);
v196 = CCMenuItemSpriteExtra::create(v195, 0, a1, (__int64)LevelInfoLayer::confirmOwnerDelete);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v20 + 464LL))(v20, v196);
v197 = *(_QWORD *)v196;
cocos2d::CCNode::convertToNodeSpace(v20, &v337, v342);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v197 + 184))(v196, v198);
v343 = v343 - v186;
}
if ( v180 )
{
v199 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png");
v200 = (int)v199;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v199 + 160LL))(v199);
v201 = CCMenuItemSpriteExtra::create(v200, 0, a1, (__int64)LevelInfoLayer::onCreatorSettings);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v20 + 464LL))(v20, v201);
v202 = *(_QWORD *)v201;
cocos2d::CCNode::convertToNodeSpace(v20, &v337, v342);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v202 + 184))(v201, v203);
v343 = v343 - v186;
}
if ( v336 )
{
v204 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_duplicateBtn_001.png");
v205 = (int)v204;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v204 + 160LL))(v204);
v206 = CCMenuItemSpriteExtra::create(v205, 0, a1, (__int64)LevelInfoLayer::confirmClone);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v20 + 464LL))(v20, v206);
v207 = *(_QWORD *)v206;
cocos2d::CCNode::convertToNodeSpace(v20, &v337, v342);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v207 + 184))(v206, v208);
}
else
{
v209 = "GJ_duplicateLockedBtn_001.png";
if ( v127[263] - v127[264] == 1 )
v209 = "GJ_duplicateBtn_001.png";
v210 = cocos2d::CCSprite::createWithSpriteFrameName(v209);
v211 = (int)v210;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v210 + 160LL))(v210);
v212 = CCMenuItemSpriteExtra::create(v211, 0, a1, (__int64)LevelInfoLayer::tryCloneLevel);
*(_QWORD *)(a1 + 608) = v212;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v20 + 464LL))(v20, v212);
v213 = **(_QWORD **)(a1 + 608);
v214 = *(_QWORD *)(a1 + 608);
cocos2d::CCNode::convertToNodeSpace(v20, &v337, v342);
(*(void (__fastcall **)(__int64, __int64))(v213 + 184))(v214, v215);
LOBYTE(v216) = *(_DWORD *)(*(_QWORD *)(a1 + 504) + 1052LL) != *(_DWORD *)(*(_QWORD *)(a1 + 504) + 1056LL);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 608) + 336LL))(*(_QWORD *)(a1 + 608), v216);
v217 = *(__int64 **)(a1 + 608);
v218 = *v217;
v219 = v217;
v220 = (*(__int64 (**)(void))(*v217 + 344))();
(*(void (__fastcall **)(__int64 *, _QWORD))(v218 + 936))(v219, v220);
}
v221 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
v222 = CCMenuItemSpriteExtra::create(v221, 0, a1, (__int64)LevelInfoLayer::onBack);
v344 = v222;
*((_DWORD *)v222 + 93) = 1070386381;
v223 = cocos2d::CCMenu::create(v222, 0);
(*(void (__fastcall **)(__int64, struct cocos2d::CCMenu *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v223, 1);
v224 = *(_QWORD *)v223;
v226 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v225);
v227 = cocos2d::CCDirector::getScreenTop(v226) - 23.0;
v229 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v228);
v230 = cocos2d::CCDirector::getScreenLeft(v229) + 24.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, v230, v227);
(*(void (__fastcall **)(struct cocos2d::CCMenu *, __int64))(v224 + 184))(v223, v231);
v232 = *(_QWORD *)(a1 + 504);
v233 = (unsigned int)(*(_DWORD *)(v232 + 992) - *(_DWORD *)(v232 + 996));
if ( *(_DWORD *)(v232 + 992) - *(_DWORD *)(v232 + 996) <= 0 )
{
v234 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v339 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480((__int64)v339);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v234 = qword_14090BFE0;
}
if ( GameStatsManager::hasCompletedLevel(v234, *(_QWORD *)(a1 + 504)) )
{
if ( *(_DWORD *)(*(_QWORD *)(a1 + 504) + 1004LL) - *(_DWORD *)(*(_QWORD *)(a1 + 504) + 1008LL) == 1 )
{
v235 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v337 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480((__int64)v337);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v235 = qword_14090BFE0;
}
GameStatsManager::completedDemonLevel(v235, *(_QWORD *)(a1 + 504));
}
v236 = *(_QWORD *)(a1 + 504);
v233 = (unsigned int)(*(_DWORD *)(v236 + 1020) - *(_DWORD *)(v236 + 1024));
if ( *(_DWORD *)(v236 + 1020) - *(_DWORD *)(v236 + 1024) > 0 )
{
v237 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v337 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480((__int64)v337);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v237 = qword_14090BFE0;
}
GameStatsManager::completedStarLevel(v237, *(_QWORD *)(a1 + 504));
}
}
}
v238 = (_DWORD *)cocos2d::CCMenu::create(v233);
v339 = v238;
v239 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png");
v240 = CCMenuItemSpriteExtra::create(v239, 0, a1, (__int64)LevelInfoLayer::onLevelInfo);
*((_DWORD *)v240 + 93) = 1067030938;
(*(void (__fastcall **)(_DWORD *, cocos2d::CCObject *))(*(_QWORD *)v238 + 464LL))(v238, v240);
v241 = *(_QWORD *)v238;
v243 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v242);
v244 = cocos2d::CCDirector::getScreenBottom(v243) + 30.0;
v246 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v245);
v247 = cocos2d::CCDirector::getScreenLeft(v246) + 30.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, v247, v244);
(*(void (__fastcall **)(_DWORD *, __int64))(v241 + 184))(v238, v248);
(*(void (__fastcall **)(__int64, _DWORD *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v238, 2);
v250 = cocos2d::CCMenu::create(v249);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v250, 21);
v251 = *(_QWORD *)v250;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v338, (float)(v340 - 85.0) - 0.0, v341 - 25.0);
(*(void (__fastcall **)(__int64, __int64))(v251 + 184))(v250, v252);
v253 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("garageRope_001.png");
v254 = CCMenuItemSpriteExtra::create(v253, 0, a1, (__int64)LevelInfoLayer::onGarage);
*((_DWORD *)v254 + 93) = 1067030938;
v255 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v254 + 952LL))(v254);
v256 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v255 + 200LL))(v255);
cocos2d::CCPoint::operator=((char *)v254 + 504, v256);
*((_DWORD *)v254 + 125) = 1;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v349, 0.0, -8.0);
cocos2d::CCPoint::operator=((char *)v254 + 484, v257);
*((_DWORD *)v254 + 123) = 1045220557;
*((_DWORD *)v254 + 124) = 1045220557;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v250 + 464LL))(v250, v254);
v258 = "gj_heartOff_001.png";
if ( *(_BYTE *)(*(_QWORD *)(a1 + 504) + 984LL) )
v258 = "gj_heartOn_001.png";
v259 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName(v258);
v260 = CCMenuItemSpriteExtra::create(v259, 0, a1, (__int64)LevelInfoLayer::onFavorite);
*((_DWORD *)v260 + 93) = 1066192077;
(*(void (__fastcall **)(_DWORD *, cocos2d::CCObject *, __int64))(*(_QWORD *)v238 + 456LL))(v238, v260, 100);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v355, 38.0, 0.0);
v262 = v261;
v263 = (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)v238 + 200LL))(v238);
cocos2d::CCPoint::operator+(v263, &v338, v262);
v264 = *(_QWORD *)v260;
cocos2d::CCNode::convertToNodeSpace(v238, &v337, &v338);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v264 + 184))(v260, v265);
v266 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png");
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v266 + 160LL))(v266);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v266 + 352LL))(v266);
v267 = CCMenuItemSpriteExtra::create((int)v266, 0, a1, (__int64)LevelInfoLayer::confirmMoveToTop);
*((_DWORD *)v267 + 93) = 1066192077;
(*(void (__fastcall **)(_DWORD *, cocos2d::CCObject *, __int64))(*(_QWORD *)v238 + 456LL))(v238, v267, 100);
v268 = *(_QWORD *)v267;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v353, (float)(v340 - 73.0) - 0.0, 55.0);
cocos2d::CCNode::convertToNodeSpace(v238, v355, v269);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v268 + 184))(v267, v270);
v271 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png");
(*(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v271 + 160LL))(v271);
cocos2d::CCSprite::setFlipY(v271, 1);
(*(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v271 + 352LL))(v271);
v272 = CCMenuItemSpriteExtra::create((int)v271, 0, a1, (__int64)LevelInfoLayer::confirmMoveToBottom);
v349 = v272;
*((_DWORD *)v272 + 93) = 1066192077;
(*(void (__fastcall **)(_DWORD *, cocos2d::CCObject *, __int64))(*(_QWORD *)v238 + 456LL))(v238, v272, 100);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v345, 0.0, -30.0);
v274 = v273;
v275 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v267 + 200LL))(v267);
cocos2d::CCPoint::operator+(v275, &v338, v274);
(*(void (__fastcall **)(cocos2d::CCObject *, void **))(*(_QWORD *)v272 + 184LL))(v272, &v338);
if ( *(_BYTE *)(a1 + 704) )
(*(void (__fastcall **)(_DWORD *, _QWORD))(*(_QWORD *)v238 + 336LL))(v238, 0);
v276 = *(_QWORD *)(a1 + 504);
v277 = *(_DWORD *)(v276 + 680);
if ( v277 )
{
SongObject = SongInfoObject::create_1(v277);
v279 = 0;
}
else
{
SongObject = LevelTools::getSongObject(*(unsigned int *)(v276 + 676));
v279 = 1;
}
v280 = CustomSongWidget::create(SongObject, 0, 0, 0, 1, v279, 0, 0, 0, 0, 1);
*(_QWORD *)(a1 + 736) = v280;
(*(void (__fastcall **)(__int64, cocos2d::CCNode *))(*(_QWORD *)a1 + 464LL))(a1, v280);
v281 = **(_QWORD **)(a1 + 736);
v283 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v282);
v284 = cocos2d::CCDirector::getScreenBottom(v283) + 45.0;
v285 = *(_QWORD *)(a1 + 736);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v345, v340 * 0.5, v284);
(*(void (__fastcall **)(__int64, __int64))(v281 + 184))(v285, v286);
if ( *(_BYTE *)(SongObject + 472) )
CustomSongWidget::onGetSongInfo(*(_QWORD *)(a1 + 736));
v345 = Buf1;
v287 = (__int64 *)sub_14003F4F0((__int64)Buf1, *(_QWORD *)(a1 + 504) + 1376LL);
v288 = (__int64 *)sub_14003F4F0((__int64)Block, *(_QWORD *)(a1 + 504) + 1344LL);
CustomSongWidget::updateWithMultiAssets(
*(_QWORD *)(a1 + 736),
v288,
v287,
*(_DWORD *)(*(_QWORD *)(a1 + 504) + 1408LL));
v290 = cocos2d::CCMenu::create(v289);
v291 = *(_QWORD *)v290;
v293 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v292);
v294 = cocos2d::CCDirector::getScreenBottom(v293) + 30.0;
v296 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v295);
v297 = cocos2d::CCDirector::getScreenLeft(v296) + 30.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v345, v297, v294);
(*(void (__fastcall **)(__int64, __int64))(v291 + 184))(v290, v298);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v290, 2);
v299 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_optionsBtn_001.png");
LODWORD(v291) = (_DWORD)v299;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v299 + 160LL))(v299);
v300 = CCMenuItemSpriteExtra::create(v291, 0, a1, (__int64)LevelInfoLayer::onLevelOptions);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v290 + 464LL))(v290, v300);
v301 = *(_QWORD *)v300;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v355, 30.0, 70.0);
cocos2d::CCNode::convertToNodeSpace(v290, &v345, v302);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v301 + 184))(v300, v303);
v304 = cocos2d::CCSprite::createWithSpriteFrameName("gj_folderBtn_001.png");
v305 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, (unsigned int)v127[247]);
v306 = cocos2d::CCString::getCString(v305);
v307 = cocos2d::CCLabelBMFont::create(v306, (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 600) = v307;
(*(void (__fastcall **)(struct cocos2d::CCSprite *, struct cocos2d::CCLabelBMFont *, __int64))(*(_QWORD *)v304 + 456LL))(
v304,
v307,
1);
v308 = **(_QWORD **)(a1 + 600);
v309 = (float)(*(float *)((*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v304 + 320LL))(v304) + 4)
* 0.5)
+ 1.0;
v310 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v304 + 320LL))(v304);
v311 = *(_QWORD *)(a1 + 600);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v345, *v310 * 0.5, v309);
(*(void (__fastcall **)(__int64, __int64))(v308 + 184))(v311, v312);
cocos2d::CCLabelBMFont::limitLabelWidth(*(cocos2d::CCLabelBMFont **)(a1 + 600), 24.0, 0.55000001, 0.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v304 + 160LL))(v304);
v313 = CCMenuItemSpriteExtra::create((int)v304, 0, a1, (__int64)LevelInfoLayer::onSetFolder);
v314 = v339;
(*(void (__fastcall **)(_DWORD *, cocos2d::CCObject *))(*(_QWORD *)v339 + 464LL))(v339, v313);
v315 = *(_QWORD *)v313;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v337, (float)(v340 - 73.0) - 0.0, 80.0);
cocos2d::CCNode::convertToNodeSpace(v314, &v345, v316);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v315 + 184))(v313, v317);
v318 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_listAddBtn_001.png");
LODWORD(v315) = (_DWORD)v318;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v318 + 160LL))(v318);
v319 = CCMenuItemSpriteExtra::create(v315, 0, a1, (__int64)LevelInfoLayer::onAddToList);
(*(void (__fastcall **)(_DWORD *, cocos2d::CCObject *))(*(_QWORD *)v339 + 464LL))(v339, v319);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v338, 0.0, 35.0);
v321 = v320;
v322 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v313 + 200LL))(v313);
cocos2d::CCPoint::operator+(v322, &v339, v321);
(*(void (__fastcall **)(cocos2d::CCObject *, _DWORD **))(*(_QWORD *)v319 + 184LL))(v319, &v339);
if ( v127[248] - v127[249] > 0 || *((_BYTE *)v127 + 721) )
{
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v313 + 336LL))(v313, 0);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v313 + 936LL))(v313, 0);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v267 + 336LL))(v267, 0);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v267 + 936LL))(v267, 0);
v324 = v349;
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v349 + 336LL))(v349, 0);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v324 + 936LL))(v324, 0);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v260 + 336LL))(v260, 0);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v260 + 936LL))(v260, 0);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v319 + 336LL))(v319, 0);
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v319 + 936LL))(v319, 0);
}
if ( *(_BYTE *)(cocos2d::CCApplication::sharedApplication(v323) + 209) )
{
GameToolbox::addBackButton(a1, (__int64)v344);
v325 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_Start_001.png");
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *))(**(_QWORD **)(a1 + 720) + 464LL))(
*(_QWORD *)(a1 + 720),
v325);
v326 = *(_QWORD *)v325;
v327 = (float)(*(float *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 320LL))(*(_QWORD *)(a1 + 720))
+ 4)
* 0.5)
- 40.0;
v328 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 720) + 320LL))(*(_QWORD *)(a1 + 720));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v345, *v328 * 0.5, v327);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v326 + 184))(v325, v329);
}
v330 = *(_QWORD *)(a1 + 504);
v331 = *(_BYTE *)(v330 + 1584);
if ( (v331 || *(_BYTE *)(v330 + 1585))
&& *(_DWORD *)(v330 + 1220) != 2
&& *(_DWORD *)(v330 + 1004) - *(_DWORD *)(v330 + 1008) == 1 )
{
if ( v331 )
{
v332 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v353 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v353);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v332 = *(_QWORD *)&qword_14090BFB0;
}
GameLevelManager::getLevelLeaderboard(v332, *(_QWORD *)(a1 + 504), 4, 0);
}
if ( *(_BYTE *)(*(_QWORD *)(a1 + 504) + 1585LL) )
{
v333 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v353 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v353);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v333 = *(_QWORD *)&qword_14090BFB0;
}
GameLevelManager::getLevelLeaderboard(v333, *(_QWORD *)(a1 + 504), 4, 1);
}
}
v334 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v345 = (void **)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v345);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v334 = qword_14090BFD0;
}
*(_BYTE *)(v334 + 1096) = 0;
return 1;
}