//
// SecretLayer3::init from 0x14057fa80 to 0x140581142 (5826 bytes)
//
// 5 xrefs:
// > SecretLayer2::onDoor @ 0x14057a530
// > SecretLayer2::onDoor @ 0x14057a537
// > SecretLayer2::onDoor @ 0x14057a521
// > ??> @ 0x1407dfa30
// > ??> @ 0x14092c960
//
// 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:34:26 +0000
//
// Hidden C++ exception states: #wind=21
bool __fastcall SecretLayer3::init(__int64 a1)
{
bool result; // al
unsigned int v3; // ebx
__int64 v4; // rcx
cocos2d::CCTextureCache *v5; // rax
__int64 v6; // rdx
__int64 v7; // rcx
cocos2d::CCSpriteFrameCache *v8; // rax
__int64 v9; // rcx
__int64 v10; // rdx
__int64 v11; // rdx
__int64 v12; // rcx
__int64 v13; // rax
struct cocos2d::CCSprite *v14; // rdi
__int64 v15; // rbx
__int64 v16; // rax
__int64 v17; // rbx
__int64 v18; // rax
struct cocos2d::CCSprite *v19; // r12
__int64 v20; // rbx
__int64 v21; // rax
struct cocos2d::CCSprite *v22; // rdi
__int64 v23; // rbx
__int64 v24; // rax
cocos2d::CCNode *v25; // r13
__int64 v26; // rbx
__int64 v27; // rax
void (__fastcall **v28)(char *, __int64 *); // rbx
void (__fastcall **v29)(char *, __int64 *); // rbx
__int64 v30; // rax
__int64 v31; // rcx
cocos2d::CCArray *v32; // rsi
__int64 v33; // rcx
cocos2d::CCArray *v34; // r15
int i; // edi
cocos2d::CCString *v36; // rax
const char *CString; // rbx
__int64 v38; // rdx
__int64 v39; // rcx
cocos2d::CCSpriteFrameCache *v40; // rax
struct cocos2d::CCObject *v41; // rax
cocos2d::CCString *v42; // rax
const char *v43; // rbx
__int64 v44; // rdx
__int64 v45; // rcx
cocos2d::CCSpriteFrameCache *v46; // rax
struct cocos2d::CCObject *v47; // rax
struct cocos2d::CCAnimation *v48; // rax
struct cocos2d::CCActionInterval *v49; // rax
struct cocos2d::CCAction *v50; // rax
struct cocos2d::CCAnimation *v51; // rax
struct cocos2d::CCActionInterval *v52; // rax
struct cocos2d::CCAction *v53; // rax
cocos2d::CCNode *v54; // rsi
__int64 v55; // rax
__int64 v56; // rbx
__int64 v57; // rax
__int64 v58; // rdx
struct cocos2d::CCActionInterval *v59; // rax
struct cocos2d::CCFiniteTimeAction *v60; // rdi
struct cocos2d::CCActionInterval *v61; // rax
struct cocos2d::CCEaseInOut *v62; // rax
struct cocos2d::CCActionInterval *v63; // rax
struct cocos2d::CCAction *v64; // rax
struct cocos2d::CCActionInterval *v65; // rax
struct cocos2d::CCFiniteTimeAction *v66; // rdi
struct cocos2d::CCActionInterval *v67; // rax
struct cocos2d::CCEaseInOut *v68; // rax
struct cocos2d::CCActionInterval *v69; // rax
struct cocos2d::CCAction *v70; // rax
struct cocos2d::CCSprite *v71; // rsi
__int64 v72; // rax
__int64 v73; // rdi
__int64 v74; // rax
struct cocos2d::CCSprite *v75; // rsi
__int64 v76; // rax
__int64 v77; // rdi
__int64 v78; // rax
__int64 v79; // rdx
struct cocos2d::CCSprite *v80; // rdi
__int64 v81; // rax
__int64 v82; // rbx
__int64 v83; // rax
cocos2d::CCNode *v84; // rbx
__int64 v85; // rax
__int64 v86; // rbx
__int64 v87; // rax
__int64 v88; // rcx
__int64 v89; // rax
__int64 v90; // rbx
__int64 v91; // rax
__int64 v92; // rcx
__int64 v93; // rcx
struct cocos2d::CCSprite *v94; // rax
__int64 v95; // rax
__int64 v96; // rbx
__int64 v97; // rax
__int64 v98; // rcx
__int64 v99; // rsi
__int64 v100; // rcx
cocos2d::CCObject *v101; // rax
__int64 v102; // rax
__int64 v103; // rbx
__int64 v104; // rax
__int64 v105; // rcx
int v106; // eax
struct cocos2d::CCObject *v107; // rbx
__int64 v108; // rax
__int64 v109; // rcx
int v110; // eax
struct cocos2d::CCObject *v111; // rbx
__int64 v112; // rax
__int64 v113; // rcx
int v114; // eax
struct cocos2d::CCObject *v115; // rbx
__int64 v116; // rax
__int64 v117; // rcx
unsigned int j; // edi
struct cocos2d::CCObject *v119; // rbx
__int64 v120; // rcx
__int64 v121; // rcx
__int64 v122; // rbx
cocos2d::CCSprite *v123; // r15
cocos2d::CCArray *v124; // rax
struct cocos2d::CCObject *v125; // rax
void **v126; // rdi
void (__fastcall **v127)(void **, _QWORD); // rbx
__int64 v128; // rax
__int64 v129; // rbx
float v130; // xmm6_4
float *v131; // rax
__int64 v132; // rax
void (__fastcall **v133)(void **, _QWORD); // rbx
__int64 v134; // rax
__int64 v135; // rax
__int64 v136; // rcx
__int64 v137; // rcx
__int64 v138; // r15
__int64 v139; // rcx
__int64 v140; // rbx
cocos2d::CCSprite *v141; // rsi
void **v142; // rbx
__int64 v143; // rdi
__int64 v144; // rbx
__int64 v145; // rax
__int64 v146; // rbx
float v147; // xmm6_4
float *v148; // rax
__int64 v149; // rax
__int64 v150; // rax
__int64 v151; // rbx
__int64 v152; // rax
__int64 v153; // rdi
__int64 v154; // rbx
__int64 v155; // rax
__int64 v156; // rcx
__int64 *v157; // rbx
__int64 v158; // rsi
struct cocos2d::CCMenu *v159; // rdi
__int64 v160; // rbx
__int64 v161; // rcx
cocos2d::CCDirector *v162; // rax
float v163; // xmm6_4
__int64 v164; // rcx
cocos2d::CCDirector *v165; // rax
float v166; // xmm0_4
__int64 v167; // rax
__int64 v168; // rcx
cocos2d::CCNode *v169; // [rsp+38h] [rbp-D0h] BYREF
__int64 v170[3]; // [rsp+40h] [rbp-C8h] BYREF
__int64 v171; // [rsp+58h] [rbp-B0h]
__int64 v172; // [rsp+60h] [rbp-A8h]
char Src[15]; // [rsp+68h] [rbp-A0h] BYREF
char v174; // [rsp+77h] [rbp-91h]
__int64 v175; // [rsp+78h] [rbp-90h]
__int64 v176; // [rsp+80h] [rbp-88h]
char v177[16]; // [rsp+88h] [rbp-80h] BYREF
__int64 v178; // [rsp+98h] [rbp-70h]
__int64 v179; // [rsp+A0h] [rbp-68h]
__int64 *v180; // [rsp+A8h] [rbp-60h] BYREF
__int128 v181; // [rsp+B0h] [rbp-58h] BYREF
__int64 v182; // [rsp+C0h] [rbp-48h]
__int64 v183; // [rsp+C8h] [rbp-40h]
__int64 v184; // [rsp+160h] [rbp+58h] BYREF
float v185; // [rsp+168h] [rbp+60h] BYREF
float v186; // [rsp+16Ch] [rbp+64h]
char v187; // [rsp+170h] [rbp+68h] BYREF
result = cocos2d::CCLayer::init((cocos2d::CCLayer *)a1);
if ( !result )
return result;
v3 = cocos2d::CCTexture2D::defaultAlphaPixelFormat();
cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(0);
v5 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v4);
cocos2d::CCTextureCache::addImage(v5, "DungeonSheet.png", 0);
v8 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v7, v6);
cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v8, "DungeonSheet.plist");
cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(v3);
v184 = (__int64)&v170[1];
*(_OWORD *)&v170[1] = 0;
v171 = 0;
v172 = 0;
v170[1] = (__int64)sub_14003D460(0x20u);
v171 = 16;
v172 = 31;
strcpy((char *)v170[1], "secretLoop02.mp3");
if ( !qword_14090BFD0 )
{
v169 = (cocos2d::CCNode *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v169);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
}
GameManager::fadeInMusic(v9, (__int64)&v170[1]);
LOBYTE(v10) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 992LL))(a1, v10);
LOBYTE(v11) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1008LL))(a1, v11);
v13 = cocos2d::CCDirector::sharedDirector(v12);
cocos2d::CCDirector::getWinSize(v13, &v185);
v14 = cocos2d::CCSprite::create("GJ_gradientBG.png");
v15 = *(_QWORD *)v14;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v184, 0.0, 0.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v15 + 288))(v14, v16);
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v14, 4294967293LL);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v14 + 120LL))(v14);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v14 + 136LL))(v14);
v17 = *(_QWORD *)v14;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v184, -5.0, -5.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v17 + 184))(v14, v18);
LOWORD(v184) = 1280;
BYTE2(v184) = 30;
(**((void (__fastcall ***)(__int64, __int64 *))v14 + 40))((__int64)v14 + 320, &v184);
v19 = cocos2d::CCSprite::createWithSpriteFrameName("dungeon_gate_001.png");
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v19, 2);
v20 = *(_QWORD *)v19;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v184, v185 * 0.5, (float)(v186 * 0.5) - 5.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v20 + 184))(v19, v21);
v22 = cocos2d::CCSprite::createWithSpriteFrameName("dungeon_foreground_001.png");
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v22, 3);
v23 = *(_QWORD *)v22;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v184, v185 * 0.5, 15.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v23 + 184))(v22, v24);
v25 = cocos2d::CCSprite::createWithSpriteFrameName("Fire_02_looped_001.png");
(*(void (__fastcall **)(__int64, cocos2d::CCNode *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v25, 4);
v26 = *(_QWORD *)v25;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v184, (float)(v185 * 0.5) - 160.0, (float)(v186 * 0.5) + 50.0);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(v26 + 184))(v25, v27);
v169 = cocos2d::CCSprite::createWithSpriteFrameName("Fire_02_looped_001.png");
(*(void (__fastcall **)(__int64, cocos2d::CCNode *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v169, 3);
v28 = *(void (__fastcall ***)(char *, __int64 *))v169;
(*(void (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v25 + 168LL))(v25);
((void (__fastcall *)(cocos2d::CCNode *))v28[20])(v169);
v29 = *(void (__fastcall ***)(char *, __int64 *))v169;
v30 = (*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v25 + 200LL))(v25);
v29[23]((char *)v169, (__int64 *)v30);
LOWORD(v184) = 255;
BYTE2(v184) = 0;
(**((void (__fastcall ***)(__int64, __int64 *))v25 + 40))((__int64)v25 + 320, &v184);
LOWORD(v184) = -1;
BYTE2(v184) = 0;
(**((void (__fastcall ***)(char *, __int64 *))v169 + 40))((char *)v169 + 320, &v184);
v32 = (cocos2d::CCArray *)cocos2d::CCArray::create(v31);
v34 = (cocos2d::CCArray *)cocos2d::CCArray::create(v33);
for ( i = 1; i <= 9; ++i )
{
v36 = cocos2d::CCString::createWithFormat("Fire_02_looped_%03i.png", i);
CString = cocos2d::CCString::getCString(v36);
v40 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v39, v38);
v41 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v40, CString);
cocos2d::CCArray::addObject(v32, v41);
v42 = cocos2d::CCString::createWithFormat("Fire_02_2_looped_%03i.png", i);
v43 = cocos2d::CCString::getCString(v42);
v46 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v45, v44);
v47 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v46, v43);
cocos2d::CCArray::addObject(v34, v47);
}
v48 = cocos2d::CCAnimation::createWithSpriteFrames(v32, 0.079999998);
v49 = cocos2d::CCAnimate::create(v48);
v50 = cocos2d::CCRepeatForever::create(v49);
cocos2d::CCNode::runAction(v25, v50);
v51 = cocos2d::CCAnimation::createWithSpriteFrames(v34, 0.079999998);
v52 = cocos2d::CCAnimate::create(v51);
v53 = cocos2d::CCRepeatForever::create(v52);
cocos2d::CCNode::runAction(v169, v53);
v54 = cocos2d::CCSprite::createWithSpriteFrameName("dungeonShine_001.png");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v169, 0.0, -10.0);
v56 = v55;
v57 = (*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v25 + 200LL))(v25);
cocos2d::CCPoint::operator+(v57, &v184, v56);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64 *))(*(_QWORD *)v54 + 184LL))(v54, &v184);
(*(void (__fastcall **)(__int64, cocos2d::CCNode *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v54, 5);
(*(void (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v54 + 160LL))(v54);
v184 = 0x100000302LL;
(**((void (__fastcall ***)(__int64, __int64))v54 + 43))((__int64)v54 + 344, 0x100000302LL);
LOBYTE(v58) = -56;
(*(void (__fastcall **)(__int64, __int64))(*((_QWORD *)v54 + 40) + 40LL))((__int64)v54 + 320, v58);
LOWORD(v184) = -14081;
BYTE2(v184) = 0;
(**((void (__fastcall ***)(__int64, __int64 *))v54 + 40))((__int64)v54 + 320, &v184);
v59 = cocos2d::CCFadeTo::create(1.6, 0xA0u);
v60 = cocos2d::CCEaseInOut::create(v59, 1.3);
v61 = cocos2d::CCFadeTo::create(1.6, 0xE1u);
v62 = cocos2d::CCEaseInOut::create(v61, 1.3);
v63 = cocos2d::CCSequence::create(v60, v62, 0);
v64 = cocos2d::CCRepeatForever::create(v63);
cocos2d::CCNode::runAction(v54, v64);
v65 = cocos2d::CCScaleTo::create(1.0, 1.0);
v66 = cocos2d::CCEaseInOut::create(v65, 1.5);
v67 = cocos2d::CCScaleTo::create(1.0, 1.2);
v68 = cocos2d::CCEaseInOut::create(v67, 1.5);
v69 = cocos2d::CCSequence::create(v66, v68, 0);
v70 = cocos2d::CCRepeatForever::create(v69);
cocos2d::CCNode::runAction(v54, v70);
v71 = cocos2d::CCSprite::createWithSpriteFrameName("dungeonTorch_001.png");
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v71, 6);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v169, -1.0, -10.0);
v73 = v72;
v74 = (*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v25 + 200LL))(v25);
cocos2d::CCPoint::operator+(v74, &v184, v73);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64 *))(*(_QWORD *)v71 + 184LL))(v71, &v184);
v75 = cocos2d::CCSprite::createWithSpriteFrameName("dungeonShine_001.png");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v169, 0.0, -14.0);
v77 = v76;
v78 = (*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v25 + 200LL))(v25);
cocos2d::CCPoint::operator+(v78, &v184, v77);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64 *))(*(_QWORD *)v75 + 184LL))(v75, &v184);
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v75, 7);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v75 + 160LL))(v75);
(**((void (__fastcall ***)(__int64, __int64))v75 + 43))((__int64)v75 + 344, 0x100000302LL);
LOBYTE(v79) = -81;
(*(void (__fastcall **)(__int64, __int64))(*((_QWORD *)v75 + 40) + 40LL))((__int64)v75 + 320, v79);
LOWORD(v184) = -26881;
BYTE2(v184) = 0;
(**((void (__fastcall ***)(__int64, __int64 *))v75 + 40))((__int64)v75 + 320, &v184);
v80 = cocos2d::CCSprite::createWithSpriteFrameName("dungeon_bars_bottom_001.png");
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v80, 12);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v169, 0.0, -52.0);
v82 = v81;
v83 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v19 + 200LL))(v19);
cocos2d::CCPoint::operator+(v83, &v184, v82);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64 *))(*(_QWORD *)v80 + 184LL))(v80, &v184);
v84 = (cocos2d::CCNode *)operator new(0x148u);
v184 = (__int64)v84;
cocos2d::CCNode::CCNode(v84);
*(_QWORD *)v84 = &DungeonBarsSprite::`vftable';
*((_QWORD *)v84 + 40) = 0;
if ( (unsigned __int8)DungeonBarsSprite::init(v84) )
{
cocos2d::CCObject::autorelease(v84);
}
else
{
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v84 + 8LL))(v84, 1);
v84 = nullptr;
}
*(_QWORD *)(a1 + 416) = v84;
(*(void (__fastcall **)(__int64, cocos2d::CCNode *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v84, 9);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v169, -2.0, 10.0);
v86 = v85;
v87 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v19 + 200LL))(v19);
cocos2d::CCPoint::operator+(v87, &v184, v86);
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 416) + 184LL))(*(_QWORD *)(a1 + 416), &v184);
v88 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v170[0] = (__int64)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v170[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v88 = qword_14090BFD0;
}
if ( GameManager::getUGV(v88, "13") )
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 416) + 336LL))(*(_QWORD *)(a1 + 416), 0);
*(_QWORD *)(a1 + 440) = cocos2d::CCSprite::createWithSpriteFrameName("secretEyes_01_001.png");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v170, 13.5, 6.0);
v90 = v89;
v91 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v19 + 200LL))(v19);
cocos2d::CCPoint::operator+(v91, &v184, v90);
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 440) + 184LL))(*(_QWORD *)(a1 + 440), &v184);
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 440), 10);
v92 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v184 = (__int64)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v184);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v92 = qword_14090BFD0;
}
if ( !GameManager::getUGV(v92, "12") )
goto LABEL_20;
v93 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v184 = (__int64)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v184);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v93 = qword_14090BFD0;
}
if ( GameManager::getUGV(v93, "13") )
LABEL_20:
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 440) + 336LL))(*(_QWORD *)(a1 + 440), 0);
else
SecretLayer3::animateEyes(a1);
v94 = cocos2d::CCSprite::createWithSpriteFrameName("secretBody_01_001.png");
*(_QWORD *)(a1 + 448) = v94;
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v94, 9);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v170, 0.0, -2.0);
v96 = v95;
v97 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 440) + 200LL))(*(_QWORD *)(a1 + 440));
cocos2d::CCPoint::operator+(v97, &v184, v96);
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 448) + 184LL))(*(_QWORD *)(a1 + 448), &v184);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 448) + 336LL))(*(_QWORD *)(a1 + 448), 0);
v99 = cocos2d::CCMenu::create(v98);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v99, 12);
v101 = (cocos2d::CCObject *)cocos2d::CCArray::create(v100);
*(_QWORD *)(a1 + 432) = v101;
cocos2d::CCObject::retain(v101);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v170, 160.0, 20.0);
v103 = v102;
v104 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v19 + 200LL))(v19);
cocos2d::CCPoint::operator+(v104, &v184, v103);
cocos2d::CCNode::convertToNodeSpace(v99, &v187, &v184);
v105 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v169 = (cocos2d::CCNode *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v169);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v105 = qword_14090BFD0;
}
if ( !GameManager::getUGV(v105, &word_140737D98) )
{
v106 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("secretLock01_001.png");
v107 = CCMenuItemSpriteExtra::create(v106, 0, a1, (__int64)SecretLayer3::onClick);
(*(void (__fastcall **)(__int64, struct cocos2d::CCObject *))(*(_QWORD *)v99 + 464LL))(v99, v107);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v170, -30.0, -25.0);
cocos2d::CCPoint::operator+(&v187, &v184, v108);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64 *))(*(_QWORD *)v107 + 184LL))(v107, &v184);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v107 + 64LL))(v107, 1);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 432), v107);
}
v109 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v184 = (__int64)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v184);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v109 = qword_14090BFD0;
}
if ( !GameManager::getUGV(v109, "15") )
{
v110 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("secretLock02_001.png");
v111 = CCMenuItemSpriteExtra::create(v110, 0, a1, (__int64)SecretLayer3::onClick);
(*(void (__fastcall **)(__int64, struct cocos2d::CCObject *))(*(_QWORD *)v99 + 464LL))(v99, v111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v170, 0.0, 25.0);
cocos2d::CCPoint::operator+(&v187, &v184, v112);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64 *))(*(_QWORD *)v111 + 184LL))(v111, &v184);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v111 + 64LL))(v111, 2);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 432), v111);
}
v113 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v184 = (__int64)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v184);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v113 = qword_14090BFD0;
}
if ( !GameManager::getUGV(v113, &word_140737FEC) )
{
v114 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("secretLock03_001.png");
v115 = CCMenuItemSpriteExtra::create(v114, 0, a1, (__int64)SecretLayer3::onClick);
(*(void (__fastcall **)(__int64, struct cocos2d::CCObject *))(*(_QWORD *)v99 + 464LL))(v99, v115);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v170, 30.0, -25.0);
cocos2d::CCPoint::operator+(&v187, &v184, v116);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64 *))(*(_QWORD *)v115 + 184LL))(v115, &v184);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v115 + 64LL))(v115, 3);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 432), v115);
}
v117 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v184 = (__int64)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v184);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v117 = qword_14090BFD0;
}
if ( !GameManager::getUGV(v117, "12") )
{
for ( j = 0; j < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 432)); ++j )
{
v119 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 432), j);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v119 + 936LL))(v119, 0);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v119 + 336LL))(v119, 0);
}
}
v184 = (__int64)&v181;
v181 = 0;
v182 = 4;
v183 = 15;
strcpy((char *)&v181, "0001");
v120 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v170[0] = (__int64)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v170[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v120 = qword_14090BFE0;
}
if ( !GameStatsManager::isSpecialChestUnlocked(v120, &v181) )
{
v184 = (__int64)&v170[1];
*(_OWORD *)&v170[1] = 0;
v171 = 4;
v172 = 15;
strcpy((char *)&v170[1], "0001");
v170[0] = (__int64)&v170[1];
v121 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v169 = (cocos2d::CCNode *)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480((__int64)v169);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v121 = qword_14090BFE0;
}
v122 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(v121 + 368), &v170[1]);
sub_14003D310((__int64)&v170[1]);
v123 = GJChestSprite::create(*(_DWORD *)(v122 + 64));
GJChestSprite::switchToState(v123, 2, 0);
(*(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v123 + 160LL))(v123);
LOWORD(v184) = -14136;
BYTE2(v184) = -1;
v124 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v123 + 480LL))(v123);
v125 = cocos2d::CCArray::objectAtIndex(v124, 0);
(**((void (__fastcall ***)(__int64, __int64 *))v125 + 40))((__int64)v125 + 320, &v184);
v184 = (__int64)operator new(0x208u);
v126 = (void **)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(v184);
if ( v126 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v126, (__int64 *)v123, 0, a1, (__int64)SecretLayer3::onChest01) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v126);
LABEL_48:
v175 = 14;
v176 = 15;
strcpy(Src, "chestClick.ogg");
v174 = 0;
v184 = (__int64)Src;
if ( v126 + 56 != (void **)Src )
sub_1400405A0(v126 + 56, Src, 0xEu);
sub_14003D310((__int64)Src);
v127 = (void (__fastcall **)(void **, _QWORD))*v126;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v184, 60.000004, 48.0);
v127[39](v126, v128);
v129 = *(_QWORD *)v123;
v130 = *(float *)((*((__int64 (__fastcall **)(void **))*v126 + 40))(v126) + 4) * 0.5;
v131 = (float *)(*((__int64 (__fastcall **)(void **))*v126 + 40))(v126);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v184, *v131 * 0.5, v130);
(*(void (__fastcall **)(cocos2d::CCSprite *, __int64))(v129 + 184))(v123, v132);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v99 + 464LL))(v99, v126);
v133 = (void (__fastcall **)(void **, _QWORD))*v126;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v184, v185 - 80.0, 60.0);
cocos2d::CCNode::convertToNodeSpace(v99, v170, v134);
v133[23](v126, v135);
goto LABEL_51;
}
(*((void (__fastcall **)(void **, __int64))*v126 + 1))(v126, 1);
}
v126 = nullptr;
goto LABEL_48;
}
LABEL_51:
v169 = (cocos2d::CCNode *)&v170[1];
*(_OWORD *)&v170[1] = 0;
v171 = 4;
v172 = 15;
strcpy((char *)&v170[1], "0002");
v136 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v180 = (__int64 *)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480((__int64)v180);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v136 = qword_14090BFE0;
}
if ( !GameStatsManager::isSpecialChestUnlocked(v136, &v170[1]) )
{
v138 = cocos2d::CCMenu::create(v137);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v138, 10);
v184 = (__int64)&v170[1];
*(_OWORD *)&v170[1] = 0;
v171 = 4;
v172 = 15;
strcpy((char *)&v170[1], "0002");
v180 = &v170[1];
v139 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v170[0] = (__int64)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v170[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v139 = qword_14090BFE0;
}
v140 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(v139 + 368), &v170[1]);
sub_14003D310((__int64)&v170[1]);
v141 = GJChestSprite::create(*(_DWORD *)(v140 + 64));
GJChestSprite::switchToState(v141, 2, 0);
(*(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v141 + 160LL))(v141);
v184 = (__int64)operator new(0x208u);
v142 = (void **)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(v184);
if ( v142 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v142, (__int64 *)v141, 0, a1, (__int64)SecretLayer3::onChest02) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v142);
LABEL_61:
*(_QWORD *)(a1 + 456) = v142;
v177[15] = 0;
v178 = 14;
v179 = 15;
strcpy(v177, "chestClick.ogg");
v184 = (__int64)v177;
if ( v142 + 56 != (void **)v177 )
sub_1400405A0(v142 + 56, v177, 0xEu);
sub_14003D310((__int64)v177);
v143 = **(_QWORD **)(a1 + 456);
v144 = *(_QWORD *)(a1 + 456);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v184, 60.000004, 48.0);
(*(void (__fastcall **)(__int64, __int64))(v143 + 312))(v144, v145);
v146 = *(_QWORD *)v141;
v147 = *(float *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 456) + 320LL))(*(_QWORD *)(a1 + 456))
+ 4)
* 0.5;
v148 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 456) + 320LL))(*(_QWORD *)(a1 + 456));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v184, *v148 * 0.5, v147);
(*(void (__fastcall **)(cocos2d::CCSprite *, __int64))(v146 + 184))(v141, v149);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v138 + 464LL))(v138, *(_QWORD *)(a1 + 456));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v180, 0.0, -24.0);
v151 = v150;
v152 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v19 + 200LL))(v19);
cocos2d::CCPoint::operator+(v152, &v184, v151);
v153 = **(_QWORD **)(a1 + 456);
v154 = *(_QWORD *)(a1 + 456);
cocos2d::CCNode::convertToNodeSpace(v138, v170, &v184);
(*(void (__fastcall **)(__int64, __int64))(v153 + 184))(v154, v155);
*(_BYTE *)(*(_QWORD *)(a1 + 456) + 408LL) = 0;
*(_BYTE *)(*(_QWORD *)(a1 + 456) + 409LL) = 1;
v156 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v169 = (cocos2d::CCNode *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v169);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v156 = qword_14090BFD0;
}
if ( !GameManager::getUGV(v156, "13") )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 456) + 936LL))(*(_QWORD *)(a1 + 456), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 456) + 336LL))(*(_QWORD *)(a1 + 456), 0);
}
goto LABEL_67;
}
(*((void (__fastcall **)(void **, __int64))*v142 + 1))(v142, 1);
}
v142 = nullptr;
goto LABEL_61;
}
LABEL_67:
v157 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png");
v184 = (__int64)operator new(0x208u);
v158 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(v184);
if ( !v158 )
{
LABEL_71:
v158 = 0;
goto LABEL_72;
}
if ( !CCMenuItemSpriteExtra::init((__int64 *)v158, v157, 0, a1, (__int64)SecretLayer3::onBack) )
{
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v158 + 8LL))(v158, 1);
goto LABEL_71;
}
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v158);
LABEL_72:
*(_DWORD *)(v158 + 372) = 1069547520;
v159 = cocos2d::CCMenu::create((struct cocos2d::CCMenuItem *)v158, 0);
(*(void (__fastcall **)(__int64, struct cocos2d::CCMenu *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v159, 1);
v160 = *(_QWORD *)v159;
v162 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v161);
v163 = cocos2d::CCDirector::getScreenTop(v162) - 23.0;
v165 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v164);
v166 = cocos2d::CCDirector::getScreenLeft(v165) + 24.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v184, v166, v163);
(*(void (__fastcall **)(struct cocos2d::CCMenu *, __int64))(v160 + 184))(v159, v167);
if ( *(_BYTE *)(cocos2d::CCApplication::sharedApplication(v168) + 209) )
GameToolbox::addBackButton(a1, v158);
return 1;
}