// // SecretRewardsLayer::init from 0x140568040 to 0x14056a707 (9927 bytes) // // 2 xrefs: // > SecretRewardsLayer::scene @ 0x140567fe8 // > @ 0x14092c5b8 // // 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:19 +0000 // // Hidden C++ exception states: #wind=23 bool __fastcall SecretRewardsLayer::init(__int64 a1, char a2) { bool result; // al __int64 v4; // rcx cocos2d::CCTextureCache *v5; // rax __int64 v6; // rdx __int64 v7; // rcx cocos2d::CCSpriteFrameCache *v8; // rax __int64 v9; // rdx __int64 v10; // rdx __int64 v11; // rcx __int64 v12; // rax __int64 v13; // rcx __int64 v14; // rcx __int64 v15; // rcx __int64 v16; // rax struct cocos2d::CCSprite *v17; // rdi __int64 v18; // rbx __int64 v19; // rax __int64 v20; // rdi __int64 v21; // rbx __int64 v22; // rax struct cocos2d::CCSprite *v23; // rdi __int64 v24; // rbx __int64 v25; // rax __int64 v26; // rbx __int64 v27; // rax __int64 v28; // rdx struct cocos2d::CCSprite *v29; // rdi __int64 v30; // rbx __int64 v31; // rax __int64 v32; // rbx __int64 v33; // rax __int64 v34; // rdx struct cocos2d::CCSprite *v35; // rax cocos2d::CCObject *v36; // rsi struct cocos2d::CCMenu *v37; // rdi __int64 v38; // rbx __int64 v39; // rcx cocos2d::CCDirector *v40; // rax float v41; // xmm6_4 __int64 v42; // rcx cocos2d::CCDirector *v43; // rax float v44; // xmm0_4 __int64 v45; // rax __int64 v46; // rcx __int64 v47; // rcx unsigned int Stat; // eax cocos2d::CCString *v49; // rax const char *CString; // rax struct cocos2d::CCLabelBMFont *v51; // rdi __int64 v52; // rbx __int64 v53; // rax __int64 v54; // rdi __int64 v55; // rbx __int64 v56; // rax struct cocos2d::CCSprite *v57; // rax __int64 v58; // rax __int64 v59; // rbx __int64 v60; // rax __int64 v61; // rcx unsigned int v62; // eax cocos2d::CCString *v63; // rax const char *v64; // rax struct cocos2d::CCLabelBMFont *v65; // rdi __int64 v66; // rbx __int64 v67; // rax __int64 v68; // rdi __int64 v69; // rbx __int64 v70; // rax struct cocos2d::CCSprite *v71; // rax __int64 v72; // rax __int64 v73; // rbx __int64 v74; // rax struct cocos2d::CCSprite *v75; // rdi __int64 v76; // rbx __int64 v77; // rax struct cocos2d::CCSprite *v78; // rdi __int64 v79; // rbx __int64 v80; // rax __int64 v81; // rbx __int64 v82; // rax __int64 v83; // rdx __int64 v84; // rcx cocos2d::CCArray *v85; // rsi __int64 v86; // rcx void **v87; // r12 __int64 v88; // rcx cocos2d::CCObject *v89; // rax unsigned int v90; // r13d float v91; // xmm0_4 unsigned int v92; // r14d struct cocos2d::CCObject *v93; // rbx __int64 v94; // rcx struct cocos2d::CCObject *v95; // rdi struct cocos2d::CCObject *v96; // rsi unsigned int v97; // r12d cocos2d::CCString *v98; // rax const char *v99; // rax struct cocos2d::CCSprite *v100; // rdi __int64 v101; // rbx __int64 v102; // rax int v103; // r14d cocos2d::CCString *v104; // rax const char *v105; // rax size_t v106; // r8 cocos2d::CCString *v107; // rax const char *v108; // rax size_t v109; // r8 __int64 *v110; // r12 __int64 v111; // rdi cocos2d::CCString *v112; // rax char *v113; // rax size_t v114; // r8 __int64 v115; // rcx __int64 v116; // rax __int64 v117; // rbx __int64 v118; // rax __int64 v119; // rbx float v120; // xmm6_4 float *v121; // rax __int64 v122; // rax struct cocos2d::CCObject *v123; // r12 __int64 v124; // rbx __int64 v125; // rax __int64 v126; // rcx struct cocos2d::CCSprite *v127; // rdi __int64 v128; // rax __int64 v129; // rdx void **v130; // rcx struct cocos2d::CCSprite *v131; // r12 __int64 v132; // rax __int64 v133; // rbx __int64 v134; // rax __int64 v135; // r8 signed int v136; // esi signed int v137; // edi cocos2d::CCString *v138; // rax const char *v139; // rax struct cocos2d::CCObject *v140; // r12 __int64 v141; // rax __int64 v142; // rbx __int64 v143; // rax __int16 *v144; // rdx __int64 v145; // rax __int64 v146; // rax __int64 i; // rdx signed int v148; // ecx __int64 v149; // rax __int64 v150; // rax __int64 j; // rdx signed int v152; // ecx struct cocos2d::CCObject *v153; // r14 cocos2d::CCArray *v154; // r13 __int64 v155; // rcx __int64 v156; // r12 __int64 *v157; // rsi __int64 v158; // rdi struct cocos2d::CCLabelBMFont *v159; // rax __int64 v160; // rdi __int64 v161; // rbx __int64 v162; // rax struct cocos2d::CCSprite *v163; // rbx __int64 v164; // rax __int64 v165; // rbx double v166; // xmm0_8 float v167; // xmm6_4 double v168; // xmm0_8 __int64 v169; // rax __int64 v170; // rbx float v171; // xmm6_4 float *v172; // rax __int64 v173; // rax __int64 v174; // rbx __int64 v175; // rax __int64 v176; // rsi int v177; // ebx __int64 v178; // rcx struct cocos2d::CCSprite *v179; // rsi __int64 v180; // rax __int64 v181; // rdx struct cocos2d::CCSprite *v182; // rdi __int64 v183; // rax __int64 v184; // rbx __int64 v185; // rax struct cocos2d::CCLabelBMFont *v186; // rax __int64 v187; // rdi __int64 v188; // rbx __int64 v189; // rax struct cocos2d::CCObject *v190; // rbx __int64 v191; // rcx __int64 v192; // r12 unsigned int v193; // r14d __int64 v194; // rsi unsigned __int64 v195; // rdi _BYTE *v196; // rbx unsigned __int64 v197; // rcx __int64 v198; // rbx _QWORD *v199; // rsi void *v200; // rcx unsigned __int64 v201; // rdi _BYTE *v202; // rbx unsigned __int64 v203; // rcx _BYTE *v204; // rax char v205; // cl unsigned __int64 v206; // rdi _BYTE *v207; // rbx unsigned __int64 v208; // rcx __int64 v209; // rbx _QWORD *v210; // rsi void *v211; // rcx _BYTE *v212; // rbx unsigned __int64 v213; // rcx unsigned __int64 v214; // rdi _BYTE *v215; // rbx unsigned __int64 v216; // rcx __int64 v217; // rbx _QWORD *v218; // rsi void *v219; // rcx _BYTE *v220; // rbx unsigned __int64 v221; // rcx void *v222; // rbx void *v223; // rcx void **v224; // rcx __int64 *v225; // rsi __int64 *v226; // rax __int64 *v227; // rdi __int64 v228; // rbx __int64 v229; // rax __int64 v230; // rax __int64 v231; // rax __int64 v232; // rax __int64 v233; // rax float v234; // xmm0_4 int k; // edi void **v236; // rcx struct cocos2d::CCSprite *v237; // rbx __int64 v238; // rax __int64 v239; // rdx char *v240; // rax __int64 v241; // rcx cocos2d::CCDirector *v242; // rax float ScreenBottom; // xmm0_4 __int64 v244; // rbx __int64 v245; // rax __int64 v246; // rcx cocos2d::CCDirector *v247; // rax float ScreenTop; // xmm6_4 __int64 v249; // rcx cocos2d::CCDirector *v250; // rax float ScreenRight; // xmm0_4 __int64 v252; // rax __int64 v253; // rcx __int64 v254; // rsi float v255; // xmm6_4 __int64 *v256; // rdi __int64 *v257; // rax cocos2d::CCObject *v258; // rbx __int64 v259; // rdi __int64 v260; // rcx cocos2d::CCDirector *v261; // rax float v262; // xmm0_4 __int64 v263; // rbx __int64 v264; // rax __int64 v265; // rax cocos2d::CCSprite *v266; // rdi __int64 *v267; // rax cocos2d::CCObject *v268; // rbx __int64 v269; // rdi __int64 v270; // rcx cocos2d::CCDirector *v271; // rax float v272; // xmm0_4 __int64 v273; // rbx __int64 v274; // rax __int64 v275; // rax __int64 v276; // rcx cocos2d::CCArray *v277; // rcx unsigned int v278; // eax int v279; // ebx __int16 v280; // [rsp+38h] [rbp-D0h] BYREF char v281; // [rsp+3Ah] [rbp-CEh] bool isSpecialChestUnlocked; // [rsp+3Ch] [rbp-CCh] void **v283; // [rsp+40h] [rbp-C8h] BYREF float v284; // [rsp+48h] [rbp-C0h] BYREF float v285; // [rsp+4Ch] [rbp-BCh] _WORD v286[2]; // [rsp+50h] [rbp-B8h] BYREF _WORD v287[2]; // [rsp+54h] [rbp-B4h] BYREF __int64 v288; // [rsp+58h] [rbp-B0h] __int64 v289; // [rsp+60h] [rbp-A8h] BYREF __int16 v290; // [rsp+68h] [rbp-A0h] __int16 v291; // [rsp+6Ch] [rbp-9Ch] BYREF char v292; // [rsp+6Eh] [rbp-9Ah] __int16 v293; // [rsp+70h] [rbp-98h] __int16 v294; // [rsp+74h] [rbp-94h] __int64 v295[2]; // [rsp+78h] [rbp-90h] BYREF cocos2d::CCArray *v296; // [rsp+88h] [rbp-80h] BYREF char v297[8]; // [rsp+90h] [rbp-78h] BYREF struct cocos2d::CCObject *v298; // [rsp+98h] [rbp-70h] void *v299; // [rsp+A0h] [rbp-68h] BYREF void **v300; // [rsp+A8h] [rbp-60h] char Src[15]; // [rsp+B0h] [rbp-58h] BYREF char v302; // [rsp+BFh] [rbp-49h] __int64 v303; // [rsp+C0h] [rbp-48h] __int64 v304; // [rsp+C8h] [rbp-40h] char v305[16]; // [rsp+D0h] [rbp-38h] BYREF __int64 v306; // [rsp+E0h] [rbp-28h] __int64 v307; // [rsp+E8h] [rbp-20h] char v308[8]; // [rsp+F0h] [rbp-18h] BYREF char v309[8]; // [rsp+F8h] [rbp-10h] BYREF char v310[8]; // [rsp+100h] [rbp-8h] BYREF char v311[8]; // [rsp+108h] [rbp+0h] BYREF char v312[8]; // [rsp+110h] [rbp+8h] BYREF struct cocos2d::CCObject *v313; // [rsp+118h] [rbp+10h] char v314[8]; // [rsp+120h] [rbp+18h] BYREF char v315[8]; // [rsp+128h] [rbp+20h] BYREF void *v316; // [rsp+130h] [rbp+28h] BYREF void *v317; // [rsp+138h] [rbp+30h] BYREF char v318[8]; // [rsp+140h] [rbp+38h] BYREF char v319[8]; // [rsp+148h] [rbp+40h] BYREF char v320[8]; // [rsp+150h] [rbp+48h] BYREF char v321[8]; // [rsp+158h] [rbp+50h] BYREF char *v322; // [rsp+160h] [rbp+58h] void *v323; // [rsp+168h] [rbp+60h] void *v324; // [rsp+170h] [rbp+68h] void *v325; // [rsp+178h] [rbp+70h] char v326[8]; // [rsp+180h] [rbp+78h] BYREF void *v327; // [rsp+188h] [rbp+80h] char v328[8]; // [rsp+190h] [rbp+88h] BYREF void *v329[2]; // [rsp+198h] [rbp+90h] BYREF __int64 v330; // [rsp+1A8h] [rbp+A0h] unsigned __int64 v331; // [rsp+1B0h] [rbp+A8h] void *v332[2]; // [rsp+1B8h] [rbp+B0h] BYREF __int64 v333; // [rsp+1C8h] [rbp+C0h] unsigned __int64 v334; // [rsp+1D0h] [rbp+C8h] __int128 v335; // [rsp+1D8h] [rbp+D0h] BYREF __int64 v336; // [rsp+1E8h] [rbp+E0h] __int64 v337; // [rsp+1F0h] [rbp+E8h] LOBYTE(v288) = a2; result = cocos2d::CCLayer::init((cocos2d::CCLayer *)a1); if ( !result ) return result; *(_BYTE *)(a1 + 584) = 1; v5 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v4); cocos2d::CCTextureCache::addImage(v5, "TreasureRoomSheet.png", 0); v8 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v7, v6); cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v8, "TreasureRoomSheet.plist"); LOBYTE(v9) = 1; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 992LL))(a1, v9); LOBYTE(v10) = 1; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1008LL))(a1, v10); v12 = cocos2d::CCDirector::sharedDirector(v11); cocos2d::CCDirector::getWinSize(v12, &v284); v13 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v283 = (void **)operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v283); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v13 = qword_14090BFD0; } if ( GameManager::getUGV(v13, "10") ) *(_DWORD *)(a1 + 568) = 4; v14 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v283 = (void **)operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v283); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v14 = qword_14090BFD0; } if ( GameManager::getUGV(v14, &word_140737620) ) *(_DWORD *)(a1 + 572) = 3; v283 = v332; v333 = 14; v334 = 15; strcpy((char *)v332, "secretLoop.mp3"); HIBYTE(v332[1]) = 0; if ( !qword_14090BFD0 ) { v299 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v299); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); } GameManager::fadeInMusic(v15, (__int64)v332); v16 = cocos2d::CCLayer::create(); *(_QWORD *)(a1 + 424) = v16; (*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a1 + 456LL))(a1, v16, 0); v17 = cocos2d::CCSprite::create("GJ_gradientBG.png"); *(_QWORD *)(a1 + 560) = v17; v18 = *(_QWORD *)v17; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v283, 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 + 560), 4294967293LL); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 560) + 120LL))(*(_QWORD *)(a1 + 560)); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 560) + 136LL))(*(_QWORD *)(a1 + 560)); v20 = **(_QWORD **)(a1 + 560); v21 = *(_QWORD *)(a1 + 560); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v283, -5.0, -5.0); (*(void (__fastcall **)(__int64, __int64))(v20 + 184))(v21, v22); v280 = 70; v281 = 75; (**(void (__fastcall ***)(__int64, __int16 *))(*(_QWORD *)(a1 + 560) + 320LL))(*(_QWORD *)(a1 + 560) + 320LL, &v280); v23 = cocos2d::CCSprite::createWithSpriteFrameName("treasureRoomSpiderweb_001.png"); v24 = *(_QWORD *)v23; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v283, 1.0, 1.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v24 + 288))(v23, v25); v26 = *(_QWORD *)v23; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v283, v284 + 5.0, v285 + 5.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v26 + 184))(v23, v27); LOBYTE(v28) = 63; (*(void (__fastcall **)(__int64, __int64))(*((_QWORD *)v23 + 40) + 40LL))((__int64)v23 + 320, v28); v280 = 0; v281 = 0; (**((void (__fastcall ***)(__int64, __int16 *))v23 + 40))((__int64)v23 + 320, &v280); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v23, 0xFFFFFFFFLL); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v23 + 160LL))(v23); v29 = cocos2d::CCSprite::createWithSpriteFrameName("treasureRoomSpiderweb_001.png"); v30 = *(_QWORD *)v29; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v283, 0.0, 1.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v30 + 288))(v29, v31); v32 = *(_QWORD *)v29; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v283, -5.0, v285 + 5.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v32 + 184))(v29, v33); LOBYTE(v34) = 63; (*(void (__fastcall **)(__int64, __int64))(*((_QWORD *)v29 + 40) + 40LL))((__int64)v29 + 320, v34); cocos2d::CCSprite::setFlipX(v29, 1); v280 = 0; v281 = 0; (**((void (__fastcall ***)(__int64, __int16 *))v29 + 40))((__int64)v29 + 320, &v280); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v29, 0xFFFFFFFFLL); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v29 + 160LL))(v29); v35 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png"); *(_QWORD *)(a1 + 528) = v35; v36 = CCMenuItemSpriteExtra::create((int)v35, 0, a1, (__int64)SecretRewardsLayer::onBack); *((_DWORD *)v36 + 93) = 1070386381; v37 = cocos2d::CCMenu::create(v36, 0); (*(void (__fastcall **)(__int64, struct cocos2d::CCMenu *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v37, 1); v38 = *(_QWORD *)v37; v40 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v39); v41 = cocos2d::CCDirector::getScreenTop(v40) - 23.0; v43 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v42); v44 = cocos2d::CCDirector::getScreenLeft(v43) + 24.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v283, v44, v41); (*(void (__fastcall **)(struct cocos2d::CCMenu *, __int64))(v38 + 184))(v37, v45); if ( *(_BYTE *)(cocos2d::CCApplication::sharedApplication(v46) + 209) ) GameToolbox::addBackButton(a1, (__int64)v36); v47 = qword_14090BFE0; if ( !qword_14090BFE0 ) { v283 = (void **)operator new(0x3E8u); qword_14090BFE0 = sub_1402D6480((__int64)v283); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0); v47 = qword_14090BFE0; } Stat = GameStatsManager::getStat(v47, &word_140737620); v49 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, Stat); CString = cocos2d::CCString::getCString(v49); v51 = cocos2d::CCLabelBMFont::create(CString, (const char *)&qword_140704F78); *(_QWORD *)(a1 + 472) = v51; v52 = *(_QWORD *)v51; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v283, v284 - 55.0, v285 - 18.0); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v52 + 184))(v51, v53); v54 = **(_QWORD **)(a1 + 472); v55 = *(_QWORD *)(a1 + 472); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v283, 1.0, 0.5); (*(void (__fastcall **)(__int64, __int64))(v54 + 288))(v55, v56); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 472) + 160LL))(*(_QWORD *)(a1 + 472)); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 464LL))(a1, *(_QWORD *)(a1 + 472)); v57 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)&xmmword_140737F28); *(_QWORD *)(a1 + 488) = v57; (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v57, 3); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v283, 25.0, -0.5); v59 = v58; v60 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 472) + 200LL))(*(_QWORD *)(a1 + 472)); cocos2d::CCPoint::operator+(v60, &v296, v59); (*(void (__fastcall **)(_QWORD, cocos2d::CCArray **))(**(_QWORD **)(a1 + 488) + 184LL))(*(_QWORD *)(a1 + 488), &v296); v61 = qword_14090BFE0; if ( !qword_14090BFE0 ) { v299 = operator new(0x3E8u); qword_14090BFE0 = sub_1402D6480((__int64)v299); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0); v61 = qword_14090BFE0; } v62 = GameStatsManager::getStat(v61, &word_1407380E4); v63 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v62); v64 = cocos2d::CCString::getCString(v63); v65 = cocos2d::CCLabelBMFont::create(v64, (const char *)&qword_140704F78); *(_QWORD *)(a1 + 480) = v65; v66 = *(_QWORD *)v65; v67 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 472) + 200LL))(*(_QWORD *)(a1 + 472)); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v66 + 184))(v65, v67); v68 = **(_QWORD **)(a1 + 480); v69 = *(_QWORD *)(a1 + 480); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v283, 1.0, 0.5); (*(void (__fastcall **)(__int64, __int64))(v68 + 288))(v69, v70); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 480) + 160LL))(*(_QWORD *)(a1 + 480)); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 464LL))(a1, *(_QWORD *)(a1 + 480)); v71 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)&xmmword_140737F60); *(_QWORD *)(a1 + 496) = v71; (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v71, 3); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v283, 25.0, -0.5); v73 = v72; v74 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 480) + 200LL))(*(_QWORD *)(a1 + 480)); cocos2d::CCPoint::operator+(v74, &v296, v73); (*(void (__fastcall **)(_QWORD, cocos2d::CCArray **))(**(_QWORD **)(a1 + 496) + 184LL))(*(_QWORD *)(a1 + 496), &v296); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 480) + 336LL))(*(_QWORD *)(a1 + 480), 0); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 496) + 336LL))(*(_QWORD *)(a1 + 496), 0); v75 = cocos2d::CCSprite::createWithSpriteFrameName("treasureRoomLabel_001.png"); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 424) + 456LL))( *(_QWORD *)(a1 + 424), v75, 2); v76 = *(_QWORD *)v75; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v283, v284 * 0.5, v285 - 42.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v76 + 184))(v75, v77); v78 = cocos2d::CCSprite::createWithSpriteFrameName("treasureRoomGround_001.png"); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v78, 2); v79 = *(_QWORD *)v78; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v283, 0.0, 1.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v79 + 288))(v78, v80); v81 = *(_QWORD *)v78; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v283, -10.0, 35.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v81 + 184))(v78, v82); v289 = 0x100000302LL; (**((void (__fastcall ***)(__int64, __int64))v78 + 43))((__int64)v78 + 344, 0x100000302LL); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v78 + 160LL))(v78); LOBYTE(v83) = -106; (*(void (__fastcall **)(__int64, __int64))(*((_QWORD *)v78 + 40) + 40LL))((__int64)v78 + 320, v83); v85 = (cocos2d::CCArray *)cocos2d::CCArray::create(v84); v296 = v85; v87 = (void **)cocos2d::CCArray::create(v86); v283 = v87; v89 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v88); *(_QWORD *)(a1 + 464) = v89; cocos2d::CCObject::retain(v89); v90 = 0; v322 = Src; do { v91 = floorf((float)(int)v90 / 3.0); v92 = (int)v91; if ( cocos2d::CCArray::count(v85) < (int)v91 + 1 ) { v93 = (struct cocos2d::CCObject *)cocos2d::CCLayer::create(); v95 = (struct cocos2d::CCObject *)cocos2d::CCMenu::create(v94); (*(void (__fastcall **)(struct cocos2d::CCObject *, struct cocos2d::CCObject *))(*(_QWORD *)v93 + 464LL))( v93, v95); cocos2d::CCArray::addObject(v85, v93); cocos2d::CCArray::addObject((cocos2d::CCArray *)v87, v95); } v96 = cocos2d::CCArray::objectAtIndex(v85, v92); v313 = v96; v298 = cocos2d::CCArray::objectAtIndex((cocos2d::CCArray *)v87, v92); v97 = v90 % 3; if ( v90 == 3 * (v90 / 3) && v90 < 6 ) { v98 = cocos2d::CCString::createWithFormat("tier%ilabel_001.png", (int)(float)(v91 + 1.0)); v99 = cocos2d::CCString::getCString(v98); v100 = cocos2d::CCSprite::createWithSpriteFrameName(v99); (*(void (__fastcall **)(struct cocos2d::CCObject *, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v96 + 456LL))( v96, v100, 2); v101 = *(_QWORD *)v100; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v321, v284 * 0.5, (float)(v285 * 0.5) + 70.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v101 + 184))(v100, v102); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v100 + 160LL))(v100); } cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v289, (float)((float)(int)(v97 - 1) * 100.0) + (float)(v284 * 0.5), (float)(v285 * 0.5) + 10.0); v103 = v90 + 3; if ( v90 >= 6 ) v103 = 2; v104 = cocos2d::CCString::createWithFormat("chest_0%i_price_001.png", v103); v105 = cocos2d::CCString::getCString(v104); *(_OWORD *)v332 = 0; v333 = 0; v334 = 0; v106 = -1; do ++v106; while ( v105[v106] ); sub_14003D230(v332, v105, v106); v107 = cocos2d::CCString::createWithFormat("chest_0%i_02_001.png", v103); v108 = cocos2d::CCString::getCString(v107); v335 = 0; v336 = 0; v337 = 0; v109 = -1; do ++v109; while ( v108[v109] ); sub_14003D230(&v335, v108, v109); isSpecialChestUnlocked = 0; if ( v90 < 3 ) { v280 = 14446; v287[0] = 14446; LOBYTE(v287[1]) = -126; goto LABEL_32; } v280 = 25700; memset(v287, 100, 3); if ( v90 >= 6 ) { v290 = 100; v287[0] = 100; LOBYTE(v287[1]) = -76; v112 = cocos2d::CCString::createWithFormat("chestSpecial_0%i_price_001.png", v97 + 1); v113 = (char *)cocos2d::CCString::getCString(v112); v114 = -1; do ++v114; while ( v113[v114] ); sub_1400405A0(v332, v113, v114); if ( v97 ) { if ( v97 == 1 ) { v300 = v329; *(_OWORD *)v329 = 0; v330 = 4; v331 = 15; strcpy((char *)v329, "0005"); v115 = qword_14090BFE0; if ( qword_14090BFE0 ) { LABEL_46: isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked(v115, v329); goto LABEL_32; } v324 = operator new(0x3E8u); v116 = sub_1402D6480((__int64)v324); } else { if ( v97 != 2 ) goto LABEL_32; v300 = v329; *(_OWORD *)v329 = 0; v330 = 4; v331 = 15; strcpy((char *)v329, "0006"); v115 = qword_14090BFE0; if ( qword_14090BFE0 ) goto LABEL_46; v323 = operator new(0x3E8u); v116 = sub_1402D6480((__int64)v323); } } else { v300 = v329; *(_OWORD *)v329 = 0; v330 = 4; v331 = 15; strcpy((char *)v329, "0004"); v115 = qword_14090BFE0; if ( qword_14090BFE0 ) goto LABEL_46; v325 = operator new(0x3E8u); v116 = sub_1402D6480((__int64)v325); } qword_14090BFE0 = v116; (*(void (__fastcall **)(__int64))(*(_QWORD *)v116 + 72LL))(v116); v115 = qword_14090BFE0; goto LABEL_46; } LABEL_32: v110 = (__int64 *)GJChestSprite::create(v103); (*(void (__fastcall **)(__int64 *))(*v110 + 160))(v110); v327 = operator new(0x208u); v111 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v327); if ( v111 ) { if ( CCMenuItemSpriteExtra::init((__int64 *)v111, v110, 0, a1, (__int64)SecretRewardsLayer::onChestType) ) { cocos2d::CCObject::autorelease((cocos2d::CCObject *)v111); goto LABEL_51; } (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v111 + 8LL))(v111, 1); } v111 = 0; LABEL_51: v302 = 0; v303 = 14; v304 = 15; strcpy(Src, "chestClick.ogg"); if ( (char *)(v111 + 448) != Src ) sub_1400405A0((void **)(v111 + 448), Src, 0xEu); sub_14003D310((__int64)Src); v117 = *(_QWORD *)v111; cocos2d::CCSize::CCSize((cocos2d::CCSize *)v328, 60.000004, 48.0); (*(void (__fastcall **)(__int64, __int64))(v117 + 312))(v111, v118); v119 = *v110; v120 = *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v111 + 320LL))(v111) + 4) * 0.5; v121 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v111 + 320LL))(v111); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v318, *v121 * 0.5, v120); (*(void (__fastcall **)(__int64 *, __int64))(v119 + 184))(v110, v122); v123 = v298; (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v298 + 464LL))(v298, v111); *(_WORD *)(v111 + 408) = 256; v124 = *(_QWORD *)v111; cocos2d::CCNode::convertToNodeSpace(v123, v319, &v289); (*(void (__fastcall **)(__int64, __int64))(v124 + 184))(v111, v125); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v111 + 64LL))(v111, v90); if ( isSpecialChestUnlocked ) SecretRewardsLayer::switchToOpenedState(v126, v111); v127 = cocos2d::CCSprite::createWithSpriteFrameName("chestPlatform_01_001.png"); (*(void (__fastcall **)(struct cocos2d::CCObject *, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v96 + 456LL))( v96, v127, 2); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v320, 0.0, -34.0); cocos2d::CCPoint::operator+(&v289, v311, v128); (*(void (__fastcall **)(struct cocos2d::CCSprite *, char *))(*(_QWORD *)v127 + 184LL))(v127, v311); (**((void (__fastcall ***)(__int64, _WORD *))v127 + 40))((__int64)v127 + 320, v287); LOBYTE(v129) = -56; (*(void (__fastcall **)(__int64, __int64))(*((_QWORD *)v127 + 40) + 40LL))((__int64)v127 + 320, v129); v130 = v332; if ( v334 > 0xF ) v130 = (void **)v332[0]; v131 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v130); v298 = v131; (*(void (__fastcall **)(struct cocos2d::CCObject *, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v96 + 456LL))( v96, v131, 2); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v326, 0.0, -20.0); v133 = v132; v134 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v127 + 200LL))(v127); cocos2d::CCPoint::operator+(v134, v312, v133); (*(void (__fastcall **)(struct cocos2d::CCSprite *, char *))(*(_QWORD *)v131 + 184LL))(v131, v312); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v131 + 160LL))(v131); if ( v90 >= 6 ) { if ( v90 == 6 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v308, (float)(v284 * 0.5) + 10.0, (float)(v285 * 0.5) + 72.0); v159 = cocos2d::CCLabelBMFont::create(" ", (const char *)&qword_140704F78); *(_QWORD *)(a1 + 440) = v159; (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, char *))(*(_QWORD *)v159 + 184LL))(v159, v308); v160 = **(_QWORD **)(a1 + 440); v161 = *(_QWORD *)(a1 + 440); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v297, 1.0, 0.5); (*(void (__fastcall **)(__int64, __int64))(v160 + 288))(v161, v162); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 440) + 160LL))(*(_QWORD *)(a1 + 440)); (*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v96 + 464LL))( v96, *(_QWORD *)(a1 + 440)); v163 = cocos2d::CCSprite::createWithSpriteFrameName("chest03_small_001.png"); (*(void (__fastcall **)(struct cocos2d::CCObject *, struct cocos2d::CCSprite *))(*(_QWORD *)v96 + 464LL))( v96, v163); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v295, 22.0, 0.0); cocos2d::CCPoint::operator+(v308, &v299, v164); (*(void (__fastcall **)(struct cocos2d::CCSprite *, void **))(*(_QWORD *)v163 + 184LL))(v163, &v299); SecretRewardsLayer::updateUnlockedLabel(a1); } } else { v135 = qword_14090BFE0; if ( !qword_14090BFE0 ) { v316 = operator new(0x3E8u); qword_14090BFE0 = sub_1402D6480((__int64)v316); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0); v135 = qword_14090BFE0; } if ( v103 ) { v136 = 0; v145 = *(_QWORD *)(v135 + 864); if ( v145 ) { v146 = *(_QWORD *)(v145 + 56); if ( v146 ) { for ( i = *(_QWORD *)(v146 + 288); ; i = *(_QWORD *)(i + 288) ) { v148 = v136++; if ( *(_DWORD *)(*(_QWORD *)(v146 + 264) + 64LL) != v103 ) v136 = v148; v146 = i; if ( !i ) break; } } } } else { v136 = cocos2d::CCDictionary::count(*(cocos2d::CCDictionary **)(v135 + 864)); v135 = qword_14090BFE0; } if ( !v135 ) { v317 = operator new(0x3E8u); qword_14090BFE0 = sub_1402D6480((__int64)v317); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0); v135 = qword_14090BFE0; } if ( v103 ) { v137 = 0; v149 = *(_QWORD *)(v135 + 352); if ( v149 ) { v150 = *(_QWORD *)(v149 + 56); if ( v150 ) { for ( j = *(_QWORD *)(v150 + 288); ; j = *(_QWORD *)(j + 288) ) { v152 = v137++; if ( *(_DWORD *)(*(_QWORD *)(v150 + 264) + 64LL) != v103 ) v137 = v152; v150 = j; if ( !j ) break; } } } } else { v137 = cocos2d::CCDictionary::count(*(cocos2d::CCDictionary **)(v135 + 352)); } v138 = cocos2d::CCString::createWithFormat("%i / %i", v136, v137); v139 = cocos2d::CCString::getCString(v138); v140 = cocos2d::CCLabelBMFont::create(v139, (const char *)&qword_140704F78); (*(void (__fastcall **)(struct cocos2d::CCObject *, struct cocos2d::CCObject *))(*(_QWORD *)v313 + 464LL))( v313, v140); (*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v140 + 160LL))(v140); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v310, 0.0, -35.0); v142 = v141; v143 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v298 + 200LL))(v298); cocos2d::CCPoint::operator+(v143, v314, v142); (*(void (__fastcall **)(struct cocos2d::CCObject *, char *))(*(_QWORD *)v140 + 184LL))(v140, v314); if ( v136 < v137 ) { v293 = 31419; v286[0] = 31419; LOBYTE(v286[1]) = 107; v144 = v286; } else { v294 = -256; v291 = -256; v292 = 0; v144 = &v291; } (**((void (__fastcall ***)(__int64, __int16 *))v140 + 46))((__int64)v140 + 368, v144); cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(a1 + 464), v140, v103); } sub_14003D310((__int64)&v335); sub_14003D310((__int64)v332); ++v90; v87 = v283; v85 = v296; } while ( (int)v90 < 9 ); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v309, v284 * 0.5, (float)(v285 * 0.5) + 12.0); v153 = (struct cocos2d::CCObject *)cocos2d::CCLayer::create(); v154 = v85; cocos2d::CCArray::addObject(v85, v153); v156 = cocos2d::CCMenu::create(v155); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v153 + 464LL))(v153, v156); v157 = (__int64 *)GJChestSprite::create(9); (*(void (__fastcall **)(__int64 *))(*v157 + 160))(v157); v295[0] = (__int64)operator new(0x208u); v158 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(v295[0]); if ( !v158 ) { LABEL_91: v158 = 0; goto LABEL_92; } if ( !CCMenuItemSpriteExtra::init((__int64 *)v158, v157, 0, a1, (__int64)SecretRewardsLayer::onGoldChest) ) { (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v158 + 8LL))(v158, 1); goto LABEL_91; } cocos2d::CCObject::autorelease((cocos2d::CCObject *)v158); LABEL_92: v305[15] = 0; v306 = 14; v307 = 15; strcpy(v305, "chestClick.ogg"); v295[0] = (__int64)v305; if ( (char *)(v158 + 448) != v305 ) sub_1400405A0((void **)(v158 + 448), v305, 0xEu); sub_14003D310((__int64)v305); v165 = *(_QWORD *)v158; v166 = (*(double (__fastcall **)(__int64 *))(*v157 + 168))(v157); v167 = *(float *)&v166 * 80.0; v168 = (*(double (__fastcall **)(__int64 *))(*v157 + 168))(v157); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v295, *(float *)&v168 * 100.0, v167); (*(void (__fastcall **)(__int64, __int64))(v165 + 312))(v158, v169); v170 = *v157; v171 = *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v158 + 320LL))(v158) + 4) * 0.5; v172 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v158 + 320LL))(v158); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v295, *v172 * 0.5, v171); (*(void (__fastcall **)(__int64 *, __int64))(v170 + 184))(v157, v173); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v156 + 464LL))(v156, v158); *(_WORD *)(v158 + 408) = 256; v174 = *(_QWORD *)v158; cocos2d::CCNode::convertToNodeSpace(v156, v297, v309); (*(void (__fastcall **)(__int64, __int64))(v174 + 184))(v158, v175); v176 = qword_14090BFE0; if ( !qword_14090BFE0 ) { v295[0] = (__int64)operator new(0x3E8u); qword_14090BFE0 = sub_1402D6480(v295[0]); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0); v176 = qword_14090BFE0; } v177 = 6001; while ( GameStatsManager::isSecretChestUnlocked(v176) ) { if ( ++v177 - 6001 >= 30 ) goto LABEL_101; } if ( v177 ) goto LABEL_102; LABEL_101: SecretRewardsLayer::switchToOpenedState(v178, v158); LABEL_102: v179 = cocos2d::CCSprite::createWithSpriteFrameName("chestPlatform_01_001.png"); (*(void (__fastcall **)(struct cocos2d::CCObject *, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v153 + 456LL))( v153, v179, 2); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v295, 0.0, -40.800003); cocos2d::CCPoint::operator+(v309, &v283, v180); (*(void (__fastcall **)(struct cocos2d::CCSprite *, void ***))(*(_QWORD *)v179 + 184LL))(v179, &v283); qmemcpy(v286, "\\Pg", 3); (**((void (__fastcall ***)(__int64, _WORD *))v179 + 40))((__int64)v179 + 320, v286); LOBYTE(v181) = -56; (*(void (__fastcall **)(__int64, __int64))(*((_QWORD *)v179 + 40) + 40LL))((__int64)v179 + 320, v181); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v179 + 160LL))(v179); v182 = cocos2d::CCSprite::createWithSpriteFrameName("chest_09_price_001.png"); (*(void (__fastcall **)(struct cocos2d::CCObject *, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v153 + 456LL))( v153, v182, 2); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v297, 0.0, -24.0); v184 = v183; v185 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v179 + 200LL))(v179); cocos2d::CCPoint::operator+(v185, &v283, v184); (*(void (__fastcall **)(struct cocos2d::CCSprite *, void ***))(*(_QWORD *)v182 + 184LL))(v182, &v283); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v182 + 160LL))(v182); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v315, v284 * 0.5, (float)(v285 * 0.5) + 72.0); v186 = cocos2d::CCLabelBMFont::create(" ", (const char *)&qword_140704F78); *(_QWORD *)(a1 + 456) = v186; (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, char *))(*(_QWORD *)v186 + 184LL))(v186, v315); v187 = **(_QWORD **)(a1 + 456); v188 = *(_QWORD *)(a1 + 456); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v310, 0.5, 0.5); (*(void (__fastcall **)(__int64, __int64))(v187 + 288))(v188, v189); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 456) + 160LL))(*(_QWORD *)(a1 + 456)); (*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v153 + 464LL))(v153, *(_QWORD *)(a1 + 456)); SecretRewardsLayer::updateUnlockedGoldLabel(a1); v190 = (struct cocos2d::CCObject *)cocos2d::CCLayer::create(); cocos2d::CCArray::addObject(v154, v190); v192 = cocos2d::CCMenu::create(v191); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v190 + 464LL))(v190, v192); v193 = 1; while ( 2 ) { v194 = 0x7FFFFFFFFFFFFFFFLL; *(_OWORD *)v332 = 0; v333 = 0; v334 = 0; v332[0] = sub_14003D460(0x20u); v333 = 17; v334 = 31; strcpy((char *)v332[0], "shopRope2_001.png"); *(_OWORD *)v329 = 0; v330 = 0; v331 = 0; v329[0] = sub_14003D460(0x20u); v330 = 19; v331 = 31; strcpy((char *)v329[0], "shopRope2_2_001.png"); switch ( v193 ) { case 2u: v214 = v334; if ( v334 < 0x11 ) { v216 = v334 >> 1; if ( v334 <= 0x7FFFFFFFFFFFFFFFLL - (v334 >> 1) ) { v217 = 31; if ( v216 + v334 > 0x1F ) v217 = v216 + v334; } else { v217 = 0x7FFFFFFFFFFFFFFFLL; } v218 = sub_14003D460(v217 + 1); v333 = 17; v334 = v217; *(_OWORD *)v218 = *(_OWORD *)"shopRope3_001.png"; *((_WORD *)v218 + 8) = (unsigned __int8)aShoprope3001Pn[16]; if ( v214 > 0xF ) { v219 = v332[0]; if ( v214 + 1 >= 0x1000 ) { v219 = *((void **)v332[0] - 1); if ( (unsigned __int64)((char *)v332[0] - (char *)v219 - 8) > 0x1F ) LABEL_184: invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v219); } v332[0] = v218; v194 = 0x7FFFFFFFFFFFFFFFLL; } else { v215 = v332[0]; v333 = 17; memmove(v332[0], "shopRope3_001.png", 0x11u); v215[17] = 0; } v201 = v331; if ( v331 < 0x13 ) { v221 = v331 >> 1; if ( v331 <= 0x7FFFFFFFFFFFFFFFLL - (v331 >> 1) ) { v194 = 31; if ( v331 + v221 > 0x1F ) v194 = v331 + v221; } v204 = sub_14003D460(v194 + 1); v330 = 19; v331 = v194; qmemcpy(v204, "shopRope3_2_001.pn", 18); v205 = aShoprope32001P[18]; goto LABEL_157; } v220 = v329[0]; v330 = 19; memmove(v329[0], "shopRope3_2_001.png", 0x13u); v220[19] = 0; break; case 3u: v206 = v334; if ( v334 < 0x11 ) { v208 = v334 >> 1; if ( v334 <= 0x7FFFFFFFFFFFFFFFLL - (v334 >> 1) ) { v209 = 31; if ( v208 + v334 > 0x1F ) v209 = v208 + v334; } else { v209 = 0x7FFFFFFFFFFFFFFFLL; } v210 = sub_14003D460(v209 + 1); v333 = 17; v334 = v209; *(_OWORD *)v210 = *(_OWORD *)"shopRope4_001.png"; *((_WORD *)v210 + 8) = (unsigned __int8)aShoprope4001Pn[16]; if ( v206 > 0xF ) { v211 = v332[0]; if ( v206 + 1 >= 0x1000 ) { v211 = *((void **)v332[0] - 1); if ( (unsigned __int64)((char *)v332[0] - (char *)v211 - 8) > 0x1F ) goto LABEL_184; } j_j_free(v211); } v332[0] = v210; v194 = 0x7FFFFFFFFFFFFFFFLL; } else { v207 = v332[0]; v333 = 17; memmove(v332[0], "shopRope4_001.png", 0x11u); v207[17] = 0; } v201 = v331; if ( v331 < 0x13 ) { v213 = v331 >> 1; if ( v331 <= 0x7FFFFFFFFFFFFFFFLL - (v331 >> 1) ) { v194 = 31; if ( v331 + v213 > 0x1F ) v194 = v331 + v213; } v204 = sub_14003D460(v194 + 1); v330 = 19; v331 = v194; qmemcpy(v204, "shopRope4_2_001.pn", 18); v205 = aShoprope42001P[18]; goto LABEL_157; } v212 = v329[0]; v330 = 19; memmove(v329[0], "shopRope4_2_001.png", 0x13u); v212[19] = 0; break; case 4u: v195 = v334; if ( v334 < 0x11 ) { v197 = v334 >> 1; if ( v334 <= 0x7FFFFFFFFFFFFFFFLL - (v334 >> 1) ) { v198 = 31; if ( v197 + v334 > 0x1F ) v198 = v197 + v334; } else { v198 = 0x7FFFFFFFFFFFFFFFLL; } v199 = sub_14003D460(v198 + 1); v333 = 17; v334 = v198; *(_OWORD *)v199 = *(_OWORD *)"shopRope5_001.png"; *((_WORD *)v199 + 8) = (unsigned __int8)aShoprope5001Pn[16]; if ( v195 > 0xF ) { v200 = v332[0]; if ( v195 + 1 >= 0x1000 ) { v200 = *((void **)v332[0] - 1); if ( (unsigned __int64)((char *)v332[0] - (char *)v200 - 8) > 0x1F ) goto LABEL_184; } j_j_free(v200); } v332[0] = v199; v194 = 0x7FFFFFFFFFFFFFFFLL; } else { v196 = v332[0]; v333 = 17; memmove(v332[0], "shopRope5_001.png", 0x11u); v196[17] = 0; } v201 = v331; if ( v331 >= 0x13 ) { v202 = v329[0]; v330 = 19; memmove(v329[0], "shopRope5_2_001.png", 0x13u); v202[19] = 0; break; } v203 = v331 >> 1; if ( v331 <= 0x7FFFFFFFFFFFFFFFLL - (v331 >> 1) ) { v194 = 31; if ( v331 + v203 > 0x1F ) v194 = v331 + v203; } v204 = sub_14003D460(v194 + 1); v330 = 19; v331 = v194; qmemcpy(v204, "shopRope5_2_001.pn", 18); v205 = aShoprope52001P[18]; LABEL_157: v204[18] = v205; v222 = v204; v204[19] = 0; if ( v201 > 0xF ) { v223 = v329[0]; if ( v201 + 1 >= 0x1000 ) { v223 = *((void **)v329[0] - 1); if ( (unsigned __int64)((char *)v329[0] - (char *)v223 - 8) > 0x1F ) goto LABEL_184; } j_j_free(v223); } v329[0] = v222; break; default: break; } v224 = v332; if ( v334 > 0xF ) v224 = (void **)v332[0]; v225 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName((const char *)v224); v295[0] = (__int64)operator new(0x208u); v226 = (__int64 *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(v295[0]); v227 = v226; if ( v226 ) { if ( CCMenuItemSpriteExtra::init(v226, v225, 0, a1, (__int64)SecretRewardsLayer::onShop) ) { cocos2d::CCObject::autorelease((cocos2d::CCObject *)v227); goto LABEL_169; } (*(void (__fastcall **)(__int64 *, __int64))(*v227 + 8))(v227, 1); } v227 = nullptr; LABEL_169: (*(void (__fastcall **)(__int64 *, _QWORD))(*v227 + 64))(v227, v193); (*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v192 + 464LL))(v192, v227); *((_DWORD *)v227 + 93) = 1069547520; v228 = *v227; cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v297, (float)(v284 * 0.5) + (float)((float)((float)(int)(v193 - 1) * 70.0) - 105.0), v285 - 100.0); cocos2d::CCNode::convertToNodeSpace(v192, v310, v229); (*(void (__fastcall **)(__int64 *, __int64))(v228 + 184))(v227, v230); v231 = (*(__int64 (__fastcall **)(__int64 *))(*v227 + 952))(v227); v232 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v231 + 200LL))(v231); cocos2d::CCPoint::operator=(v227 + 63, v232); *((_DWORD *)v227 + 125) = 1; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v317, 0.0, -15.0); cocos2d::CCPoint::operator=((char *)v227 + 484, v233); *((_DWORD *)v227 + 123) = 1050253722; *((_DWORD *)v227 + 124) = 1050253722; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v289, 25.0, 76.0); switch ( v193 ) { case 2u: v234 = *(float *)&v289 + -2.25; goto LABEL_175; case 3u: v234 = *(float *)&v289 + -3.5; goto LABEL_175; case 4u: v234 = *(float *)&v289 + 0.0; LABEL_175: *(float *)&v289 = v234; break; } for ( k = 0; k < 6; ++k ) { v236 = v329; if ( v331 > 0xF ) v236 = (void **)v329[0]; v237 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v236); (*(void (__fastcall **)(__int64 *, struct cocos2d::CCSprite *))(*v225 + 464))(v225, v237); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 0.0, (float)k * 20.5); cocos2d::CCPoint::operator+(&v289, &v283, v238); (*(void (__fastcall **)(struct cocos2d::CCSprite *, void ***))(*(_QWORD *)v237 + 184LL))(v237, &v283); } sub_14003D310((__int64)v329); sub_14003D310((__int64)v332); if ( (int)++v193 <= 4 ) continue; break; } v240 = BoomScrollLayer::create((int)v154, v239, 1u, 0, 0); *(_QWORD *)(a1 + 544) = v240; (*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 424) + 464LL))(*(_QWORD *)(a1 + 424), v240); v242 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v241); ScreenBottom = cocos2d::CCDirector::getScreenBottom(v242); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v295, v284 * 0.5, ScreenBottom + 10.0); v244 = *(_QWORD *)(a1 + 544); cocos2d::CCPoint::operator=(v244 + 572, v245); BoomScrollLayer::updateDots(v244); *(_DWORD *)(*(_QWORD *)(a1 + 544) + 540LL) = 1063675494; *(_BYTE *)(*(_QWORD *)(a1 + 544) + 608LL) = 1; v247 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v246); ScreenTop = cocos2d::CCDirector::getScreenTop(v247); v250 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v249); ScreenRight = cocos2d::CCDirector::getScreenRight(v250); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v295, 0.0, 0.0, ScreenRight, ScreenTop); cocos2d::CCRect::operator=(*(_QWORD *)(a1 + 544) + 612LL, v252); v253 = *(_QWORD *)(*(_QWORD *)(a1 + 544) + 504LL); *(_QWORD *)(v253 + 408) = a1 + 416; v254 = cocos2d::CCMenu::create(v253); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v254 + 944LL))(v254, 4294967167LL); v255 = (float)(v285 * 0.5) - 30.0; v256 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); v295[0] = (__int64)operator new(0x208u); v257 = (__int64 *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(v295[0]); v258 = (cocos2d::CCObject *)v257; if ( v257 ) { if ( CCMenuItemSpriteExtra::init(v257, v256, 0, a1, (__int64)SecretRewardsLayer::onSwitchPage) ) { cocos2d::CCObject::autorelease(v258); goto LABEL_187; } (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v258 + 8LL))(v258, 1); } v258 = nullptr; LABEL_187: *(_QWORD *)(a1 + 512) = v258; (*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v254 + 464LL))(v254, v258); v259 = **(_QWORD **)(a1 + 512); v261 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v260); v262 = cocos2d::CCDirector::getScreenLeft(v261) + 24.0; v263 = *(_QWORD *)(a1 + 512); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v295, v262, v255); cocos2d::CCNode::convertToNodeSpace(v254, v297, v264); (*(void (__fastcall **)(__int64, __int64))(v259 + 184))(v263, v265); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 512) + 64LL))(*(_QWORD *)(a1 + 512), 0); *(_DWORD *)(*(_QWORD *)(a1 + 512) + 372LL) = 0x40000000; v266 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); cocos2d::CCSprite::setFlipX(v266, 1); v295[0] = (__int64)operator new(0x208u); v267 = (__int64 *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(v295[0]); v268 = (cocos2d::CCObject *)v267; if ( v267 ) { if ( CCMenuItemSpriteExtra::init(v267, (__int64 *)v266, 0, a1, (__int64)SecretRewardsLayer::onSwitchPage) ) { cocos2d::CCObject::autorelease(v268); goto LABEL_192; } (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v268 + 8LL))(v268, 1); } v268 = nullptr; LABEL_192: *(_QWORD *)(a1 + 520) = v268; (*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v254 + 464LL))(v254, v268); v269 = **(_QWORD **)(a1 + 520); v271 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v270); v272 = cocos2d::CCDirector::getScreenRight(v271) - 24.0; v273 = *(_QWORD *)(a1 + 520); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v295, v272, v255); cocos2d::CCNode::convertToNodeSpace(v254, v297, v274); (*(void (__fastcall **)(__int64, __int64))(v269 + 184))(v273, v275); (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 520) + 64LL))(*(_QWORD *)(a1 + 520), 1); *(_DWORD *)(*(_QWORD *)(a1 + 520) + 372LL) = 0x40000000; (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v254, 10); if ( (_BYTE)v288 ) { v276 = *(_QWORD *)(a1 + 544); if ( *(_BYTE *)(v276 + 456) ) v277 = *(cocos2d::CCArray **)(v276 + 448); else v277 = *(cocos2d::CCArray **)(v276 + 480); v278 = cocos2d::CCArray::count(v277); v279 = v278 - 1; BoomScrollLayer::instantMoveToPage(*(_QWORD *)(a1 + 544), v278 - 2); BoomScrollLayer::instantMoveToPage(*(_QWORD *)(a1 + 544), v279); } return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source