// // SecretLayer4::init from 0xa96da8 to 0xa9793c (2964 bytes) // // 3 xrefs: // > SecretLayer4::create @ 0xa97a08 // > @ 0x75ef8 // > @ 0x149ade0 // // This function is hookable on this platform (idp: arm, 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 13:00:44 +0000 // __int64 __fastcall SecretLayer4::init(SecretLayer4 *this) { cocos2d::CCTextureCache *v2; // x0 unsigned int v3; // w24 cocos2d::CCTextureCache *v5; // x0 cocos2d::CCSpriteFrameCache *v6; // x0 cocos2d::CCSpriteFrameCache *v7; // x0 GameManager *v8; // x0 __int64 v9; // x20 cocos2d::CCDirector *v10; // x0 cocos2d::CCDirector *v11; // x0 cocos2d::CCDictionary *WinSize; // x0 cocos2d::CCObject *v13; // x0 AchievementManager *v14; // x0 AchievementManager *v15; // x0 AchievementManager *isAchievementEarned; // x0 AchievementManager *v17; // x0 AchievementManager *v18; // x0 AchievementManager *v19; // x0 AchievementManager *v20; // x0 AchievementManager *v21; // x0 _BOOL8 v22; // x0 AchievementManager *v23; // x0 _BOOL8 v24; // x0 AchievementManager *v25; // x0 _BOOL8 v26; // x0 AchievementManager *v27; // x0 _BOOL8 v28; // x0 GameManager *v29; // x0 unsigned __int64 UGV; // x0 const char *v31; // x1 float *v32; // x21 void (__fastcall *v33)(float *, __int64 *); // x2 const char *v34; // x2 __int64 v35; // x21 const char *v36; // x2 __int64 v37; // x0 __int64 v38; // x2 __int64 v39; // x21 __int64 v40; // x21 const char *v41; // x4 __int64 v42; // x0 __int64 v43; // x21 const char *v44; // x1 __int64 v45; // x0 cocos2d::CCMenu *v46; // x25 cocos2d::CCDirector **v47; // x21 __int64 (__fastcall *v48)(cocos2d::CCDirector **, __int64 *); // x27 cocos2d::CCDirector *v49; // x0 cocos2d::CCDirector *ScreenLeft; // x0 float v51; // s0 float v52; // s9 cocos2d::CCDirector *v53; // x0 float v54; // s0 PlatformToolbox *v55; // x0 unsigned __int64 isControllerConnected; // x0 cocos2d::CCMenuItem *v57; // x2 __int64 v58; // x25 void (__fastcall *v59)(__int64, __int64 *); // x28 const char *v60; // x1 __int64 v61; // x28 __int64 v62; // x0 __int64 v63; // x25 void (__fastcall *v64)(__int64, __int64 *); // x28 GameStatsManager *v65; // x0 __int64 v66; // x21 _BOOL8 isSpecialChestUnlocked; // x0 _BOOL4 v68; // w21 cocos2d::CCNode *v69; // x25 GameStatsManager *v70; // x0 __int64 v71; // x21 __int64 RewardForSpecialChest; // x21 unsigned int *v73; // x21 __int64 *v74; // x19 char *v75; // x1 size_t v76; // x2 void (__fastcall *v77)(__int64 *, __int64 *); // x23 void (__fastcall *v78)(unsigned int *, __int64 *); // x23 __int64 v79; // x0 void (__fastcall *v80)(__int64 *, __int64 *); // x21 cocos2d::CCDictionary *v81; // x20 cocos2d::CCObject *v82; // x0 AchievementManager *v83; // x0 AchievementManager *v84; // x0 cocos2d::CCDictionary *v85; // x20 cocos2d::CCObject *v86; // x0 AchievementManager *v87; // x0 AchievementManager *v88; // x0 cocos2d::CCDictionary *v89; // x20 cocos2d::CCObject *v90; // x0 AchievementManager *v91; // x0 AchievementManager *v92; // x0 cocos2d::CCDictionary *v93; // x20 cocos2d::CCObject *v94; // x0 GameManager *v95; // x0 GameManager *v96; // x0 cocos2d::CCSequence *v97; // x20 cocos2d::CCFiniteTimeAction *v98; // x0 cocos2d::CCAction *v99; // x0 cocos2d::CCDictionary *v100; // x20 cocos2d::CCObject *v101; // x0 cocos2d::CCDictionary *v102; // x20 cocos2d::CCObject *v103; // x0 cocos2d::CCDictionary *v104; // x20 cocos2d::CCObject *v105; // x0 void (__fastcall *v106)(float *, __int64 *); // [xsp+80h] [xbp+80h] void (__fastcall *v107)(float *, __int64 *); // [xsp+80h] [xbp+80h] void (__fastcall *v108)(__int64, __int64 *); // [xsp+80h] [xbp+80h] void (__fastcall *v109)(__int64, __int64 *); // [xsp+80h] [xbp+80h] void (__fastcall *v110)(__int64, __int64 *); // [xsp+80h] [xbp+80h] float v111; // [xsp+80h] [xbp+80h] __int64 v112; // [xsp+90h] [xbp+90h] BYREF _BYTE v113[8]; // [xsp+98h] [xbp+98h] BYREF _BYTE v114[8]; // [xsp+A0h] [xbp+A0h] BYREF _BYTE v115[8]; // [xsp+A8h] [xbp+A8h] BYREF _BYTE v116[16]; // [xsp+B0h] [xbp+B0h] BYREF __int64 v117[2]; // [xsp+C0h] [xbp+C0h] BYREF __int64 v118; // [xsp+D0h] [xbp+D0h] BYREF size_t v119; // [xsp+D8h] [xbp+D8h] void *v120; // [xsp+E0h] [xbp+E0h] v2 = (cocos2d::CCTextureCache *)cocos2d::CCLayer::init(this); v3 = (unsigned __int8)v2; if ( !(_BYTE)v2 ) return v3; v5 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v2); v6 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCTextureCache::addImage(v5, "SecretSheet.png", 0); v7 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v6); v8 = (GameManager *)cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v7, "SecretSheet.plist"); v9 = GameManager::sharedState(v8); v118 = 0; v119 = 0; v120 = nullptr; std::string::__init(&v118, "secretLoop03.mp3", 0x10u); GameManager::fadeInMusic(v9, (unsigned __int8 *)&v118); if ( (v118 & 1) != 0 ) operator delete(v120); (*(void (__fastcall **)(SecretLayer4 *, __int64))(*(_QWORD *)this + 1072LL))(this, 1); v10 = (cocos2d::CCDirector *)(*(__int64 (__fastcall **)(SecretLayer4 *, __int64))(*(_QWORD *)this + 1088LL))(this, 1); v11 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v10); WinSize = (cocos2d::CCDictionary *)cocos2d::CCDirector::getWinSize(&v112, v11); v13 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(WinSize); *((_QWORD *)this + 60) = v13; v14 = (AchievementManager *)cocos2d::CCObject::retain(v13); v15 = (AchievementManager *)AchievementManager::sharedState(v14); isAchievementEarned = (AchievementManager *)AchievementManager::isAchievementEarned(v15, "geometry.ach.v3.secret01"); if ( !(_BYTE)isAchievementEarned ) { v104 = *((cocos2d::CCDictionary **)this + 60); v105 = (cocos2d::CCObject *)SecretLayer4::nodeWithTag(this, 1); isAchievementEarned = (AchievementManager *)cocos2d::CCDictionary::setObject(v104, v105, 1); } v17 = (AchievementManager *)AchievementManager::sharedState(isAchievementEarned); v18 = (AchievementManager *)AchievementManager::isAchievementEarned(v17, "geometry.ach.v3.secret02"); if ( !(_BYTE)v18 ) { v102 = *((cocos2d::CCDictionary **)this + 60); v103 = (cocos2d::CCObject *)SecretLayer4::nodeWithTag(this, 2); v18 = (AchievementManager *)cocos2d::CCDictionary::setObject(v102, v103, 2); } v19 = (AchievementManager *)AchievementManager::sharedState(v18); v20 = (AchievementManager *)AchievementManager::isAchievementEarned(v19, "geometry.ach.v3.secret03"); if ( !(_BYTE)v20 ) { v100 = *((cocos2d::CCDictionary **)this + 60); v101 = (cocos2d::CCObject *)SecretLayer4::nodeWithTag(this, 3); v20 = (AchievementManager *)cocos2d::CCDictionary::setObject(v100, v101, 3); } v21 = (AchievementManager *)AchievementManager::sharedState(v20); v22 = AchievementManager::isAchievementEarned(v21, "geometry.ach.v3.secret04"); if ( v22 ) { v23 = (AchievementManager *)AchievementManager::sharedState((AchievementManager *)v22); v24 = AchievementManager::isAchievementEarned(v23, "geometry.ach.v3.secret05"); if ( v24 ) goto LABEL_13; } else { v81 = *((cocos2d::CCDictionary **)this + 60); v82 = (cocos2d::CCObject *)SecretLayer4::nodeWithTag(this, 4); v83 = (AchievementManager *)cocos2d::CCDictionary::setObject(v81, v82, 4); v84 = (AchievementManager *)AchievementManager::sharedState(v83); v24 = AchievementManager::isAchievementEarned(v84, "geometry.ach.v3.secret05"); if ( v24 ) { LABEL_13: v25 = (AchievementManager *)AchievementManager::sharedState((AchievementManager *)v24); v26 = AchievementManager::isAchievementEarned(v25, "geometry.ach.v3.secret06"); if ( v26 ) goto LABEL_14; goto LABEL_37; } } v85 = *((cocos2d::CCDictionary **)this + 60); v86 = (cocos2d::CCObject *)SecretLayer4::nodeWithTag(this, 5); v87 = (AchievementManager *)cocos2d::CCDictionary::setObject(v85, v86, 5); v88 = (AchievementManager *)AchievementManager::sharedState(v87); v26 = AchievementManager::isAchievementEarned(v88, "geometry.ach.v3.secret06"); if ( v26 ) { LABEL_14: v27 = (AchievementManager *)AchievementManager::sharedState((AchievementManager *)v26); v28 = AchievementManager::isAchievementEarned(v27, "geometry.ach.v3.secret07"); if ( v28 ) goto LABEL_15; LABEL_38: v93 = *((cocos2d::CCDictionary **)this + 60); v94 = (cocos2d::CCObject *)SecretLayer4::nodeWithTag(this, 7); v95 = (GameManager *)cocos2d::CCDictionary::setObject(v93, v94, 7); v96 = (GameManager *)GameManager::sharedState(v95); UGV = (unsigned __int8)GameManager::getUGV(v96, "9"); if ( (_BYTE)UGV ) goto LABEL_16; goto LABEL_39; } LABEL_37: v89 = *((cocos2d::CCDictionary **)this + 60); v90 = (cocos2d::CCObject *)SecretLayer4::nodeWithTag(this, 6); v91 = (AchievementManager *)cocos2d::CCDictionary::setObject(v89, v90, 6); v92 = (AchievementManager *)AchievementManager::sharedState(v91); v28 = AchievementManager::isAchievementEarned(v92, "geometry.ach.v3.secret07"); if ( !v28 ) goto LABEL_38; LABEL_15: v29 = (GameManager *)GameManager::sharedState((GameManager *)v28); UGV = (unsigned __int8)GameManager::getUGV(v29, "9"); if ( (_BYTE)UGV ) goto LABEL_16; LABEL_39: v97 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)UGV, 0.8); v98 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(this, SecretLayer4::showFirstDialog, 0); v99 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v97, v98, 0); cocos2d::CCNode::runAction(this, v99); *((_DWORD *)this + 109) = 30; LABEL_16: v32 = (float *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v31); v106 = *(void (__fastcall **)(float *, __int64 *))(*(_QWORD *)v32 + 296LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v117, 0.0, 0.0); v106(v32, v117); (*(void (__fastcall **)(SecretLayer4 *, float *, __int64))(*(_QWORD *)this + 464LL))(this, v32, 4294967293LL); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v32 + 128LL))(v32, (float)(*(float *)&v112 + 10.0) / v32[108]); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v32 + 144LL))( v32, (float)(*((float *)&v112 + 1) + 10.0) / v32[109]); v107 = *(void (__fastcall **)(float *, __int64 *))(*(_QWORD *)v32 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v117, -5.0, -5.0); v107(v32, v117); v33 = *(void (__fastcall **)(float *, __int64 *))(*(_QWORD *)v32 + 960LL); strcpy((char *)v117, "K\n"); v33(v32, v117); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v116, 0.0, 0.0, 40.0, 40.0); v35 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Chamber of Time", "goldFont.fnt", v34); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v35 + 160LL))(v35, 1.0); (*(void (__fastcall **)(SecretLayer4 *, __int64))(*(_QWORD *)this + 456LL))(this, v35); v108 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v35 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v117, *(float *)&v112 * 0.5, *((float *)&v112 + 1) - 24.0); v108(v35, v117); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v113, *(float *)&v112 * 0.5, (float)(*((float *)&v112 + 1) * 0.5) + 50.0); v37 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)&byte_11E1A70, "bigFont.fnt", v36); v38 = *(_QWORD *)this; *((_QWORD *)this + 58) = v37; (*(void (__fastcall **)(SecretLayer4 *))(v38 + 456))(this); v39 = *((_QWORD *)this + 58); v109 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v39 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v115, 0.0, 43.0); cocos2d::CCPoint::operator+(v117, v113); v109(v39, v117); SecretLayer4::getMessage(this, &v118); SecretLayer4::updateMessageLabel((__int64)this, (char *)&v118); if ( (v118 & 1) != 0 ) operator delete(v120); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v117, (const cocos2d::CCRect *)v116); v40 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v117); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v40 + 912LL))(v40, 100); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v114, 200.0, 40.0); (*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v40 + 320LL))(v40, v114); (*(void (__fastcall **)(SecretLayer4 *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v40, 4294967294LL); (*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v40 + 184LL))(v40, v113); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v40 + 960LL))(v40, &unk_1178D38); v42 = CCTextInputNode::create( (CCTextInputNode *)"...", 180.0, 50.0, "Thonburi", (const char *)&off_18, "bigFont.fnt", v41); *((_QWORD *)this + 57) = v42; (*(void (__fastcall **)(SecretLayer4 *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v42, 20); *(_QWORD *)(*((_QWORD *)this + 57) + 584LL) = (char *)this + 408; (*(void (__fastcall **)(_QWORD, _BYTE *))(**((_QWORD **)this + 57) + 184LL))(*((_QWORD *)this + 57), v113); CCTextInputNode::setMaxLabelScale(*((CCTextInputNode **)this + 57), 0.7); CCTextInputNode::setMaxLabelWidth(*((CCTextInputNode **)this + 57), 180.0); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(*((_QWORD *)this + 57) + 576LL) + 344LL))( *(_QWORD *)(*((_QWORD *)this + 57) + 576LL), 0); *(_DWORD *)(*((_QWORD *)this + 57) + 592LL) = 100; v118 = 0; v43 = *((_QWORD *)this + 57); v119 = 0; v120 = nullptr; std::string::__init( &v118, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-!?:;)(/\\\"'`*=+-_%[]<>|@&^#{}%$~", 0x61u); CCTextInputNode::setAllowedChars(v43, (__int64)&v118); if ( (v118 & 1) != 0 ) operator delete(v120); SecretLayer4::updateSearchLabel(this, &byte_11B8890); v45 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v44); v46 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v45, 0, (__int64)this, (__int64)SecretLayer4::onBack, 0); CCMenuItemSpriteExtra::setSizeMult((__int64)v46, 1.5); v47 = (cocos2d::CCDirector **)cocos2d::CCMenu::create(v46, nullptr); (*(void (__fastcall **)(SecretLayer4 *, cocos2d::CCDirector **, __int64))(*(_QWORD *)this + 464LL))(this, v47, 1); v48 = *((__int64 (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v47 + 23); v49 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v47); ScreenLeft = (cocos2d::CCDirector *)cocos2d::CCDirector::getScreenLeft(v49); v52 = v51; v53 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(ScreenLeft); cocos2d::CCDirector::getScreenTop(v53); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v117, v52 + 24.0, v54 - 23.0); v55 = (PlatformToolbox *)v48(v47, v117); isControllerConnected = (unsigned __int8)PlatformToolbox::isControllerConnected(v55); if ( (_BYTE)isControllerConnected ) isControllerConnected = GameToolbox::addBackButton(this, v46, v57); v58 = cocos2d::CCNode::create((cocos2d::CCNode *)isControllerConnected); v59 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v58 + 320LL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v117, 80.0, 80.0); v59(v58, v117); v61 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_secretLock3_001.png", v60); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v58 + 456LL))(v58, v61); v110 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v61 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v117, 40.0, 40.0); v110(v61, v117); v62 = CCMenuItemSpriteExtra::create(v58, 0, (__int64)this, (__int64)SecretLayer4::onSubmit, 0); *((_QWORD *)this + 59) = v62; (*((void (__fastcall **)(cocos2d::CCDirector **, __int64))*v47 + 57))(v47, v62); v63 = *((_QWORD *)this + 59); v64 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v63 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v115, *(float *)&v112 * 0.5, (float)(*((float *)&v112 + 1) * 0.5) + -20.0); cocos2d::CCNode::convertToNodeSpace(v117, (cocos2d::CCNode *)v47, (const cocos2d::CCPoint *)v115); v64(v63, v117); v65 = (GameStatsManager *)CCMenuItemSpriteExtra::setSizeMult(*((_QWORD *)this + 59), 1.0); v66 = GameStatsManager::sharedState(v65); v118 = 0; v119 = 0; v120 = nullptr; std::string::__init(&v118, "0003", 4u); isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked(v66, (char *)&v118); v68 = isSpecialChestUnlocked; if ( (v118 & 1) != 0 ) { operator delete(v120); if ( v68 ) return v68; } else if ( isSpecialChestUnlocked ) { return v68; } v69 = (cocos2d::CCNode *)cocos2d::CCMenu::create((cocos2d::CCMenu *)isSpecialChestUnlocked); v70 = (GameStatsManager *)(*(__int64 (__fastcall **)(SecretLayer4 *, cocos2d::CCNode *, __int64))(*(_QWORD *)this + 464LL))( this, v69, 10); v71 = GameStatsManager::sharedState(v70); v118 = 0; v119 = 0; v120 = nullptr; std::string::__init(&v118, "0003", 4u); RewardForSpecialChest = GameStatsManager::getRewardForSpecialChest(v71, (__int64)&v118); if ( (v118 & 1) != 0 ) operator delete(v120); v73 = (unsigned int *)GJChestSprite::create((GJChestSprite *)*(unsigned int *)(RewardForSpecialChest + 64)); GJChestSprite::switchToState(v73, 2u, 0); (*(void (__fastcall **)(unsigned int *, float))(*(_QWORD *)v73 + 160LL))(v73, 0.6); v74 = (__int64 *)CCMenuItemSpriteExtra::create((__int64)v73, 0, (__int64)this, (__int64)SecretLayer4::onChest01, 0); v118 = 0; v119 = 0; v120 = nullptr; std::string::__init(&v118, "chestClick.ogg", 0xEu); if ( v74 + 55 != &v118 ) { if ( (v118 & 1) != 0 ) { v75 = (char *)v120; v76 = v119; } else { v76 = (unsigned __int8)v118 >> 1; v75 = (char *)&v118 + 1; } std::string::assign(v74 + 55, v75, v76); } if ( (v118 & 1) != 0 ) operator delete(v120); v77 = *(void (__fastcall **)(__int64 *, __int64 *))(*v74 + 320); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v117, 60.0, 48.0); v77(v74, v117); v78 = *(void (__fastcall **)(unsigned int *, __int64 *))(*(_QWORD *)v73 + 184LL); v111 = *(float *)(*(__int64 (__fastcall **)(__int64 *))(*v74 + 328))(v74) * 0.5; v79 = (*(__int64 (__fastcall **)(__int64 *))(*v74 + 328))(v74); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v117, v111, *(float *)(v79 + 4) * 0.5); v78(v73, v117); (*(void (__fastcall **)(cocos2d::CCNode *, __int64 *))(*(_QWORD *)v69 + 456LL))(v69, v74); v80 = *(void (__fastcall **)(__int64 *, __int64 *))(*v74 + 184); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v115, *(float *)&v112 - 60.0, 60.0); cocos2d::CCNode::convertToNodeSpace(v117, v69, (const cocos2d::CCPoint *)v115); v80(v74, v117); return v3; }
GD Web Decomp Icon

GD Web Decomp

Raw Source