// // SecretLayer::init from 0x1006d17b0 to 0x1006d2304 (2900 bytes) // // 3 xrefs: // > SecretLayer::scene @ 0x1006d1660 // > SecretLayer::create @ 0x1006d176b // > @ 0x100b903e8 // // 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:35:39 +0000 // bool __fastcall SecretLayer::init(__int64 a1, __m128 a2) { bool result; // al __int64 v4; // rax __int64 v5; // rsi _QWORD *v6; // rax _QWORD *v7; // rdi __int64 v8; // rax __int64 v9; // r14 void *v10; // r15 __int64 v11; // r14 void *v12; // r15 __int64 v13; // rax __int64 v14; // r14 void *v15; // r15 __int64 v16; // r14 void *v17; // r15 __int64 v18; // rax __int64 v19; // r14 void *v20; // r15 __int64 v21; // r14 void *v22; // r15 __int64 v23; // rax __int64 v24; // r14 void *v25; // r15 __int64 v26; // r14 void *v27; // r15 __int64 v28; // rax __int64 v29; // r14 void *v30; // r15 __int64 v31; // r14 void *v32; // r15 __int64 v33; // rax __int64 v34; // r14 void *v35; // r15 __int64 v36; // r14 void *v37; // r15 __int64 v38; // rax __int64 v39; // r14 void *v40; // r15 __int64 v41; // r14 void *v42; // r15 const char *v43; // rsi __int64 v44; // rdi __int64 v45; // r14 char *v46; // r15 __int64 v47; // rax const char *v48; // rsi __int64 v49; // rdi __int64 v50; // r14 char *v51; // r15 __int64 v52; // rax const char *v53; // rsi __int64 v54; // rdi __int64 v55; // r14 char *v56; // r15 __int64 v57; // rax const char *v58; // rsi __int64 v59; // rdi __int64 v60; // r14 char *v61; // r15 __int64 v62; // rax __int64 v63; // rax __int64 v64; // r14 void *v65; // r15 float *v66; // r14 void *v67; // r14 void *v68; // rax __int64 v69; // r15 double v70; // xmm0_8 __int64 v71; // rdi std::string::pointer data; // rsi void *v73; // r15 void *v74; // rax _QWORD *v75; // rdi __int64 v76; // r14 double v77; // xmm0_8 char *v78; // rax void *v79; // r15 int v80; // edx int v81; // ecx int v82; // r8d int v83; // r9d __int64 v84; // r14 __int64 v85; // rax __int64 v86; // rax float v87; // xmm1_4 double v88; // xmm0_8 char *v89; // rax void *v90; // rax __int64 v91; // r15 unsigned int v92; // [rsp+8h] [rbp-B8h] BYREF unsigned __int64 v93; // [rsp+10h] [rbp-B0h] BYREF __m128 v94; // [rsp+18h] [rbp-A8h] BYREF std::string v95; // [rsp+28h] [rbp-98h] BYREF unsigned __int64 v96; // [rsp+40h] [rbp-80h] BYREF unsigned __int8 v97; // [rsp+48h] [rbp-78h] BYREF _BYTE v98[23]; // [rsp+49h] [rbp-77h] BYREF std::string v99; // [rsp+60h] [rbp-60h] BYREF unsigned __int64 v100[2]; // [rsp+78h] [rbp-48h] BYREF float v101; // [rsp+88h] [rbp-38h] __int64 v102; // [rsp+8Ch] [rbp-34h] BYREF bool v103; // [rsp+97h] [rbp-29h] result = cocos2d::CCLayer::init((_WORD *)a1); if ( !result ) return result; v103 = result; v4 = GameManager::sharedState(); v97 = 28; strcpy(v98, "secretLoop.mp3"); GameManager::fadeInMusic(a2, v4, &v97); if ( (v97 & 1) != 0 ) operator delete(*(void **)&v98[15]); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1072LL))(a1, 1); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1088LL))(a1, 1); v5 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v102, v5); v6 = cocos2d::CCDictionary::create(); *(_QWORD *)(a1 + 472) = v6; v7 = v6; cocos2d::CCObject::retain((__int64)v6); v8 = AchievementManager::sharedState(v7, v5); if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v8, "geometry.ach.secret06") ) { v9 = *(_QWORD *)(a1 + 472); v10 = cocos2d::CCNode::create(); (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v10 + 72LL))(v10, 6); cocos2d::CCDictionary::setObject_1(v9, (__int64)v10, 6); } v11 = *(_QWORD *)(a1 + 472); v12 = cocos2d::CCNode::create(); (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v12 + 72LL))(v12, 101); cocos2d::CCDictionary::setObject_1(v11, (__int64)v12, 101); v13 = AchievementManager::sharedState(v11, v12); if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v13, "geometry.ach.secret07") ) { v14 = *(_QWORD *)(a1 + 472); v15 = cocos2d::CCNode::create(); (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v15 + 72LL))(v15, 7); cocos2d::CCDictionary::setObject_1(v14, (__int64)v15, 7); } v16 = *(_QWORD *)(a1 + 472); v17 = cocos2d::CCNode::create(); (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v17 + 72LL))(v17, 102); cocos2d::CCDictionary::setObject_1(v16, (__int64)v17, 102); v18 = AchievementManager::sharedState(v16, v17); if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v18, "geometry.ach.secret08") ) { v19 = *(_QWORD *)(a1 + 472); v20 = cocos2d::CCNode::create(); (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v20 + 72LL))(v20, 8); cocos2d::CCDictionary::setObject_1(v19, (__int64)v20, 8); } v21 = *(_QWORD *)(a1 + 472); v22 = cocos2d::CCNode::create(); (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v22 + 72LL))(v22, 103); cocos2d::CCDictionary::setObject_1(v21, (__int64)v22, 103); v23 = AchievementManager::sharedState(v21, v22); if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v23, "geometry.ach.secret09") ) { v24 = *(_QWORD *)(a1 + 472); v25 = cocos2d::CCNode::create(); (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v25 + 72LL))(v25, 9); cocos2d::CCDictionary::setObject_1(v24, (__int64)v25, 9); } v26 = *(_QWORD *)(a1 + 472); v27 = cocos2d::CCNode::create(); (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v27 + 72LL))(v27, 104); cocos2d::CCDictionary::setObject_1(v26, (__int64)v27, 104); v28 = AchievementManager::sharedState(v26, v27); if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v28, "geometry.ach.secret10") ) { v29 = *(_QWORD *)(a1 + 472); v30 = cocos2d::CCNode::create(); (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v30 + 72LL))(v30, 10); cocos2d::CCDictionary::setObject_1(v29, (__int64)v30, 10); } v31 = *(_QWORD *)(a1 + 472); v32 = cocos2d::CCNode::create(); (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v32 + 72LL))(v32, 105); cocos2d::CCDictionary::setObject_1(v31, (__int64)v32, 105); v33 = AchievementManager::sharedState(v31, v32); if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v33, "geometry.ach.secret13") ) { v34 = *(_QWORD *)(a1 + 472); v35 = cocos2d::CCNode::create(); (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v35 + 72LL))(v35, 13); cocos2d::CCDictionary::setObject_1(v34, (__int64)v35, 13); } v36 = *(_QWORD *)(a1 + 472); v37 = cocos2d::CCNode::create(); (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v37 + 72LL))(v37, 120); cocos2d::CCDictionary::setObject_1(v36, (__int64)v37, 120); v38 = AchievementManager::sharedState(v36, v37); if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v38, "geometry.ach.secret14") ) { v39 = *(_QWORD *)(a1 + 472); v40 = cocos2d::CCNode::create(); (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v40 + 72LL))(v40, 14); cocos2d::CCDictionary::setObject_1(v39, (__int64)v40, 14); } v41 = *(_QWORD *)(a1 + 472); v42 = cocos2d::CCNode::create(); (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v42 + 72LL))(v42, 121); cocos2d::CCDictionary::setObject_1(v41, (__int64)v42, 121); v43 = "geometry.ach.secret15"; v44 = AchievementManager::sharedState(v41, v42); if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v44, "geometry.ach.secret15") ) { v45 = *(_QWORD *)(a1 + 472); v46 = (char *)cocos2d::CCNode::create(); (*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v46 + 72LL))(v46, 15); v44 = v45; v43 = v46; cocos2d::CCDictionary::setObject_1(v45, (__int64)v46, 15); } v47 = AchievementManager::sharedState(v44, v43); v48 = "geometry.ach.secret16"; v49 = v47; if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v47, "geometry.ach.secret16") ) { v50 = *(_QWORD *)(a1 + 472); v51 = (char *)cocos2d::CCNode::create(); (*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v51 + 72LL))(v51, 16); v49 = v50; v48 = v51; cocos2d::CCDictionary::setObject_1(v50, (__int64)v51, 16); } v52 = AchievementManager::sharedState(v49, v48); v53 = "geometry.ach.secret17"; v54 = v52; if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v52, "geometry.ach.secret17") ) { v55 = *(_QWORD *)(a1 + 472); v56 = (char *)cocos2d::CCNode::create(); (*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v56 + 72LL))(v56, 17); v54 = v55; v53 = v56; cocos2d::CCDictionary::setObject_1(v55, (__int64)v56, 17); } v57 = AchievementManager::sharedState(v54, v53); v58 = "geometry.ach.secret19"; v59 = v57; if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v57, "geometry.ach.secret19") ) { v60 = *(_QWORD *)(a1 + 472); v61 = (char *)cocos2d::CCNode::create(); (*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v61 + 72LL))(v61, 19); v59 = v60; v58 = v61; cocos2d::CCDictionary::setObject_1(v60, (__int64)v61, 19); } v62 = AchievementManager::sharedState(v59, v58); if ( !(unsigned __int8)AchievementManager::isAchievementEarned(v62, "geometry.ach.v2.secret03") ) { v63 = GameManager::sharedState(); if ( (unsigned __int8)GameManager::getUGV(v63, "2") ) { v64 = *(_QWORD *)(a1 + 472); v65 = cocos2d::CCNode::create(); (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v65 + 72LL))(v65, 11); cocos2d::CCDictionary::setObject_1(v64, (__int64)v65, 11); } } v66 = (float *)cocos2d::CCSprite::create_1((__int64)"GJ_gradientBG.png"); sub_100278250((float *)v100, 0.0, 0.0); (*(void (__fastcall **)(float *, unsigned __int64 *))(*(_QWORD *)v66 + 296LL))(v66, v100); (*(void (__fastcall **)(__int64, float *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v66, 4294967293LL); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v66 + 128LL))(v66, (float)(*(float *)&v102 + 10.0) / v66[108]); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v66 + 144LL))( v66, (float)(*((float *)&v102 + 1) + 10.0) / v66[109]); sub_100278250((float *)v100, -5.0, -5.0); (*(void (__fastcall **)(float *, unsigned __int64 *))(*(_QWORD *)v66 + 184LL))(v66, v100); BYTE2(v100[0]) = 100; LOWORD(v100[0]) = 19200; (*(void (__fastcall **)(float *, unsigned __int64 *))(*(_QWORD *)v66 + 960LL))(v66, v100); sub_100278270((__int64)v100, 0.0, 0.0, (__m128)0x42200000u, (__m128)0x42200000u); v67 = cocos2d::CCLabelBMFont::create_3((__int64)"The Vault", (__int64)"goldFont.fnt"); (*(void (__fastcall **)(void *, float))(*(_QWORD *)v67 + 160LL))(v67, 1.0); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)a1 + 456LL))(a1, v67); sub_100278250(v94.f32, *(float *)&v102 * 0.5, *((float *)&v102 + 1) + -24.0); (*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v67 + 184LL))(v67, &v94); sub_100278250((float *)&v93, *(float *)&v102 * 0.5, (float)(*((float *)&v102 + 1) * 0.5) + 50.0); v68 = cocos2d::CCLabelBMFont::create_3((__int64)" ", (__int64)"bigFont.fnt"); *(_QWORD *)(a1 + 456) = v68; (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)a1 + 456LL))(a1, v68); v69 = *(_QWORD *)(a1 + 456); sub_100278250((float *)&v96, 0.0, 43.0); sub_100278350((double *)v94.i64, &v93, &v96); (*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v69 + 184LL))(v69, &v94); if ( !*(_DWORD *)(a1 + 428) ) { *(_QWORD *)&v70 = 1065353216; if ( *(int *)(a1 + 440) <= 0 ) { v101 = (float)((float)*(int *)(a1 + 436) * -0.079999998) + 1.0; HIDWORD(v70) = 0; *(float *)&v70 = (float)rand() * 4.6566129e-10; if ( *(float *)&v70 > v101 ) SecretLayer::selectAThread(a1); } if ( !*(_DWORD *)(a1 + 428) ) { SecretLayer::getBasicMessage(&v99, a1, v70); v71 = *(_QWORD *)(a1 + 456); if ( (*(_BYTE *)&v99.__r_.__value_.__s.0 & 1) != 0 ) goto LABEL_35; LABEL_37: data = v99.__r_.__value_.__s.__data_; goto LABEL_38; } } SecretLayer::getThreadMessage(&v99); v71 = *(_QWORD *)(a1 + 456); if ( (*(_BYTE *)&v99.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_37; LABEL_35: data = v99.__r_.__value_.__l.__data_; LABEL_38: (*(void (__fastcall **)(__int64, std::string::pointer))(*(_QWORD *)v71 + 928LL))(v71, data); cocos2d::CCLabelBMFont::limitLabelWidth(*(_QWORD *)(a1 + 456), 320.0, (__m128)0x3F19999Au, (__m128)0LL); if ( (*(_BYTE *)&v99.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v99.__r_.__value_.__l.__data_); sub_1002787F0(&v94, v100); v73 = cocos2d::extension::CCScale9Sprite::create_2((__int64)"square02b_small.png", (unsigned __int64 *)&v94); (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v73 + 912LL))(v73, 100); sub_100278260(v94.f32, 200.0, 40.0); (*(void (__fastcall **)(void *, __m128 *))(*(_QWORD *)v73 + 320LL))(v73, &v94); (*(void (__fastcall **)(__int64, void *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v73, 4294967294LL); (*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v73 + 184LL))(v73, &v93); (*(void (__fastcall **)(void *, void *))(*(_QWORD *)v73 + 960LL))(v73, &unk_100A10BD0); v74 = CCTextInputNode::create((__int64)"...", (__int64)"Thonburi", 0x18u, (__int64)"bigFont.fnt", 180.0, 50.0); *(_QWORD *)(a1 + 448) = v74; (*(void (__fastcall **)(__int64, void *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v74, 20); v75 = *(_QWORD **)(a1 + 448); v75[73] = a1 + 408; (*(void (__fastcall **)(_QWORD *, unsigned __int64 *))(*v75 + 184LL))(v75, &v93); CCTextInputNode::setMaxLabelScale(*(_QWORD *)(a1 + 448), 0.69999999); CCTextInputNode::setMaxLabelWidth(*(_QWORD *)(a1 + 448), 180.0); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 448) + 576LL) + 344LL))( *(_QWORD *)(*(_QWORD *)(a1 + 448) + 576LL), 0); v76 = *(_QWORD *)(a1 + 448); *(_DWORD *)(v76 + 592) = 20; v95.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x40u); v95.__r_.__value_.__r.__words[0] = 65; v95.__r_.__value_.__l.__size_ = 63; strcpy(v95.__r_.__value_.__l.__data_, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); CCTextInputNode::setAllowedChars(v76, &v95); if ( (*(_BYTE *)&v95.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v95.__r_.__value_.__l.__data_); v77 = sub_1006D2460(a1, ""); v78 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_arrow_01_001.png", v77); v79 = CCMenuItemSpriteExtra::create((__int64)v78, 0, a1, (__int64)SecretLayer::onBack, 0); CCMenuItemSpriteExtra::setSizeMult((__int64)v79, 1.5); v84 = sub_1008735E0((_DWORD)v79, 0, v80, v81, v82, v83); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v84, 1); v85 = cocos2d::CCDirector::sharedDirector(); v101 = sub_100479760(v85) + 24.0; v86 = cocos2d::CCDirector::sharedDirector(); v87 = sub_100479740(v86) + -23.0; *(_QWORD *)&v88 = LODWORD(v101); sub_100278250((float *)&v96, v101, v87); (*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v84 + 184LL))(v84, &v96); if ( PlatformToolbox::isControllerConnected() ) GameToolbox::addBackButton(a1, (__int64)v79, v88); v89 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_secretLock_001.png", v88); v90 = CCMenuItemSpriteExtra::create((__int64)v89, 0, a1, (__int64)SecretLayer::onSubmit, 0); *(_QWORD *)(a1 + 464) = v90; (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v84 + 456LL))(v84, v90); v91 = *(_QWORD *)(a1 + 464); sub_100278250((float *)&v92, *(float *)&v102 * 0.5, (float)(0.5 * *((float *)&v102 + 1)) + -20.0); cocos2d::CCNode::convertToNodeSpace((double *)&v96, v84, &v92); (*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v91 + 184LL))(v91, &v96); CCMenuItemSpriteExtra::setSizeMult(*(_QWORD *)(a1 + 464), 0.69999999); return v103; }
GD Web Decomp Icon

GD Web Decomp

Raw Source