//
// OptionsLayer::onSecretVault from 0x5326f4 to 0x5328ac (440 bytes)
//
// 0 xrefs:
//
// 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:52:05 +0000
//
int __fastcall OptionsLayer::onSecretVault(OptionsLayer *this, cocos2d::CCObject *a2)
{
GameStatsManager *v3; // r0
cocos2d::CCDirector *Stat; // r0
SecretLayer *v5; // r4
float v6; // r0
cocos2d::CCScene *v7; // r2
cocos2d::CCScene *v8; // r0
int v10; // r3
char *v11; // r1
DialogLayer *v12; // r0
int v13; // r2
DialogLayer *v14; // r9
int v15; // [sp+4h] [bp-30h]
int v16[3]; // [sp+8h] [bp-2Ch] BYREF
int v17[3]; // [sp+14h] [bp-20h] BYREF
int v18[3]; // [sp+20h] [bp-14h] BYREF
v3 = (GameStatsManager *)GameStatsManager::sharedState(this);
Stat = (cocos2d::CCDirector *)GameStatsManager::getStat(v3, "12");
if ( (int)Stat <= 9 )
{
memset(v16, 0, sizeof(v16));
std::string::__init(v16, "zzz", 3u);
v10 = *((_DWORD *)this + 128);
if ( v10 >= 0 )
{
*((_DWORD *)this + 128) = v10 + 1;
}
else
{
rand();
*((_DWORD *)this + 128) = lroundf();
}
if ( *((int *)this + 128) > 10 )
*((_DWORD *)this + 128) = 0;
switch ( *((_DWORD *)this + 128) )
{
case 0:
v11 = "Go away!";
goto LABEL_20;
case 1:
v11 = "No!";
goto LABEL_20;
case 2:
v11 = "It's a secret...";
goto LABEL_20;
case 3:
v11 = "Stop it!";
goto LABEL_20;
case 4:
v11 = "Not allowed!";
goto LABEL_20;
case 5:
v11 = "Why u click?";
goto LABEL_20;
case 6:
v11 = "Nothing to see here...";
goto LABEL_20;
case 7:
v11 = "Don't touch!";
goto LABEL_20;
case 8:
v11 = "Just, stop.";
goto LABEL_20;
case 9:
v11 = "No one seems to be home.";
goto LABEL_20;
case 0xA:
v11 = "zzzZZZ...";
LABEL_20:
std::string::assign(v16, v11);
break;
default:
break;
}
memset(v17, 0, sizeof(v17));
std::string::__init(v17, "The Guard", 9u);
std::string::basic_string(v18, (int)v16);
LOWORD(v15) = -1;
BYTE2(v15) = -1;
v12 = (DialogLayer *)DialogObject::create(v17, v18, 1, 1065353216, 0, v15);
v14 = (DialogLayer *)DialogLayer::create(v12, (DialogObject *)((char *)&dword_0 + 1), v13);
std::string::~string((int)v18);
std::string::~string((int)v17);
(*(void (__fastcall **)(OptionsLayer *, DialogLayer *, int))(*(_DWORD *)this + 232))(this, v14, 100);
DialogLayer::updateChatPlacement(v14, 0);
DialogLayer::animateInRandomSide(v14);
return std::string::~string((int)v16);
}
else
{
v5 = (SecretLayer *)cocos2d::CCDirector::sharedDirector(Stat);
v6 = COERCE_FLOAT(SecretLayer::scene(v5));
v8 = (cocos2d::CCScene *)cocos2d::CCTransitionFade::create((cocos2d::CCTransitionFade *)0x3F000000, v6, v7);
return cocos2d::CCDirector::replaceScene(v5, v8);
}
}