//
// SecretLayer::init from 0x5feaa0 to 0x5ff200 (1888 bytes)
//
// 1 xrefs:
// > SecretLayer::create @ 0x5fca24
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:54:39 +0000
//
GameManager *__fastcall SecretLayer::init(SecretLayer *this)
{
GameManager *v2; // r0
GameManager *v3; // r9
FMODAudioEngine *v4; // r5
cocos2d::CCDirector *v5; // r0
cocos2d::CCDictionary *WinSize; // r0
cocos2d::CCObject *v7; // r0
AchievementManager *v8; // r0
AchievementManager *v9; // r0
cocos2d::CCDictionary *v10; // r5
cocos2d::CCObject *v11; // r0
cocos2d::CCDictionary *v12; // r5
cocos2d::CCObject *v13; // r0
AchievementManager *v14; // r0
AchievementManager *v15; // r0
cocos2d::CCDictionary *v16; // r5
cocos2d::CCObject *v17; // r0
cocos2d::CCDictionary *v18; // r5
cocos2d::CCObject *v19; // r0
AchievementManager *v20; // r0
AchievementManager *v21; // r0
cocos2d::CCDictionary *v22; // r5
cocos2d::CCObject *v23; // r0
cocos2d::CCDictionary *v24; // r5
cocos2d::CCObject *v25; // r0
AchievementManager *v26; // r0
AchievementManager *v27; // r0
cocos2d::CCDictionary *v28; // r5
cocos2d::CCObject *v29; // r0
cocos2d::CCDictionary *v30; // r5
cocos2d::CCObject *v31; // r0
AchievementManager *v32; // r0
AchievementManager *v33; // r0
cocos2d::CCDictionary *v34; // r5
cocos2d::CCObject *v35; // r0
cocos2d::CCDictionary *v36; // r5
cocos2d::CCObject *v37; // r0
AchievementManager *v38; // r0
AchievementManager *v39; // r0
cocos2d::CCDictionary *v40; // r5
cocos2d::CCObject *v41; // r0
cocos2d::CCDictionary *v42; // r5
cocos2d::CCObject *v43; // r0
AchievementManager *v44; // r0
AchievementManager *v45; // r0
cocos2d::CCDictionary *v46; // r5
cocos2d::CCObject *v47; // r0
cocos2d::CCDictionary *v48; // r5
cocos2d::CCObject *v49; // r0
AchievementManager *v50; // r0
AchievementManager *v51; // r0
AchievementManager *isAchievementEarned; // r0
cocos2d::CCDictionary *v53; // r5
cocos2d::CCObject *v54; // r0
AchievementManager *v55; // r0
AchievementManager *v56; // r0
cocos2d::CCDictionary *v57; // r5
cocos2d::CCObject *v58; // r0
AchievementManager *v59; // r0
AchievementManager *v60; // r0
cocos2d::CCDictionary *v61; // r5
cocos2d::CCObject *v62; // r0
AchievementManager *v63; // r0
AchievementManager *v64; // r0
cocos2d::CCDictionary *v65; // r5
cocos2d::CCObject *v66; // r0
AchievementManager *v67; // r0
const char *v68; // r1
GameManager *v69; // r0
float *v70; // r6
void (__fastcall *v71)(float *, _DWORD *); // r10
void (__fastcall *v72)(float *, _DWORD *); // r10
void (__fastcall *v73)(float *, _DWORD *); // r3
const char *v74; // r2
int v75; // r6
void (__fastcall *v76)(int, _DWORD *); // r10
const char *v77; // r2
int v78; // r0
int v79; // r3
int v80; // r6
int v81; // r6
int *v82; // r0
int v83; // r3
int v84; // r6
const char *v85; // r1
int v86; // r0
cocos2d::CCMenu *v87; // r7
const cocos2d::CCPoint *v88; // r6
cocos2d::CCDirector *v89; // r0
int (__fastcall *v90)(const cocos2d::CCPoint *, _DWORD *); // r10
cocos2d::CCDirector *v91; // r0
float v92; // s18
cocos2d::CCDirector *v93; // r0
float v94; // r0
PlatformToolbox *v95; // r0
const char *v96; // r1
cocos2d::CCMenuItem *v97; // r2
int v98; // r0
int v99; // r0
int v100; // r7
void (__fastcall *v101)(int, char *); // r11
cocos2d::CCDictionary *v103; // r5
cocos2d::CCObject *v104; // r0
void (__fastcall *v105)(int, _DWORD *); // [sp+Ch] [bp-68h]
float v106; // [sp+10h] [bp-64h] BYREF
float v107; // [sp+14h] [bp-60h]
_BYTE v108[8]; // [sp+18h] [bp-5Ch] BYREF
_BYTE v109[8]; // [sp+20h] [bp-54h] BYREF
char v110[8]; // [sp+28h] [bp-4Ch] BYREF
char v111[8]; // [sp+30h] [bp-44h] BYREF
char v112[4]; // [sp+38h] [bp-3Ch] BYREF
int v113; // [sp+3Ch] [bp-38h]
int v114; // [sp+40h] [bp-34h] BYREF
int v115; // [sp+44h] [bp-30h]
int v116; // [sp+48h] [bp-2Ch]
_BYTE v117[16]; // [sp+4Ch] [bp-28h] BYREF
_DWORD v118[4]; // [sp+5Ch] [bp-18h] BYREF
v2 = (GameManager *)cocos2d::CCLayer::init(this);
v3 = v2;
if ( v2 )
{
v114 = 0;
v115 = 0;
v116 = 0;
v4 = (FMODAudioEngine *)GameManager::sharedState(v2);
std::string::__init(&v114, "secretLoop.mp3", 0xEu);
GameManager::fadeInMusic(v4, (unsigned __int8 *)&v114);
std::string::~string((int)&v114);
(*(void (__fastcall **)(SecretLayer *, int))(*(_DWORD *)this + 536))(this, 1);
v5 = (cocos2d::CCDirector *)(*(int (__fastcall **)(SecretLayer *, int))(*(_DWORD *)this + 544))(this, 1);
cocos2d::CCDirector::sharedDirector(v5);
WinSize = (cocos2d::CCDictionary *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v106);
v7 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(WinSize);
*((_DWORD *)this + 89) = v7;
v8 = (AchievementManager *)cocos2d::CCObject::retain(v7);
v9 = (AchievementManager *)AchievementManager::sharedState(v8);
if ( !AchievementManager::isAchievementEarned(v9, "geometry.ach.secret06") )
{
v10 = *((cocos2d::CCDictionary **)this + 89);
v11 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 6);
cocos2d::CCDictionary::setObject(v10, v11, 6);
}
v12 = *((cocos2d::CCDictionary **)this + 89);
v13 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 101);
v14 = (AchievementManager *)cocos2d::CCDictionary::setObject(v12, v13, 101);
v15 = (AchievementManager *)AchievementManager::sharedState(v14);
if ( !AchievementManager::isAchievementEarned(v15, "geometry.ach.secret07") )
{
v16 = *((cocos2d::CCDictionary **)this + 89);
v17 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 7);
cocos2d::CCDictionary::setObject(v16, v17, 7);
}
v18 = *((cocos2d::CCDictionary **)this + 89);
v19 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 102);
v20 = (AchievementManager *)cocos2d::CCDictionary::setObject(v18, v19, 102);
v21 = (AchievementManager *)AchievementManager::sharedState(v20);
if ( !AchievementManager::isAchievementEarned(v21, "geometry.ach.secret08") )
{
v22 = *((cocos2d::CCDictionary **)this + 89);
v23 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 8);
cocos2d::CCDictionary::setObject(v22, v23, 8);
}
v24 = *((cocos2d::CCDictionary **)this + 89);
v25 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 103);
v26 = (AchievementManager *)cocos2d::CCDictionary::setObject(v24, v25, 103);
v27 = (AchievementManager *)AchievementManager::sharedState(v26);
if ( !AchievementManager::isAchievementEarned(v27, "geometry.ach.secret09") )
{
v28 = *((cocos2d::CCDictionary **)this + 89);
v29 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 9);
cocos2d::CCDictionary::setObject(v28, v29, 9);
}
v30 = *((cocos2d::CCDictionary **)this + 89);
v31 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 104);
v32 = (AchievementManager *)cocos2d::CCDictionary::setObject(v30, v31, 104);
v33 = (AchievementManager *)AchievementManager::sharedState(v32);
if ( !AchievementManager::isAchievementEarned(v33, "geometry.ach.secret10") )
{
v34 = *((cocos2d::CCDictionary **)this + 89);
v35 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 10);
cocos2d::CCDictionary::setObject(v34, v35, 10);
}
v36 = *((cocos2d::CCDictionary **)this + 89);
v37 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 105);
v38 = (AchievementManager *)cocos2d::CCDictionary::setObject(v36, v37, 105);
v39 = (AchievementManager *)AchievementManager::sharedState(v38);
if ( !AchievementManager::isAchievementEarned(v39, "geometry.ach.secret13") )
{
v40 = *((cocos2d::CCDictionary **)this + 89);
v41 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 13);
cocos2d::CCDictionary::setObject(v40, v41, 13);
}
v42 = *((cocos2d::CCDictionary **)this + 89);
v43 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 120);
v44 = (AchievementManager *)cocos2d::CCDictionary::setObject(v42, v43, 120);
v45 = (AchievementManager *)AchievementManager::sharedState(v44);
if ( !AchievementManager::isAchievementEarned(v45, "geometry.ach.secret14") )
{
v46 = *((cocos2d::CCDictionary **)this + 89);
v47 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 14);
cocos2d::CCDictionary::setObject(v46, v47, 14);
}
v48 = *((cocos2d::CCDictionary **)this + 89);
v49 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 121);
v50 = (AchievementManager *)cocos2d::CCDictionary::setObject(v48, v49, 121);
v51 = (AchievementManager *)AchievementManager::sharedState(v50);
isAchievementEarned = (AchievementManager *)AchievementManager::isAchievementEarned(v51, "geometry.ach.secret15");
if ( !isAchievementEarned )
{
v53 = *((cocos2d::CCDictionary **)this + 89);
v54 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 15);
isAchievementEarned = (AchievementManager *)cocos2d::CCDictionary::setObject(v53, v54, 15);
}
v55 = (AchievementManager *)AchievementManager::sharedState(isAchievementEarned);
v56 = (AchievementManager *)AchievementManager::isAchievementEarned(v55, "geometry.ach.secret16");
if ( !v56 )
{
v57 = *((cocos2d::CCDictionary **)this + 89);
v58 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 16);
v56 = (AchievementManager *)cocos2d::CCDictionary::setObject(v57, v58, 16);
}
v59 = (AchievementManager *)AchievementManager::sharedState(v56);
v60 = (AchievementManager *)AchievementManager::isAchievementEarned(v59, "geometry.ach.secret17");
if ( !v60 )
{
v61 = *((cocos2d::CCDictionary **)this + 89);
v62 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 17);
v60 = (AchievementManager *)cocos2d::CCDictionary::setObject(v61, v62, 17);
}
v63 = (AchievementManager *)AchievementManager::sharedState(v60);
v64 = (AchievementManager *)AchievementManager::isAchievementEarned(v63, "geometry.ach.secret19");
if ( !v64 )
{
v65 = *((cocos2d::CCDictionary **)this + 89);
v66 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 19);
v64 = (AchievementManager *)cocos2d::CCDictionary::setObject(v65, v66, 19);
}
v67 = (AchievementManager *)AchievementManager::sharedState(v64);
if ( !AchievementManager::isAchievementEarned(v67, "geometry.ach.v2.secret03") )
{
v69 = (GameManager *)GameManager::sharedState(nullptr);
if ( GameManager::getUGV(v69, (char *)&a1i2r3e45s789g[2]) )
{
v103 = *((cocos2d::CCDictionary **)this + 89);
v104 = (cocos2d::CCObject *)SecretLayer::nodeWithTag(this, 11);
cocos2d::CCDictionary::setObject(v103, v104, 11);
}
}
v70 = (float *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v68);
v71 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v70 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v118, 0.0, 0.0);
v71(v70, v118);
(*(void (__fastcall **)(SecretLayer *, float *, int))(*(_DWORD *)this + 232))(this, v70, -3);
(*(void (__fastcall **)(float *, _DWORD))(*(_DWORD *)v70 + 64))(v70, (float)(v106 + 10.0) / v70[86]);
(*(void (__fastcall **)(float *, _DWORD))(*(_DWORD *)v70 + 72))(v70, (float)(v107 + 10.0) / v70[87]);
v72 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v70 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v118, -5.0, -5.0);
v72(v70, v118);
v73 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v70 + 480);
LOWORD(v118[0]) = 19200;
BYTE2(v118[0]) = 100;
v73(v70, v118);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v117, 0.0, 0.0, 40.0, 40.0);
v75 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"The Vault", "goldFont.fnt", v74);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v75 + 80))(v75, 1065353216);
(*(void (__fastcall **)(SecretLayer *, int))(*(_DWORD *)this + 228))(this, v75);
v76 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v75 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v118, v106 * 0.5, v107 - 24.0);
v76(v75, v118);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v108, v106 * 0.5, (float)(v107 * 0.5) + 50.0);
v78 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)" ", "bigFont.fnt", v77);
v79 = *(_DWORD *)this;
*((_DWORD *)this + 87) = v78;
(*(void (__fastcall **)(SecretLayer *, int))(v79 + 228))(this, v78);
v80 = *((_DWORD *)this + 87);
v105 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v80 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v112, 0.0, 43.0);
cocos2d::CCPoint::operator+(v118, v108, v112);
v105(v80, v118);
SecretLayer::getMessage((SecretLayer *)&v114, this);
SecretLayer::updateMessageLabel((int)this, (int)&v114);
std::string::~string((int)&v114);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v118, (const cocos2d::CCRect *)v117);
v81 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v118);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v81 + 456))(v81, 100);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v109, 200.0, 40.0);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v81 + 160))(v81, v109);
(*(void (__fastcall **)(SecretLayer *, int, int))(*(_DWORD *)this + 232))(this, v81, -2);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v81 + 92))(v81, v108);
(*(void (__fastcall **)(int, void *))(*(_DWORD *)v81 + 480))(v81, &unk_BEE6A6);
v82 = CCTextInputNode::create(
(CCTextInputNode *)0x43340000,
50.0,
"...",
"Thonburi",
(const char *)&dword_18,
"bigFont.fnt",
v112);
v83 = *(_DWORD *)this;
*((_DWORD *)this + 86) = v82;
(*(void (__fastcall **)(SecretLayer *, int *, int))(v83 + 232))(this, v82, 20);
*(_DWORD *)(*((_DWORD *)this + 86) + 420) = (char *)this + 316;
(*(void (__fastcall **)(_DWORD, _BYTE *))(**((_DWORD **)this + 86) + 92))(*((_DWORD *)this + 86), v108);
CCTextInputNode::setMaxLabelScale(*((_DWORD *)this + 86), 0.7);
CCTextInputNode::setMaxLabelWidth(*((_DWORD *)this + 86), 180.0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(*((_DWORD *)this + 86) + 416) + 172))(
*(_DWORD *)(*((_DWORD *)this + 86) + 416),
0);
*(_DWORD *)(*((_DWORD *)this + 86) + 424) = 20;
v84 = *((_DWORD *)this + 86);
v114 = 0;
v115 = 0;
v116 = 0;
std::string::__init(&v114, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", 0x3Fu);
CCTextInputNode::setAllowedChars(v84, (unsigned __int8 *)&v114);
std::string::~string((int)&v114);
SecretLayer::updateSearchLabel(this, (const char *)&unk_B6B226);
v86 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v85);
*(_DWORD *)v112 = SecretLayer::onBack;
v113 = 0;
v87 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v86, 0, (int)this, (int)SecretLayer::onBack, 0);
CCMenuItemSpriteExtra::setSizeMult((int)v87, 1.5);
v88 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v87, nullptr);
v89 = (cocos2d::CCDirector *)(*(int (__fastcall **)(SecretLayer *, const cocos2d::CCPoint *, int))(*(_DWORD *)this + 232))(
this,
v88,
1);
v90 = *(int (__fastcall **)(const cocos2d::CCPoint *, _DWORD *))(*(_DWORD *)v88 + 92);
v91 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v89);
v92 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v91));
v93 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v92));
v94 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v93));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v118, v92 + 24.0, v94 - 23.0);
v95 = (PlatformToolbox *)v90(v88, v118);
if ( PlatformToolbox::isControllerConnected(v95) )
GameToolbox::addBackButton(this, v87, v97);
v98 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_secretLock_001.png", v96);
v118[0] = SecretLayer::onSubmit;
v118[1] = 0;
v99 = CCMenuItemSpriteExtra::create(v98, 0, (int)this, (int)SecretLayer::onSubmit, 0);
*((_DWORD *)this + 88) = v99;
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v88 + 228))(v88, v99);
v100 = *((_DWORD *)this + 88);
v101 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v100 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v110, v106 * 0.5, (float)(v107 * 0.5) - 20.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v111, v88);
v101(v100, v111);
CCMenuItemSpriteExtra::setSizeMult(*((_DWORD *)this + 88), 0.7);
}
return v3;
}