//
// LevelSelectLayer::init from 0x1404416a0 to 0x140442548 (3752 bytes)
//
// 2 xrefs:
// > LevelSelectLayer::scene @ 0x14044164a
// > ??> @ 0x1409270ec
//
// 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:22 +0000
//
// Hidden C++ exception states: #wind=16
bool __fastcall LevelSelectLayer::init(__int64 a1, int a2)
{
bool result; // al
__int64 v4; // rcx
__int64 v5; // rdx
__int64 v6; // rcx
__int64 v7; // rdx
__int64 v8; // rdx
__int64 v9; // rcx
__int64 v10; // r8
__int64 v11; // rbx
cocos2d::CCString *v12; // rax
__int64 v13; // rcx
int v14; // ebx
void *v15; // r8
__int64 v16; // rax
struct cocos2d::CCSprite *v17; // rdi
__int64 v18; // rbx
__int64 v19; // rax
__int64 v20; // rdi
__int64 v21; // rbx
__int64 v22; // rax
__int64 v23; // rcx
cocos2d::CCObject *v24; // rax
__int64 *v25; // rdi
__int64 v26; // rbx
__int64 v27; // rax
struct cocos2d::CCSprite *v28; // rdi
__int64 v29; // rbx
__int64 v30; // rax
__int64 v31; // rbx
__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
struct cocos2d::CCSprite *v47; // rdi
__int64 v48; // rbx
__int64 v49; // rax
__int64 v50; // rbx
__int64 v51; // rcx
cocos2d::CCDirector *v52; // rax
float v53; // xmm6_4
__int64 v54; // rcx
cocos2d::CCDirector *v55; // rax
float v56; // xmm0_4
__int64 v57; // rax
__int64 v58; // rcx
cocos2d::CCArray *v59; // r15
__int64 v60; // rcx
cocos2d::CCArray *v61; // r14
signed int i; // ebx
__int64 v63; // rcx
struct cocos2d::CCObject *MainLevel; // rax
__int64 v65; // rdi
char *v66; // rbx
__int64 v67; // rax
cocos2d::CCObject *v68; // rbx
__int64 *v69; // rsi
cocos2d::CCArray *v70; // r14
int v71; // r13d
float v72; // xmm0_4
__int64 v73; // rax
cocos2d::CCObject *v74; // rbx
float v75; // xmm0_4
__int64 v76; // rdx
char *v77; // rax
__int64 *v78; // r12
__int64 v79; // rcx
cocos2d::CCDirector *v80; // rax
float v81; // xmm0_4
__int64 v82; // rbx
__int64 v83; // rax
__int64 v84; // rbx
__int64 v85; // rax
__int64 *v86; // rdi
cocos2d::CCObject *v87; // rbx
struct cocos2d::CCMenu *v88; // rdi
__int64 v89; // rbx
__int64 v90; // rcx
cocos2d::CCDirector *v91; // rax
float v92; // xmm0_4
__int64 v93; // rax
float v94; // xmm6_4
__int64 v95; // rcx
__int64 v96; // r14
__int64 v97; // rcx
char v98; // r13
const char *v99; // r15
const char *v100; // rcx
cocos2d::CCSprite *v101; // rax
__int64 *v102; // rbx
cocos2d::CCObject *v103; // rdi
__int64 v104; // rbx
__int64 v105; // rcx
cocos2d::CCDirector *v106; // rax
float v107; // xmm0_4
__int64 v108; // rax
__int64 v109; // rax
__int64 *v110; // rbx
cocos2d::CCObject *v111; // rdi
__int64 v112; // rbx
__int64 v113; // rcx
cocos2d::CCDirector *v114; // rax
float v115; // xmm0_4
__int64 v116; // rax
__int64 v117; // rax
__int64 *v118; // rbx
cocos2d::CCObject *v119; // r14
struct cocos2d::CCMenu *v120; // rdi
__int64 v121; // rbx
__int64 v122; // rcx
cocos2d::CCDirector *v123; // rax
float v124; // xmm6_4
__int64 v125; // rcx
cocos2d::CCDirector *v126; // rax
float v127; // xmm0_4
__int64 v128; // rax
__int64 v129; // rcx
__int64 v130; // rax
__int64 v131; // r15
__int64 *v132; // rdi
cocos2d::CCObject *v133; // rbx
__int64 *v134; // rdi
__int64 v135; // rbx
__int64 v136; // rdi
__int64 v137; // rbx
__int64 v138; // rax
__int64 v139; // rbx
__int64 v140; // rcx
cocos2d::CCDirector *v141; // rax
float v142; // xmm7_4
__int64 v143; // rcx
cocos2d::CCDirector *v144; // rax
float v145; // xmm0_4
__int64 v146; // rax
char *v147; // [rsp+38h] [rbp-69h] BYREF
__int16 v148; // [rsp+40h] [rbp-61h] BYREF
char v149; // [rsp+42h] [rbp-5Fh]
cocos2d::CCArray *v150; // [rsp+48h] [rbp-59h] BYREF
float v151; // [rsp+50h] [rbp-51h] BYREF
float v152; // [rsp+54h] [rbp-4Dh]
int v153; // [rsp+58h] [rbp-49h]
__int64 *v154; // [rsp+60h] [rbp-41h]
void *Block[2]; // [rsp+68h] [rbp-39h] BYREF
__int64 v156; // [rsp+78h] [rbp-29h]
unsigned __int64 v157; // [rsp+80h] [rbp-21h]
v153 = a2;
v154 = (__int64 *)a1;
result = cocos2d::CCLayer::init((cocos2d::CCLayer *)a1);
if ( !result )
return result;
if ( !qword_14090BFE0 )
{
v150 = (cocos2d::CCArray *)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480((__int64)v150);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
}
if ( (unsigned __int8)GameStatsManager::isItemUnlocked(v4, 0xCu, 4u) )
{
v6 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v150 = (cocos2d::CCArray *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v150);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v6 = qword_14090BFD0;
}
GameManager::setUGV(v6, "6", 1u);
}
LOBYTE(v5) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 992LL))(a1, v5);
LOBYTE(v7) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1008LL))(a1, v7);
byte_1409097A4 = 0;
v11 = AchievementManager::sharedState(v9, v8, v10);
*(_OWORD *)Block = 0;
Block[0] = sub_14003D460(0x20u);
v156 = 21;
v157 = 31;
strcpy((char *)Block[0], "geometry.ach.secret04");
v12 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v11 + 352), Block);
v14 = cocos2d::CCString::intValue(v12);
if ( v157 > 0xF )
{
v15 = Block[0];
if ( v157 + 1 >= 0x1000 )
{
v15 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v15 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v15);
}
*(_BYTE *)(a1 + 464) = v14 >= 100;
v16 = cocos2d::CCDirector::sharedDirector(v13);
cocos2d::CCDirector::getWinSize(v16, &v151);
v17 = cocos2d::CCSprite::create("GJ_gradientBG.png");
*(_QWORD *)(a1 + 432) = v17;
v18 = *(_QWORD *)v17;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v150, 0.0, 0.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v18 + 288))(v17, v19);
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 432), 4294967294LL);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 432) + 120LL))(*(_QWORD *)(a1 + 432));
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 432) + 136LL))(*(_QWORD *)(a1 + 432));
v20 = **(_QWORD **)(a1 + 432);
v21 = *(_QWORD *)(a1 + 432);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v150, -5.0, -5.0);
(*(void (__fastcall **)(__int64, __int64))(v20 + 184))(v21, v22);
v148 = 32040;
v149 = -1;
(**(void (__fastcall ***)(__int64, __int16 *))(*(_QWORD *)(a1 + 432) + 320LL))(*(_QWORD *)(a1 + 432) + 320LL, &v148);
v23 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v150 = (cocos2d::CCArray *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v150);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v23 = qword_14090BFD0;
}
v24 = GJGroundLayer::create(*(_DWORD *)(v23 + 1016), 1u);
*(_QWORD *)(a1 + 440) = v24;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *, _QWORD))(*(_QWORD *)a1 + 456LL))(a1, v24, 0);
v25 = *(__int64 **)(a1 + 440);
v26 = *v25;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v150, 0.0, fminf((float)(v152 * 0.5) - 110.0, 128.0));
(*(void (__fastcall **)(__int64 *, __int64))(v26 + 184))(v25, v27);
v28 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_topBar_001.png");
v29 = *(_QWORD *)v28;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v150, 0.5, 1.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v29 + 288))(v28, v30);
v31 = *(_QWORD *)v28;
v33 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v32);
v34 = cocos2d::CCDirector::getScreenTop(v33) + 1.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v150, v151 * 0.5, v34);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v31 + 184))(v28, v35);
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v28, 1);
v36 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png");
v37 = *(_QWORD *)v36;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v150, 0.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::getScreenLeft(v44) - 1.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v150, v45, v42);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v39 + 184))(v36, v46);
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v36, 1);
v47 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png");
v48 = *(_QWORD *)v47;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v150, 1.0, 0.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v48 + 288))(v47, v49);
v50 = *(_QWORD *)v47;
v52 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v51);
v53 = cocos2d::CCDirector::getScreenBottom(v52) - 1.0;
v55 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v54);
v56 = cocos2d::CCDirector::getScreenRight(v55) + 1.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v150, v56, v53);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v50 + 184))(v47, v57);
cocos2d::CCSprite::setFlipX(v47, 1);
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v47, 1);
v59 = (cocos2d::CCArray *)cocos2d::CCArray::create(v58);
v61 = (cocos2d::CCArray *)cocos2d::CCArray::create(v60);
v150 = v61;
for ( i = 1; i < 23; ++i )
{
v63 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v147 = (char *)operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v147);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v63 = *(_QWORD *)&qword_14090BFB0;
}
MainLevel = (struct cocos2d::CCObject *)GameLevelManager::getMainLevel(v63, i, 1u);
cocos2d::CCArray::addObject(v61, MainLevel);
}
v65 = 3;
do
{
v66 = (char *)operator new(0x240u);
v147 = v66;
cocos2d::CCLayer::CCLayer((cocos2d::CCLayer *)v66);
*(_QWORD *)v66 = &LevelPage::`vftable';
*((_QWORD *)v66 + 40) = &LevelPage::`vftable';
*((_QWORD *)v66 + 41) = &LevelPage::`vftable';
*((_QWORD *)v66 + 42) = &LevelPage::`vftable';
*((_QWORD *)v66 + 43) = &LevelPage::`vftable';
*((_QWORD *)v66 + 44) = &LevelPage::`vftable';
*((_QWORD *)v66 + 51) = &LevelPage::`vftable';
v66[416] = 0;
*((_QWORD *)v66 + 53) = 0;
*((_QWORD *)v66 + 54) = 0;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)(v66 + 520));
*((_QWORD *)v66 + 70) = 0;
*((_QWORD *)v66 + 71) = 0;
if ( (unsigned __int8)LevelPage::init(v66, 0) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v66);
}
else
{
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v66 + 8LL))(v66, 1);
v66 = nullptr;
}
cocos2d::CCArray::addObject(v59, (struct cocos2d::CCObject *)v66);
--v65;
}
while ( v65 );
v147 = (char *)operator new(0x840u);
v67 = GJGameLevel::GJGameLevel((__int64)v147);
v68 = (cocos2d::CCObject *)v67;
v69 = v154;
v70 = v150;
v71 = v153;
if ( v67 )
{
if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v67 + 72LL))(v67) )
{
cocos2d::CCObject::autorelease(v68);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v68 + 8LL))(v68, 1);
v68 = nullptr;
}
}
*((_DWORD *)v68 + 84) = -2;
v72 = (float)((float)rand() / 32767.0) * 1000.0;
*((_DWORD *)v68 + 83) = (int)v72;
*((_DWORD *)v68 + 82) = (int)v72 - 2;
cocos2d::CCArray::addObject(v70, v68);
v147 = (char *)operator new(0x840u);
v73 = GJGameLevel::GJGameLevel((__int64)v147);
v74 = (cocos2d::CCObject *)v73;
if ( v73 )
{
if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v73 + 72LL))(v73) )
{
cocos2d::CCObject::autorelease(v74);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v74 + 8LL))(v74, 1);
v74 = nullptr;
}
}
*((_DWORD *)v74 + 84) = -1;
v75 = (float)((float)rand() / 32767.0) * 1000.0;
*((_DWORD *)v74 + 83) = (int)v75;
*((_DWORD *)v74 + 82) = (int)v75 - 1;
cocos2d::CCArray::addObject(v70, v74);
v77 = BoomScrollLayer::create((int)v59, v76, 1u, (__int64)v70, (__int64)(v69 + 52));
v78 = v69 + 56;
v69[56] = (__int64)v77;
(*(void (__fastcall **)(__int64 *, char *))(*v69 + 464))(v69, v77);
v80 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v79);
v81 = cocos2d::CCDirector::getScreenBottom(v80) + 15.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v147, v151 * 0.5, v81);
v82 = v69[56];
cocos2d::CCPoint::operator=(v82 + 572, v83);
BoomScrollLayer::updateDots(v82);
*((float *)v69 + 106) = v151;
*(_QWORD *)(*(_QWORD *)(v69[56] + 504) + 408LL) = v69 + 51;
if ( v71 )
{
if ( v71 == 23 )
BoomScrollLayer::instantMoveToPage(*v78, 22);
BoomScrollLayer::instantMoveToPage(*v78, v71);
}
else
{
v84 = v69[51];
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v147, (const struct cocos2d::CCPoint *)&unk_14090AFF8);
(*(void (__fastcall **)(__int64 *, __int64))(v84 + 16))(v69 + 51, v85);
}
v86 = (__int64 *)cocos2d::CCLabelBMFont::create("Download the soundtrack", (const char *)&qword_140704F78);
(*(void (__fastcall **)(__int64 *))(*v86 + 160))(v86);
v147 = (char *)operator new(0x208u);
v87 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v147);
if ( v87 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v87, v86, 0, (__int64)v69, (__int64)LevelSelectLayer::onDownload) )
{
cocos2d::CCObject::autorelease(v87);
goto LABEL_42;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v87 + 8LL))(v87, 1);
}
v87 = nullptr;
LABEL_42:
*((_DWORD *)v87 + 93) = 1066192077;
v88 = cocos2d::CCMenu::create(v87, 0);
(*(void (__fastcall **)(__int64 *, struct cocos2d::CCMenu *))(*v69 + 464))(v69, v88);
v89 = *(_QWORD *)v88;
v91 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v90);
v92 = cocos2d::CCDirector::getScreenBottom(v91) + 35.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v147, v151 * 0.5, v92);
(*(void (__fastcall **)(struct cocos2d::CCMenu *, __int64))(v89 + 184))(v88, v93);
v94 = v152 * 0.5;
v96 = cocos2d::CCMenu::create(v95);
(*(void (__fastcall **)(__int64 *, __int64, __int64))(*v69 + 456))(v69, v96, 5);
v98 = *(_BYTE *)(cocos2d::CCApplication::sharedApplication(v97) + 209);
v99 = "navArrowBtn_001.png";
v100 = "navArrowBtn_001.png";
if ( v98 )
v100 = "controllerBtn_DPad_Left_001.png";
v101 = cocos2d::CCSprite::createWithSpriteFrameName(v100);
v102 = (__int64 *)v101;
if ( !v98 )
cocos2d::CCSprite::setFlipX(v101, 1);
v147 = (char *)operator new(0x208u);
v103 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v147);
if ( v103 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v103, v102, 0, (__int64)v69, (__int64)LevelSelectLayer::onPrev) )
{
cocos2d::CCObject::autorelease(v103);
goto LABEL_51;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v103 + 8LL))(v103, 1);
}
v103 = nullptr;
LABEL_51:
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v96 + 464LL))(v96, v103);
*((_DWORD *)v103 + 93) = 0x40000000;
v104 = *(_QWORD *)v103;
v106 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v105);
v107 = cocos2d::CCDirector::getScreenLeft(v106) + 25.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v147, v107, v94);
cocos2d::CCNode::convertToNodeSpace(v96, &v150, v108);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v104 + 184))(v103, v109);
if ( v98 )
v99 = "controllerBtn_DPad_Right_001.png";
v110 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName(v99);
v147 = (char *)operator new(0x208u);
v111 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v147);
if ( v111 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v111, v110, 0, (__int64)v69, (__int64)LevelSelectLayer::onNext) )
{
cocos2d::CCObject::autorelease(v111);
goto LABEL_58;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v111 + 8LL))(v111, 1);
}
v111 = nullptr;
LABEL_58:
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v96 + 464LL))(v96, v111);
*((_DWORD *)v111 + 93) = 0x40000000;
v112 = *(_QWORD *)v111;
v114 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v113);
v115 = cocos2d::CCDirector::getScreenRight(v114) - 25.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v147, v115, v94);
cocos2d::CCNode::convertToNodeSpace(v96, &v150, v116);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v112 + 184))(v111, v117);
v118 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
v147 = (char *)operator new(0x208u);
v119 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v147);
if ( v119 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v119, v118, 0, (__int64)v69, (__int64)LevelSelectLayer::onBack) )
{
cocos2d::CCObject::autorelease(v119);
goto LABEL_63;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v119 + 8LL))(v119, 1);
}
v119 = nullptr;
LABEL_63:
*((_DWORD *)v119 + 93) = 1070386381;
v120 = cocos2d::CCMenu::create(v119, 0);
(*(void (__fastcall **)(__int64 *, struct cocos2d::CCMenu *, __int64))(*v69 + 456))(v69, v120, 1);
v121 = *(_QWORD *)v120;
v123 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v122);
v124 = cocos2d::CCDirector::getScreenTop(v123) - 22.0;
v126 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v125);
v127 = cocos2d::CCDirector::getScreenLeft(v126) + 25.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v147, v127, v124);
(*(void (__fastcall **)(struct cocos2d::CCMenu *, __int64))(v121 + 184))(v120, v128);
v130 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v147 = (char *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v147);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v130 = qword_14090BFD0;
}
*(_BYTE *)(v130 + 1096) = 0;
v131 = cocos2d::CCMenu::create(v129);
(*(void (__fastcall **)(__int64 *, __int64))(*v69 + 464))(v69, v131);
v132 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png");
v147 = (char *)operator new(0x208u);
v133 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v147);
if ( v133 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v133, v132, 0, (__int64)v69, (__int64)LevelSelectLayer::onInfo) )
{
cocos2d::CCObject::autorelease(v133);
goto LABEL_70;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v133 + 8LL))(v133, 1);
}
v133 = nullptr;
LABEL_70:
*((_DWORD *)v133 + 93) = 0x40000000;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v131 + 464LL))(v131, v133);
v134 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName("sideBtn_death_001.png");
v147 = (char *)operator new(0x208u);
v135 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v147);
if ( !v135 )
{
LABEL_74:
v135 = 0;
goto LABEL_75;
}
if ( !CCMenuItemSpriteExtra::init((__int64 *)v135, v134, 0, (__int64)v69, (__int64)LevelSelectLayer::onDeathTracker) )
{
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v135 + 8LL))(v135, 1);
goto LABEL_74;
}
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v135);
LABEL_75:
v69[59] = v135;
*(_DWORD *)(v135 + 372) = 0x40000000;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v131 + 464LL))(v131, v69[59]);
v136 = *(_QWORD *)v69[59];
v137 = v69[59];
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v147, 0.0, -40.0);
(*(void (__fastcall **)(__int64, __int64))(v136 + 184))(v137, v138);
LevelSelectLayer::updateDeathButton(v69, *(unsigned int *)(*v78 + 588));
v139 = *(_QWORD *)v131;
v141 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v140);
v142 = cocos2d::CCDirector::getScreenTop(v141) - 20.0;
v144 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v143);
v145 = cocos2d::CCDirector::getScreenRight(v144) - 20.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v147, v145, v142);
(*(void (__fastcall **)(__int64, __int64))(v139 + 184))(v131, v146);
if ( v98 )
GameToolbox::addBackButton((__int64)v69, (__int64)v119);
return 1;
}