//
// SecretLayer3::init from 0x10049c5d0 to 0x10049db2a (5466 bytes)
//
// 3 xrefs:
// > SecretLayer3::scene @ 0x100499d89
// > SecretLayer3::create @ 0x10049c595
// > ??> @ 0x100b509f8
//
// 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 12:30:51 +0000
//
__int64 __fastcall SecretLayer3::init(__int64 a1, double a2)
{
__int64 result; // rax
int v4; // r14d
__int64 v5; // rax
__int64 v6; // rax
__int64 v7; // rax
__int64 v8; // rax
float *v9; // r14
double v10; // xmm0_8
char *v11; // r15
double v12; // xmm0_8
char *v13; // r14
double v14; // xmm0_8
char *v15; // r15
double v16; // xmm0_8
char *v17; // r14
__int64 v18; // rax
char *v19; // rdi
__int64 v20; // r14
__int64 v21; // r13
__int64 v22; // r12
__int64 v23; // rax
const char *CString; // rax
__int64 v25; // rax
__int64 v26; // r12
__int64 v27; // rax
const char *v28; // rax
__int64 v29; // rax
__int64 v30; // r12
__int64 v31; // rax
const char *v32; // rax
__int64 v33; // rax
__int64 v34; // r12
__int64 v35; // rax
const char *v36; // rax
__int64 v37; // rax
__int64 v38; // r12
__int64 v39; // rax
const char *v40; // rax
__int64 v41; // rax
__int64 v42; // r12
__int64 v43; // rax
const char *v44; // rax
__int64 v45; // rax
__int64 v46; // r12
__int64 v47; // rax
const char *v48; // rax
__int64 v49; // rax
__int64 v50; // r12
__int64 v51; // rax
const char *v52; // rax
__int64 v53; // rax
__int64 v54; // r12
__int64 v55; // rax
const char *v56; // rax
__int64 v57; // rax
__int64 v58; // r12
__int64 v59; // rax
const char *v60; // rax
__int64 v61; // rax
__int64 v62; // r12
__int64 v63; // rax
const char *v64; // rax
__int64 v65; // rax
__int64 v66; // r12
__int64 v67; // rax
const char *v68; // rax
__int64 v69; // rax
__int64 v70; // r12
__int64 v71; // rax
const char *v72; // rax
__int64 v73; // rax
__int64 v74; // r12
__int64 v75; // rax
const char *v76; // rax
__int64 v77; // rax
__int64 v78; // r12
__int64 v79; // rax
const char *v80; // rax
__int64 v81; // rax
__int64 v82; // r12
__int64 v83; // rax
const char *v84; // rax
__int64 v85; // rax
__int64 v86; // r12
__int64 v87; // rax
const char *v88; // rax
__int64 v89; // rax
__int64 v90; // r12
__int64 v91; // rax
const char *v92; // rax
__int64 v93; // rax
_QWORD *v94; // rax
char *v95; // rax
_DWORD *v96; // rax
char *v97; // r14
_QWORD *v98; // rax
char *v99; // rax
_DWORD *v100; // rax
char *v101; // r13
unsigned __int64 *v102; // r12
_OWORD *v103; // rax
__int64 v104; // r14
_OWORD *v105; // rax
__int64 v106; // rax
__int64 v107; // rax
_DWORD *v108; // rax
_OWORD *v109; // rax
__int64 v110; // r14
_OWORD *v111; // rax
__int64 v112; // rax
__int64 v113; // rax
_DWORD *v114; // rax
char *v115; // r13
__int64 v116; // rax
char *v117; // rbx
unsigned __int64 *v118; // r14
double v119; // xmm0_8
char *v120; // r14
__int64 v121; // rax
char *v122; // rdi
_QWORD *v123; // rbx
unsigned __int64 *v124; // r15
double v125; // xmm0_8
char *v126; // r14
unsigned __int64 *v127; // r15
__int64 v128; // rax
__int64 v129; // r14
unsigned __int64 *v130; // r15
double v131; // xmm0_8
__int64 v132; // rax
char *v133; // r14
unsigned __int64 *v134; // r15
double v135; // xmm0_8
__int64 v136; // rax
__int64 v137; // rax
char *v138; // rax
__int64 v139; // r14
unsigned __int64 *v140; // r15
__int64 v141; // r15
__int64 v142; // rax
unsigned __int64 *v143; // r14
__int64 v144; // xmm0_8
__int64 v145; // xmm1_8
__int64 v146; // rax
char *v147; // rax
void *v148; // r14
__int64 v149; // rax
char *v150; // rax
void *v151; // r14
__int64 v152; // rax
char *v153; // rax
void *v154; // r14
__int64 v155; // rax
unsigned int v156; // r14d
__int64 v157; // r12
__int64 v158; // rax
bool isSpecialChestUnlocked; // r14
__int64 v160; // rax
__int64 RewardForSpecialChest; // r14
_QWORD *v162; // r14
__int64 v163; // rax
__int64 v164; // rax
char *v165; // r12
__int64 v166; // rax
__int64 v167; // rax
bool v168; // r14
__int64 v169; // r14
__int64 v170; // rax
__int64 v171; // r15
_QWORD *v172; // r15
char *v173; // rax
__int64 v174; // r12
__int64 v175; // rax
__int64 v176; // r15
unsigned __int64 *v177; // r12
__int64 v178; // rax
char *v179; // rax
void *v180; // r14
int v181; // edx
int v182; // ecx
int v183; // r8d
int v184; // r9d
__int64 v185; // r15
__int64 v186; // rax
__int64 v187; // rax
float v188; // xmm1_4
double v189; // xmm0_8
char v190; // [rsp+0h] [rbp-120h]
char v191; // [rsp+0h] [rbp-120h]
char v192; // [rsp+0h] [rbp-120h]
char v193; // [rsp+0h] [rbp-120h]
char v194; // [rsp+0h] [rbp-120h]
char v195; // [rsp+0h] [rbp-120h]
char v196; // [rsp+0h] [rbp-120h]
char v197; // [rsp+0h] [rbp-120h]
char v198; // [rsp+0h] [rbp-120h]
char v199; // [rsp+0h] [rbp-120h]
char v200; // [rsp+0h] [rbp-120h]
char v201; // [rsp+0h] [rbp-120h]
char v202; // [rsp+0h] [rbp-120h]
char v203; // [rsp+0h] [rbp-120h]
char v204; // [rsp+0h] [rbp-120h]
char v205; // [rsp+0h] [rbp-120h]
char v206; // [rsp+0h] [rbp-120h]
char v207; // [rsp+0h] [rbp-120h]
unsigned __int64 v208; // [rsp+8h] [rbp-118h] BYREF
void *v209[3]; // [rsp+10h] [rbp-110h] BYREF
char v210; // [rsp+28h] [rbp-F8h] BYREF
char v211[15]; // [rsp+29h] [rbp-F7h] BYREF
void *v212; // [rsp+38h] [rbp-E8h]
char v213; // [rsp+40h] [rbp-E0h] BYREF
char v214[15]; // [rsp+41h] [rbp-DFh] BYREF
void *v215; // [rsp+50h] [rbp-D0h]
char v216; // [rsp+58h] [rbp-C8h] BYREF
char v217[15]; // [rsp+59h] [rbp-C7h] BYREF
void *v218; // [rsp+68h] [rbp-B8h]
char v219; // [rsp+70h] [rbp-B0h] BYREF
char v220[15]; // [rsp+71h] [rbp-AFh] BYREF
void *v221; // [rsp+80h] [rbp-A0h]
std::string __str; // [rsp+88h] [rbp-98h] BYREF
std::string v223; // [rsp+A0h] [rbp-80h] BYREF
_QWORD *v224; // [rsp+B8h] [rbp-68h]
unsigned __int64 v225; // [rsp+C0h] [rbp-60h] BYREF
char *v226; // [rsp+C8h] [rbp-58h]
char *v227; // [rsp+D0h] [rbp-50h]
__int64 v228; // [rsp+DCh] [rbp-44h] BYREF
unsigned __int8 v229; // [rsp+E7h] [rbp-39h]
unsigned __int64 v230; // [rsp+E8h] [rbp-38h] BYREF
unsigned __int64 v231[6]; // [rsp+F0h] [rbp-30h] BYREF
result = cocos2d::CCLayer::init(a1);
if ( (_BYTE)result )
{
v229 = result;
v4 = cocos2d::CCTexture2D::defaultAlphaPixelFormat();
cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(0);
v5 = cocos2d::CCTextureCache::sharedTextureCache(0);
cocos2d::CCTextureCache::addImage(v5, "DungeonSheet.png", 0);
v6 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile_2(v6, "DungeonSheet.plist", a2);
cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(v4);
v7 = GameManager::sharedState();
strcpy((char *)v209, " secretLoop02.mp3");
GameManager::fadeInMusic(*(__m128 *)"secretLoop02.mp3", v7, (unsigned __int8 *)v209);
if ( ((__int64)v209[0] & 1) != 0 )
operator delete(v209[2]);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1072LL))(a1, 1);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1088LL))(a1, 1);
v8 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v228, v8);
v9 = (float *)cocos2d::CCSprite::create_1((__int64)"GJ_gradientBG.png");
sub_100278250((float *)v231, 0.0, 0.0);
(*(void (__fastcall **)(float *, unsigned __int64 *))(*(_QWORD *)v9 + 296LL))(v9, v231);
(*(void (__fastcall **)(__int64, float *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v9, 4294967293LL);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v9 + 128LL))(v9, (float)(*(float *)&v228 + 10.0) / v9[108]);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v9 + 144LL))(
v9,
(float)(*((float *)&v228 + 1) + 10.0) / v9[109]);
sub_100278250((float *)v231, -5.0, -5.0);
(*(void (__fastcall **)(float *, unsigned __int64 *))(*(_QWORD *)v9 + 184LL))(v9, v231);
BYTE2(v231[0]) = 30;
LOWORD(v231[0]) = 1280;
v10 = (*(double (__fastcall **)(float *, unsigned __int64 *))(*(_QWORD *)v9 + 960LL))(v9, v231);
v11 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"dungeon_gate_001.png", v10);
(*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v11, 2);
sub_100278250((float *)v231, *(float *)&v228 * 0.5, (float)(*((float *)&v228 + 1) * 0.5) + -5.0);
v227 = v11;
v12 = (*(double (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v11 + 184LL))(v11, v231);
v13 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"dungeon_foreground_001.png", v12);
(*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v13, 3);
sub_100278250((float *)v231, *(float *)&v228 * 0.5, 15.0);
v14 = (*(double (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v13 + 184LL))(v13, v231);
v15 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"Fire_02_looped_001.png", v14);
(*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v15, 4);
sub_100278250((float *)v231, (float)(*(float *)&v228 * 0.5) + -160.0, (float)(*((float *)&v228 + 1) * 0.5) + 50.0);
v16 = (*(double (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v15 + 184LL))(v15, v231);
v17 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"Fire_02_looped_001.png", v16);
(*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v17, 3);
*(float *)&v16 = (*(float (__fastcall **)(char *))(*(_QWORD *)v15 + 168LL))(v15);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v17 + 160LL))(v17, *(float *)&v16 + *(float *)&v16);
v18 = (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v15 + 192LL))(v15);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v17 + 184LL))(v17, v18);
BYTE2(v231[0]) = 0;
LOWORD(v231[0]) = 255;
v226 = v15;
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v15 + 960LL))(v15, v231);
BYTE2(v231[0]) = 0;
LOWORD(v231[0]) = -1;
v224 = v17;
v19 = v17;
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v17 + 960LL))(v17, v231);
v20 = sub_1007FE900(v17);
v21 = sub_1007FE900(v19);
v22 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v23 = sub_10088E820("Fire_02_looped_%03i.png", v190);
CString = (const char *)cocos2d::CCString::getCString(v23);
v25 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v22, CString);
sub_1007FEBF0(v20, v25);
v26 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v27 = sub_10088E820("Fire_02_2_looped_%03i.png", v191);
v28 = (const char *)cocos2d::CCString::getCString(v27);
v29 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v26, v28);
sub_1007FEBF0(v21, v29);
v30 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v31 = sub_10088E820("Fire_02_looped_%03i.png", v192);
v32 = (const char *)cocos2d::CCString::getCString(v31);
v33 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v30, v32);
sub_1007FEBF0(v20, v33);
v34 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v35 = sub_10088E820("Fire_02_2_looped_%03i.png", v193);
v36 = (const char *)cocos2d::CCString::getCString(v35);
v37 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v34, v36);
sub_1007FEBF0(v21, v37);
v38 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v39 = sub_10088E820("Fire_02_looped_%03i.png", v194);
v40 = (const char *)cocos2d::CCString::getCString(v39);
v41 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v38, v40);
sub_1007FEBF0(v20, v41);
v42 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v43 = sub_10088E820("Fire_02_2_looped_%03i.png", v195);
v44 = (const char *)cocos2d::CCString::getCString(v43);
v45 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v42, v44);
sub_1007FEBF0(v21, v45);
v46 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v47 = sub_10088E820("Fire_02_looped_%03i.png", v196);
v48 = (const char *)cocos2d::CCString::getCString(v47);
v49 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v46, v48);
sub_1007FEBF0(v20, v49);
v50 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v51 = sub_10088E820("Fire_02_2_looped_%03i.png", v197);
v52 = (const char *)cocos2d::CCString::getCString(v51);
v53 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v50, v52);
sub_1007FEBF0(v21, v53);
v54 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v55 = sub_10088E820("Fire_02_looped_%03i.png", v198);
v56 = (const char *)cocos2d::CCString::getCString(v55);
v57 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v54, v56);
sub_1007FEBF0(v20, v57);
v58 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v59 = sub_10088E820("Fire_02_2_looped_%03i.png", v199);
v60 = (const char *)cocos2d::CCString::getCString(v59);
v61 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v58, v60);
sub_1007FEBF0(v21, v61);
v62 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v63 = sub_10088E820("Fire_02_looped_%03i.png", v200);
v64 = (const char *)cocos2d::CCString::getCString(v63);
v65 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v62, v64);
sub_1007FEBF0(v20, v65);
v66 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v67 = sub_10088E820("Fire_02_2_looped_%03i.png", v201);
v68 = (const char *)cocos2d::CCString::getCString(v67);
v69 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v66, v68);
sub_1007FEBF0(v21, v69);
v70 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v71 = sub_10088E820("Fire_02_looped_%03i.png", v202);
v72 = (const char *)cocos2d::CCString::getCString(v71);
v73 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v70, v72);
sub_1007FEBF0(v20, v73);
v74 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v75 = sub_10088E820("Fire_02_2_looped_%03i.png", v203);
v76 = (const char *)cocos2d::CCString::getCString(v75);
v77 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v74, v76);
sub_1007FEBF0(v21, v77);
v78 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v79 = sub_10088E820("Fire_02_looped_%03i.png", v204);
v80 = (const char *)cocos2d::CCString::getCString(v79);
v81 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v78, v80);
sub_1007FEBF0(v20, v81);
v82 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v83 = sub_10088E820("Fire_02_2_looped_%03i.png", v205);
v84 = (const char *)cocos2d::CCString::getCString(v83);
v85 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v82, v84);
sub_1007FEBF0(v21, v85);
v86 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v87 = sub_10088E820("Fire_02_looped_%03i.png", v206);
v88 = (const char *)cocos2d::CCString::getCString(v87);
v89 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v86, v88);
sub_1007FEBF0(v20, v89);
v90 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v91 = sub_10088E820("Fire_02_2_looped_%03i.png", v207);
v92 = (const char *)cocos2d::CCString::getCString(v91);
v93 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v90, v92);
sub_1007FEBF0(v21, v93);
v94 = cocos2d::CCAnimation::createWithSpriteFrames(v20, 0.079999998);
v95 = cocos2d::CCAnimate::create((__int64)v94);
v96 = cocos2d::CCRepeatForever::create((__int64)v95);
v97 = v226;
cocos2d::CCNode::runAction((__int64)v226, (__int64)v96);
v98 = cocos2d::CCAnimation::createWithSpriteFrames(v21, 0.079999998);
v99 = cocos2d::CCAnimate::create((__int64)v98);
v100 = cocos2d::CCRepeatForever::create((__int64)v99);
cocos2d::CCNode::runAction((__int64)v224, (__int64)v100);
v101 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"dungeonShine_001.png", COERCE_DOUBLE(1034147594));
v102 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v97 + 192LL))(v97);
sub_100278250((float *)&v230, 0.0, -10.0);
sub_100278350((double *)v231, v102, &v230);
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v101 + 184LL))(v101, v231);
(*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v101, 5);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v101 + 160LL))(v101, 1.2);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v101 + 1080LL))(v101, 0x100000302LL);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v101 + 912LL))(v101, 200);
BYTE2(v231[0]) = 0;
LOWORD(v231[0]) = -14081;
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v101 + 960LL))(v101, v231);
v103 = cocos2d::CCFadeTo::create(160, (__m128)0x3FCCCCCDu);
v104 = cocos2d::CCEaseInOut::create(v103, 1.3);
v105 = cocos2d::CCFadeTo::create(225, (__m128)0x3FCCCCCDu);
v106 = cocos2d::CCEaseInOut::create(v105, 1.3);
v107 = sub_10039EB60(v104, v106, 0);
v108 = cocos2d::CCRepeatForever::create(v107);
cocos2d::CCNode::runAction((__int64)v101, (__int64)v108);
v109 = cocos2d::CCScaleTo::create_1((__m128)0x3F800000u, 1.0);
v110 = cocos2d::CCEaseInOut::create(v109, 1.5);
v111 = cocos2d::CCScaleTo::create_1((__m128)0x3F800000u, 1.2);
v112 = cocos2d::CCEaseInOut::create(v111, 1.5);
v113 = sub_10039EB60(v110, v112, 0);
v114 = cocos2d::CCRepeatForever::create(v113);
cocos2d::CCNode::runAction((__int64)v101, (__int64)v114);
v115 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"dungeonTorch_001.png", COERCE_DOUBLE(1069547520));
(*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v115, 6);
v116 = *(_QWORD *)v226;
v224 = (_QWORD *)a1;
v117 = v226;
v118 = (unsigned __int64 *)(*(__int64 (**)(void))(v116 + 192))();
sub_100278250((float *)&v230, -1.0, -10.0);
sub_100278350((double *)v231, v118, &v230);
v119 = (*(double (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v115 + 184LL))(v115, v231);
v120 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"dungeonShine_001.png", v119);
v121 = *(_QWORD *)v117;
v122 = v117;
v123 = v224;
v124 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(v121 + 192))(v122);
sub_100278250((float *)&v230, 0.0, -14.0);
sub_100278350((double *)v231, v124, &v230);
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v120 + 184LL))(v120, v231);
(*(void (__fastcall **)(_QWORD *, char *, __int64))(*v123 + 464LL))(v123, v120, 7);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v120 + 160LL))(v120, 0.60000002);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v120 + 1080LL))(v120, 0x100000302LL);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v120 + 912LL))(v120, 175);
BYTE2(v231[0]) = 0;
LOWORD(v231[0]) = -26881;
v125 = (*(double (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v120 + 960LL))(v120, v231);
v126 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"dungeon_bars_bottom_001.png", v125);
(*(void (__fastcall **)(_QWORD *, char *, __int64))(*v123 + 464LL))(v123, v126, 12);
v127 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v227 + 192LL))(v227);
sub_100278250((float *)&v230, 0.0, -52.0);
sub_100278350((double *)v231, v127, &v230);
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v126 + 184LL))(v126, v231);
v128 = DungeonBarsSprite::create();
v123[52] = v128;
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*v123 + 464LL))(v123, v128, 9);
v129 = v123[52];
v130 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v227 + 192LL))(v227);
*(_QWORD *)&v131 = 3221225472LL;
sub_100278250((float *)&v230, -2.0, 10.0);
sub_100278350((double *)v231, v130, &v230);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v129 + 184LL))(v129, v231);
v132 = GameManager::sharedState();
if ( (unsigned __int8)GameManager::getUGV(v132, "13") )
v131 = (*(double (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)v123[52] + 344LL))(v123[52], 0);
v133 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"secretEyes_01_001.png", v131);
v123[55] = v133;
v134 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v227 + 192LL))(v227);
*(_QWORD *)&v135 = 1096286208;
sub_100278250((float *)&v230, 13.5, 6.0);
sub_100278350((double *)v231, v134, &v230);
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v133 + 184LL))(v133, v231);
(*(void (__fastcall **)(_QWORD *, _QWORD, __int64))(*v123 + 464LL))(v123, v123[55], 10);
v136 = GameManager::sharedState();
if ( (unsigned __int8)GameManager::getUGV(v136, "12")
&& (v137 = GameManager::sharedState(), !(unsigned __int8)GameManager::getUGV(v137, "13")) )
{
v135 = SecretLayer3::animateEyes(v123);
}
else
{
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)v123[55] + 344LL))(v123[55], 0);
}
v138 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"secretBody_01_001.png", v135);
v123[56] = v138;
(*(void (__fastcall **)(_QWORD *, char *, __int64))(*v123 + 464LL))(v123, v138, 9);
v139 = v123[56];
v140 = (unsigned __int64 *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v123[55] + 192LL))(v123[55]);
sub_100278250((float *)&v230, 0.0, -2.0);
sub_100278350((double *)v231, v140, &v230);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v139 + 184LL))(v139, v231);
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)v123[56] + 344LL))(v123[56], 0);
v141 = cocos2d::CCMenu::create();
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*v123 + 464LL))(v123, v141, 12);
v142 = sub_1007FE900(v123);
v123[54] = v142;
cocos2d::CCObject::retain(v142);
v143 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v227 + 192LL))(v227);
v144 = 1126170624;
v145 = 1101004800;
sub_100278250((float *)&v225, 160.0, 20.0);
sub_100278350((double *)&v230, v143, &v225);
cocos2d::CCNode::convertToNodeSpace((double *)v231, v141, (unsigned int *)&v230);
v146 = GameManager::sharedState();
if ( !(unsigned __int8)GameManager::getUGV(v146, "14") )
{
v147 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"secretLock01_001.png", COERCE_DOUBLE(1126170624));
v148 = CCMenuItemSpriteExtra::create((__int64)v147, 0, (__int64)v123, (__int64)SecretLayer3::onClick, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v141 + 456LL))(v141, v148);
v144 = 3253731328LL;
v145 = 3251109888LL;
sub_100278250((float *)&v225, -30.0, -25.0);
sub_100278350((double *)&v230, v231, &v225);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v148 + 184LL))(v148, &v230);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v148 + 72LL))(v148, 1);
sub_1007FEBF0(v123[54], v148);
}
v149 = GameManager::sharedState();
if ( !(unsigned __int8)GameManager::getUGV(v149, "15") )
{
v150 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"secretLock02_001.png", *(double *)&v144);
v151 = CCMenuItemSpriteExtra::create((__int64)v150, 0, (__int64)v123, (__int64)SecretLayer3::onClick, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v141 + 456LL))(v141, v151);
v145 = 1103626240;
*(double *)&v144 = 0.0;
sub_100278250((float *)&v225, 0.0, 25.0);
sub_100278350((double *)&v230, v231, &v225);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v151 + 184LL))(v151, &v230);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v151 + 72LL))(v151, 2);
sub_1007FEBF0(v123[54], v151);
}
v152 = GameManager::sharedState();
if ( !(unsigned __int8)GameManager::getUGV(v152, "16") )
{
v153 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"secretLock03_001.png", *(double *)&v144);
v154 = CCMenuItemSpriteExtra::create((__int64)v153, 0, (__int64)v123, (__int64)SecretLayer3::onClick, 0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v141 + 456LL))(v141, v154);
v144 = 1106247680;
v145 = 3251109888LL;
sub_100278250((float *)&v225, 30.0, -25.0);
sub_100278350((double *)&v230, v231, &v225);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v154 + 184LL))(v154, &v230);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v154 + 72LL))(v154, 3);
sub_1007FEBF0(v123[54], v154);
}
v155 = GameManager::sharedState();
if ( !(unsigned __int8)GameManager::getUGV(v155, "12") && (unsigned int)sub_1007FEF90(v123[54]) )
{
v156 = 0;
do
{
v157 = sub_1007FEFE0(v123[54], v156);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v157 + 1056LL))(v157, 0);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v157 + 344LL))(v157, 0);
++v156;
}
while ( v156 < (unsigned int)sub_1007FEF90(v123[54]) );
}
v158 = GameStatsManager::sharedState();
v210 = 8;
strcpy(v211, "0001");
isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked(v158, (__int64)&v210);
if ( (v210 & 1) != 0 )
operator delete(v212);
if ( !isSpecialChestUnlocked )
{
v160 = GameStatsManager::sharedState();
v213 = 8;
strcpy(v214, "0001");
RewardForSpecialChest = GameStatsManager::getRewardForSpecialChest(v160, (__int64)&v213);
if ( (v213 & 1) != 0 )
operator delete(v215);
v162 = GJChestSprite::create(*(_DWORD *)(RewardForSpecialChest + 64));
GJChestSprite::switchToState(v162, 2, 0, *(double *)&v144, *(double *)&v145, (__m128)0x3F000000u);
(*(void (__fastcall **)(_QWORD *, float))(*v162 + 160LL))(v162, 0.60000002);
v163 = (*(__int64 (__fastcall **)(_QWORD *))(*v162 + 488LL))(v162);
v164 = sub_1007FEFE0(v163, 0);
BYTE2(v230) = -1;
LOWORD(v230) = -14136;
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v164 + 960LL))(v164, &v230);
v165 = (char *)CCMenuItemSpriteExtra::create((__int64)v162, 0, (__int64)v123, (__int64)SecretLayer3::onChest01, 0);
__str.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)28;
strcpy(__str.__r_.__value_.__s.__data_, "chestClick.ogg");
std::string::operator=((std::string *)(v165 + 440), &__str);
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__str.__r_.__value_.__l.__data_);
sub_100278260((float *)&v230, 60.000004, 48.0);
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v165 + 320LL))(v165, &v230);
*(float *)&v226 = *(float *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v165 + 328LL))(v165) * 0.5;
v166 = (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v165 + 328LL))(v165);
sub_100278250((float *)&v230, *(float *)&v226, *(float *)(v166 + 4) * 0.5);
(*(void (__fastcall **)(_QWORD *, unsigned __int64 *))(*v162 + 184LL))(v162, &v230);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v141 + 456LL))(v141, v165);
v144 = (unsigned int)v228;
*(float *)&v144 = *(float *)&v228 + -80.0;
v145 = 1114636288;
sub_100278250((float *)&v225, *(float *)&v228 + -80.0, 60.0);
cocos2d::CCNode::convertToNodeSpace((double *)&v230, v141, (unsigned int *)&v225);
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v165 + 184LL))(v165, &v230);
}
v167 = GameStatsManager::sharedState();
v216 = 8;
strcpy(v217, "0002");
v168 = GameStatsManager::isSpecialChestUnlocked(v167, (__int64)&v216);
if ( (v216 & 1) != 0 )
operator delete(v218);
if ( !v168 )
{
v169 = cocos2d::CCMenu::create();
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*v123 + 464LL))(v123, v169, 10);
v170 = GameStatsManager::sharedState();
v219 = 8;
strcpy(v220, "0002");
v171 = GameStatsManager::getRewardForSpecialChest(v170, (__int64)&v219);
if ( (v219 & 1) != 0 )
operator delete(v221);
v172 = GJChestSprite::create(*(_DWORD *)(v171 + 64));
GJChestSprite::switchToState(v172, 2, 0, *(double *)&v144, *(double *)&v145, (__m128)0x3F000000u);
(*(void (__fastcall **)(_QWORD *, float))(*v172 + 160LL))(v172, 0.60000002);
v173 = (char *)CCMenuItemSpriteExtra::create((__int64)v172, 0, (__int64)v123, (__int64)SecretLayer3::onChest02, 0);
v123[57] = v173;
v223.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)28;
strcpy(v223.__r_.__value_.__s.__data_, "chestClick.ogg");
std::string::operator=((std::string *)(v173 + 440), &v223);
if ( (*(_BYTE *)&v223.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v223.__r_.__value_.__l.__data_);
v174 = v123[57];
sub_100278260((float *)&v230, 60.000004, 48.0);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v174 + 320LL))(v174, &v230);
*(float *)&v226 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v123[57] + 328LL))(v123[57]) * 0.5;
v175 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v123[57] + 328LL))(v123[57]);
sub_100278250((float *)&v230, *(float *)&v226, 0.5 * *(float *)(v175 + 4));
(*(void (__fastcall **)(_QWORD *, unsigned __int64 *))(*v172 + 184LL))(v172, &v230);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v169 + 456LL))(v169, v123[57]);
v176 = v123[57];
v177 = (unsigned __int64 *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v227 + 192LL))(v227);
*(double *)&v144 = 0.0;
sub_100278250((float *)&v208, 0.0, -24.0);
sub_100278350((double *)&v225, v177, &v208);
cocos2d::CCNode::convertToNodeSpace((double *)&v230, v169, (unsigned int *)&v225);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v176 + 184LL))(v176, &v230);
*(_WORD *)(v123[57] + 408LL) = 256;
v178 = GameManager::sharedState();
if ( !(unsigned __int8)GameManager::getUGV(v178, "13") )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)v123[57] + 1056LL))(v123[57], 0);
*(double *)&v144 = (*(double (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)v123[57] + 344LL))(v123[57], 0);
}
}
v179 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_arrow_03_001.png", *(double *)&v144);
v180 = CCMenuItemSpriteExtra::create((__int64)v179, 0, (__int64)v123, (__int64)SecretLayer3::onBack, 0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v180, 1.5);
v185 = sub_1008735E0((_DWORD)v180, 0, v181, v182, v183, v184);
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*v123 + 464LL))(v123, v185, 1);
v186 = cocos2d::CCDirector::sharedDirector();
*(float *)&v227 = sub_100479760(v186) + 24.0;
v187 = cocos2d::CCDirector::sharedDirector();
v188 = sub_100479740(v187) + -23.0;
sub_100278250((float *)&v230, *(float *)&v227, v188);
v189 = (*(double (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v185 + 184LL))(v185, &v230);
if ( (unsigned __int8)PlatformToolbox::isControllerConnected(v189) )
GameToolbox::addBackButton(v123, v180);
return v229;
}
return result;
}