// // SecretLayer5::init from 0x1405896a0 to 0x14058a879 (4569 bytes) // // 4 xrefs: // > LevelAreaInnerLayer::onOnlineVault @ 0x1403e1974 // > LevelAreaInnerLayer::onOnlineVault @ 0x1403e1965 // > @ 0x1407e31a8 // > @ 0x14092caec // // 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:29 +0000 // // Hidden C++ exception states: #wind=7 bool __fastcall SecretLayer5::init(__int64 a1) { int v2; // r15d bool result; // al __int64 v4; // rcx cocos2d::CCTextureCache *v5; // rax __int64 v6; // rdx __int64 v7; // rcx cocos2d::CCSpriteFrameCache *v8; // rax __int64 v9; // rcx cocos2d::CCTextureCache *v10; // rax __int64 v11; // rdx __int64 v12; // rcx cocos2d::CCSpriteFrameCache *v13; // rax __int64 v14; // rcx __int64 v15; // rdx __int64 v16; // rdx __int64 v17; // rcx __int64 v18; // rax void **v19; // r12 __int64 v20; // rdi char *v21; // rbx char *v22; // rax unsigned __int64 v23; // rbx void *v24; // rcx __int64 v25; // rsi char *v26; // rdi size_t v27; // rbx unsigned int v28; // eax unsigned int v29; // eax unsigned __int64 i; // rdx struct cocos2d::CCSprite *v31; // rdi void (__fastcall *v32)(struct cocos2d::CCSprite *, __int64); // rbx __int64 v33; // rax __int64 v34; // rdi void (__fastcall *v35)(__int64, __int64); // rbx __int64 v36; // rax struct cocos2d::CCLabelBMFont *v37; // rax __int64 v38; // rax __int64 v39; // rax __int64 v40; // rax __int64 v41; // rdx __int64 v42; // rdx __int64 v43; // rcx char *v44; // rax __int64 v45; // rcx __int64 v46; // rcx int v47; // eax cocos2d::CCObject *v48; // rdi struct cocos2d::CCMenu *v49; // r12 __int64 v50; // rcx cocos2d::CCDirector *v51; // rax float v52; // xmm6_4 __int64 v53; // rcx cocos2d::CCDirector *v54; // rax float v55; // xmm0_4 void (__fastcall *v56)(struct cocos2d::CCMenu *, __int64); // rbx __int64 v57; // rax __int64 v58; // rcx void *v59; // rcx void *v60; // rcx __int64 v61; // rbx __int64 v62; // rsi void (__fastcall *v63)(__int64, __int64); // rdi __int64 v64; // rax __int64 v65; // rax struct cocos2d::CCSprite *v66; // rax __int64 v67; // rbx __int64 v68; // rsi void (__fastcall *v69)(__int64, __int64); // rdi __int64 v70; // rax __int64 v71; // rax __int64 v72; // rdx __int64 v73; // rcx __int64 v74; // rsi struct cocos2d::CCSprite *v75; // rax __int64 v76; // rbx void (__fastcall *v77)(__int64, __int64); // rdi __int64 v78; // rax __int64 v79; // rax __int64 v80; // rdi void (__fastcall *v81)(__int64, __int64); // rbx __int64 v82; // rax cocos2d::CCObject *v83; // rax __int64 v84; // rdi void (__fastcall *v85)(__int64, __int64); // rbx __int64 v86; // rax __int64 v87; // rax cocos2d::CCSprite *v88; // rax __int64 v89; // rcx __int64 v90; // rsi int v91; // edx cocos2d::CCString *v92; // rax const char *CString; // rbx __int64 v94; // rcx cocos2d::CCTextureCache *v95; // rax cocos2d::CCString *v96; // rax const char *v97; // rbx __int64 v98; // rcx cocos2d::CCTextureCache *v99; // rax cocos2d::CCString *v100; // rax char *v101; // rbx const struct cocos2d::CCPoint *v102; // rax char *v103; // rdi void (__fastcall *v104)(char *, __int64); // rbx __int64 v105; // rax __int64 v106; // rax __int64 v107; // rcx cocos2d::CCObject *v108; // rax struct cocos2d::CCSprite *v109; // rsi void (__fastcall *v110)(struct cocos2d::CCSprite *, __int64); // rbx int v111; // eax __int64 v112; // rax __int64 v113; // rcx cocos2d::CCArray *v114; // rdi __int64 v115; // rax __int64 v116; // rbx __int64 v117; // rax cocos2d::CCArray *v118; // rbx struct cocos2d::CCObject *v119; // rax cocos2d::CCArray *v120; // rbx struct cocos2d::CCObject *v121; // rax __int64 v122; // rax __int64 v123; // rcx __int64 v124; // rbx struct cocos2d::CCFiniteTimeAction *v125; // rax struct cocos2d::CCAction *v126; // rax __int64 v127; // [rsp+40h] [rbp-C0h] BYREF void **v128; // [rsp+48h] [rbp-B8h] BYREF float v129; // [rsp+50h] [rbp-B0h] BYREF float v130; // [rsp+54h] [rbp-ACh] char v131[8]; // [rsp+58h] [rbp-A8h] BYREF char v132[8]; // [rsp+60h] [rbp-A0h] BYREF void *v133; // [rsp+68h] [rbp-98h] BYREF __int128 v134; // [rsp+70h] [rbp-90h] BYREF __int64 v135; // [rsp+80h] [rbp-80h] __int64 v136; // [rsp+88h] [rbp-78h] _BYTE v137[16]; // [rsp+90h] [rbp-70h] BYREF void *Block[2]; // [rsp+A0h] [rbp-60h] BYREF __int64 v139; // [rsp+B0h] [rbp-50h] unsigned __int64 v140; // [rsp+B8h] [rbp-48h] _OWORD Src[4]; // [rsp+C0h] [rbp-40h] BYREF int v142; // [rsp+100h] [rbp+0h] unsigned int v143; // [rsp+110h] [rbp+10h] BYREF _DWORD v144[1251]; // [rsp+114h] [rbp+14h] v2 = 0; result = cocos2d::CCLayer::init((cocos2d::CCLayer *)a1); if ( result ) { v5 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v4); cocos2d::CCTextureCache::addImage(v5, "SecretSheet.png", 0); v8 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v7, v6); cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v8, "SecretSheet.plist"); v10 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v9); cocos2d::CCTextureCache::addImage(v10, "TowerSheet.png", 0); v13 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v12, v11); cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v13, "TowerSheet.plist"); v128 = Block; *(_OWORD *)Block = 0; v139 = 0; v140 = 0; Block[0] = sub_14003D460(0x20u); v139 = 16; v140 = 31; strcpy((char *)Block[0], "secretLoop04.ogg"); if ( !qword_14090BFD0 ) { v127 = (__int64)operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v127); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); } GameManager::fadeInMusic(v14, (__int64)Block); LOBYTE(v15) = 1; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 992LL))(a1, v15); LOBYTE(v16) = 1; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1008LL))(a1, v16); v18 = cocos2d::CCDirector::sharedDirector(v17); cocos2d::CCDirector::getWinSize(v18, &v129); Src[0] = _mm_load_si128((const __m128i *)&xmmword_1408368E0); Src[1] = _mm_load_si128((const __m128i *)&xmmword_1408368C0); Src[2] = _mm_load_si128((const __m128i *)&xmmword_1408368D0); Src[3] = _mm_load_si128((const __m128i *)&xmmword_1408368B0); v142 = 22349; v19 = (void **)(a1 + 600); v20 = *(_QWORD *)(a1 + 600); if ( (unsigned __int64)((*(_QWORD *)(a1 + 616) - v20) >> 2) >= 0x11 ) { v23 = (*(_QWORD *)(a1 + 608) - v20) >> 2; v24 = *(void **)(a1 + 600); if ( v23 >= 0x11 ) { memmove(v24, Src, 0x44u); v22 = (char *)(v20 + 68); } else { v25 = 4 * v23; memmove(v24, Src, 4 * v23); v26 = *(char **)(a1 + 608); v27 = 4 * (17 - v23); memmove(v26, (char *)Src + v25, v27); v22 = &v26[v27]; } } else { sub_14009A0D0(a1 + 600, 0x11u); v21 = (char *)*v19; memmove(*v19, Src, 0x44u); v22 = v21 + 68; } *(_QWORD *)(a1 + 608) = v22; v28 = time64(nullptr); srand(v28); v29 = rand(); v144[1248] = -1; v144[0] = v29; for ( i = 1; i < 0x270; ++i ) { v29 = i + 1812433253 * (v29 ^ (v29 >> 30)); v144[i] = v29; } v143 = 624; sub_14018C300(*v19, *(_DWORD **)(a1 + 608), &v143); v31 = cocos2d::CCSprite::create("GJ_gradientBG.png"); *(_QWORD *)(a1 + 584) = v31; v32 = *(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v31 + 288LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v128, 0.0, 0.0); v32(v31, v33); (*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 584), 4294967293LL); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 584) + 120LL))(*(_QWORD *)(a1 + 584)); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 584) + 136LL))(*(_QWORD *)(a1 + 584)); v34 = *(_QWORD *)(a1 + 584); v35 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v34 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v128, -5.0, -5.0); v35(v34, v36); LOWORD(v127) = 3613; BYTE2(v127) = 47; (**(void (__fastcall ***)(__int64, __int64 *))(*(_QWORD *)(a1 + 584) + 320LL))(*(_QWORD *)(a1 + 584) + 320LL, &v127); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v137, 0.0, 0.0, 40.0, 40.0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v131, v129 * 0.5, (float)(v130 * 0.5) + 55.0); v37 = cocos2d::CCLabelBMFont::create(" ", (const char *)&qword_140704F78); *(_QWORD *)(a1 + 472) = v37; (*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *))(*(_QWORD *)a1 + 464LL))(a1, v37); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v128, 0.0, 43.0); cocos2d::CCPoint::operator+(v131, &v127, v38); (*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 472) + 184LL))(*(_QWORD *)(a1 + 472), &v127); *(_OWORD *)Block = 0; v139 = 1; v140 = 15; LOWORD(Block[0]) = (unsigned __int8)asc_1406ED6E4[0]; v128 = Block; (**(void (__fastcall ***)(__int64, void **))(*(_QWORD *)(a1 + 472) + 360LL))(*(_QWORD *)(a1 + 472) + 360LL, Block); cocos2d::CCLabelBMFont::limitLabelWidth(*(cocos2d::CCLabelBMFont **)(a1 + 472), 320.0, 0.60000002, 0.0); sub_14003D310((__int64)Block); cocos2d::CCRect::CCRect((cocos2d::CCRect *)Block, (const struct cocos2d::CCRect *)v137); v40 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v39); *(_QWORD *)(a1 + 632) = v40; LOBYTE(v41) = 100; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)(v40 + 320) + 40LL))(v40 + 320, v41); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v132, 200.0, 40.0); (*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 632) + 312LL))(*(_QWORD *)(a1 + 632), v132); (*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 632), 4294967294LL); (*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 632) + 184LL))(*(_QWORD *)(a1 + 632), v131); (**(void (__fastcall ***)(__int64, void *))(*(_QWORD *)(a1 + 632) + 320LL))( *(_QWORD *)(a1 + 632) + 320LL, &unk_14070465C); v44 = CCTextInputNode::create(v43, v42, (__int64)"..."); *(_QWORD *)(a1 + 464) = v44; (*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v44, 20); *(_QWORD *)(*(_QWORD *)(a1 + 464) + 600LL) = a1 + 408; (*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 464) + 184LL))(*(_QWORD *)(a1 + 464), v131); v45 = *(_QWORD *)(a1 + 464); *(_DWORD *)(v45 + 564) = 1060320051; CCTextInputNode::refreshLabel(v45); v46 = *(_QWORD *)(a1 + 464); *(_DWORD *)(v46 + 560) = 1127481344; CCTextInputNode::refreshLabel(v46); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 464) + 592LL) + 336LL))( *(_QWORD *)(*(_QWORD *)(a1 + 464) + 592LL), 0); *(_DWORD *)(*(_QWORD *)(a1 + 464) + 608LL) = 100; *(_OWORD *)Block = 0; v139 = 0; v140 = 0; Block[0] = sub_14003D460(0x70u); v139 = 97; v140 = 111; strcpy( (char *)Block[0], " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-!?:;)(/\\\"'`*=+-_%[]<>|@&^#{}%$~"); CCTextInputNode::setAllowedChars(*(_QWORD *)(a1 + 464), Block); SecretLayer5::updateSearchLabel(a1, &byte_1406ED6E0); v47 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); v48 = CCMenuItemSpriteExtra::create(v47, 0, a1, (__int64)SecretLayer5::onBack); *((_DWORD *)v48 + 93) = 1069547520; v49 = cocos2d::CCMenu::create(v48, 0); (*(void (__fastcall **)(__int64, struct cocos2d::CCMenu *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v49, 1); v51 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v50); v52 = cocos2d::CCDirector::getScreenTop(v51) - 23.0; v54 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v53); v55 = cocos2d::CCDirector::getScreenLeft(v54) + 24.0; v56 = *(void (__fastcall **)(struct cocos2d::CCMenu *, __int64))(*(_QWORD *)v49 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v128, v55, v52); v56(v49, v57); if ( *(_BYTE *)(cocos2d::CCApplication::sharedApplication(v58) + 209) ) GameToolbox::addBackButton(a1, (__int64)v48); *(_OWORD *)Block = 0; v139 = 0; v140 = 0; Block[0] = sub_14003D460(0x20u); v139 = 22; v140 = 31; strcpy((char *)Block[0], "GJ_secretLock4_001.png"); *(_QWORD *)(a1 + 560) = CCSpriteWithHue::createWithSpriteFrameName((__int64)Block); if ( v140 > 0xF ) { v59 = Block[0]; if ( v140 + 1 >= 0x1000 ) { v59 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v59 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v59); } *(_OWORD *)Block = 0; v139 = 0; v140 = 0; Block[0] = sub_14003D460(0x20u); v139 = 22; v140 = 31; strcpy((char *)Block[0], "GJ_secretLock4_001.png"); *(_QWORD *)(a1 + 568) = CCSpriteGrayscale::createWithSpriteFrameName((__int64)Block); if ( v140 > 0xF ) { v60 = Block[0]; if ( v140 + 1 >= 0x1000 ) { v60 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v60 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v60); } LOWORD(v127) = 25800; BYTE2(v127) = -1; (**(void (__fastcall ***)(__int64, __int64 *))(*(_QWORD *)(a1 + 568) + 320LL))(*(_QWORD *)(a1 + 568) + 320LL, &v127); (*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 560) + 456LL))( *(_QWORD *)(a1 + 560), *(_QWORD *)(a1 + 568), 1); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 568) + 320LL) + 40LL))( *(_QWORD *)(a1 + 568) + 320LL, 0); v61 = *(_QWORD *)(a1 + 560); v62 = *(_QWORD *)(a1 + 568); v63 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v62 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v128, 0.0, 0.0); cocos2d::CCNode::convertToNodeSpace(v61, &v127, v64); v63(v62, v65); v66 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_secretLock4_eyes_001.png"); *(_QWORD *)(a1 + 576) = v66; v127 = 0x100000302LL; (**((void (__fastcall ***)(__int64, __int64))v66 + 43))((__int64)v66 + 344, 0x100000302LL); (*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 560) + 456LL))( *(_QWORD *)(a1 + 560), *(_QWORD *)(a1 + 576), 2); v67 = *(_QWORD *)(a1 + 560); v68 = *(_QWORD *)(a1 + 576); v69 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v68 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v128, 0.0, 0.0); cocos2d::CCNode::convertToNodeSpace(v67, &v127, v70); v69(v68, v71); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 576) + 320LL) + 40LL))( *(_QWORD *)(a1 + 576) + 320LL, 0); cocos2d::CCSprite::createWithSpriteFrameName("GJ_secretLock2_2_001.png"); v74 = cocos2d::CCNode::create(v73, v72); v75 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_secretLock2_2_001.png"); *(_QWORD *)(a1 + 592) = v75; (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v74 + 456LL))( v74, v75, 0xFFFFFFFFLL); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 560) + 456LL))( *(_QWORD *)(a1 + 560), v74, 4294967294LL); v76 = *(_QWORD *)(a1 + 560); v77 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v74 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v128, 0.0, -30.0); cocos2d::CCNode::convertToNodeSpace(v76, &v127, v78); v77(v74, v79); v80 = *(_QWORD *)(a1 + 592); v81 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v80 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v128, 0.0, 25.0); v81(v80, v82); LOWORD(v127) = 18286; BYTE2(v127) = -103; (**(void (__fastcall ***)(__int64, __int64 *))(*(_QWORD *)(a1 + 592) + 320LL))(*(_QWORD *)(a1 + 592) + 320LL, &v127); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 560) + 160LL))(*(_QWORD *)(a1 + 560)); v83 = CCMenuItemSpriteExtra::create(*(_QWORD *)(a1 + 560), 0, a1, (__int64)SecretLayer5::onSubmit); *(_QWORD *)(a1 + 480) = v83; (*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v49 + 464LL))(v49, v83); v84 = *(_QWORD *)(a1 + 480); v85 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v84 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v128, v129 * 0.5, (float)(v130 * 0.5) - 25.0); cocos2d::CCNode::convertToNodeSpace(v49, &v127, v86); v85(v84, v87); *(_DWORD *)(*(_QWORD *)(a1 + 480) + 372LL) = 1060320051; v88 = LoadingCircleSprite::create(0.5); *(_QWORD *)(a1 + 640) = v88; (*(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v88 + 160LL))(v88); (*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 640), 28); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 640) + 320LL) + 40LL))( *(_QWORD *)(a1 + 640) + 320LL, 0); (*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 640) + 184LL))(*(_QWORD *)(a1 + 640), v131); v127 = 0x100000302LL; (**(void (__fastcall ***)(__int64, __int64))(*(_QWORD *)(a1 + 640) + 344LL))( *(_QWORD *)(a1 + 640) + 344LL, 0x100000302LL); LOWORD(v127) = 25800; BYTE2(v127) = -1; (**(void (__fastcall ***)(__int64, __int64 *))(*(_QWORD *)(a1 + 640) + 320LL))(*(_QWORD *)(a1 + 640) + 320LL, &v127); v89 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v128 = (void **)operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v128); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v89 = qword_14090BFD0; } v90 = v89; v91 = *(_DWORD *)(v89 + 1024); if ( v91 != 19 ) { if ( v91 ) { v92 = cocos2d::CCString::createWithFormat("gjFont%02d.png", v91); CString = cocos2d::CCString::getCString(v92); v95 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v94); cocos2d::CCTextureCache::removeTextureForKey(v95, CString); } v96 = cocos2d::CCString::createWithFormat("gjFont%02d.png", 19); v97 = cocos2d::CCString::getCString(v96); v99 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v98); cocos2d::CCTextureCache::addImage(v99, v97, 0); v89 = qword_14090BFD0; *(_DWORD *)(v90 + 1024) = 19; } v128 = (void **)&v134; v134 = 0; v135 = 1; v136 = 15; LOWORD(v134) = (unsigned __int8)asc_1406ED6E4[0]; if ( !v89 ) { v133 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v133); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v89 = qword_14090BFD0; } GameManager::loadFont(v89, 19); v100 = cocos2d::CCString::createWithFormat("gjFont%02d.fnt", 19); v101 = (char *)cocos2d::CCString::getCString(v100); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)Block, 0.5, 1.0); v103 = TextArea::create((__int64)&v134, v101, 1.0, 533.33331, v102, 1101004800, 0, 0); *(_QWORD *)(a1 + 648) = v103; v104 = *(void (__fastcall **)(char *, __int64))(*(_QWORD *)v103 + 288LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)Block, 0.5, 0.5); v104(v103, v105); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 648) + 160LL))(*(_QWORD *)(a1 + 648)); (*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 648), 3); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)Block, 0.0, 60.0); cocos2d::CCPoint::operator+(v131, &v127, v106); (*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 648) + 184LL))(*(_QWORD *)(a1 + 648), &v127); v108 = (cocos2d::CCObject *)cocos2d::CCArray::create(v107); *(_QWORD *)(a1 + 504) = v108; cocos2d::CCObject::retain(v108); LOWORD(v127) = 23160; do { v109 = cocos2d::CCSprite::createWithSpriteFrameName("towerTorchInner_001.png"); LOWORD(v127) = 23160; BYTE2(v127) = -103; (**((void (__fastcall ***)(__int64, __int64 *))v109 + 40))((__int64)v109 + 320, &v127); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v109, 4); v110 = *(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v109 + 184LL); v111 = 195; if ( !v2 ) v111 = -195; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)Block, (float)v111 + (float)(v129 * 0.5), (float)(v130 * 0.5) + 4.0); v110(v109, v112); v114 = (cocos2d::CCArray *)cocos2d::CCArray::create(v113); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v133, 0.0, 33.0); v116 = v115; v117 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v109 + 200LL))(v109); cocos2d::CCPoint::operator+(v117, &v128, v116); LevelAreaLayer::addTorch(a1, (__int64)&v128, 2, 1.0, 4u, 1, 1, (__int64)v114); v118 = *(cocos2d::CCArray **)(a1 + 504); v119 = cocos2d::CCArray::objectAtIndex(v114, 0); cocos2d::CCArray::addObject(v118, v119); v120 = *(cocos2d::CCArray **)(a1 + 504); v121 = cocos2d::CCArray::objectAtIndex(v114, 1u); cocos2d::CCArray::addObject(v120, v121); ++v2; } while ( v2 < 2 ); cocos2d::CCNode::scheduleUpdate((cocos2d::CCNode *)a1); v122 = *(_QWORD *)&qword_14090BFB0; if ( !*(_QWORD *)&qword_14090BFB0 ) { Block[0] = operator new(0x690u); *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)Block[0]); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0); v122 = *(_QWORD *)&qword_14090BFB0; } *(_QWORD *)(v122 + 1544) = a1 + 432; v123 = qword_14090BFD0; if ( !qword_14090BFD0 ) { Block[0] = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)Block[0]); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v123 = qword_14090BFD0; } if ( !GameManager::getUGV(v123, &word_14075A9E0) ) { *(_BYTE *)(a1 + 552) = 1; v124 = cocos2d::CCCallFunc::create(a1, SecretLayer5::showFirstDialog); v125 = cocos2d::CCDelayTime::create(1.2); v126 = cocos2d::CCSequence::create(v125, v124, 0); cocos2d::CCNode::runAction((cocos2d::CCNode *)a1, v126); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 464) + 920LL))(*(_QWORD *)(a1 + 464), 0); } return 1; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source