//
// CreatorLayer::onSecretVault from 0x1000dbfdc to 0x1000dc15c (384 bytes)
//
// 1 xrefs:
// > CreatorLayer::init @ 0x1000db30c
//
// 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 10:58:59 +0000
//
void __fastcall CreatorLayer::onSecretVault(_DWORD *a1)
{
int v2; // w0
__int64 Stat; // x0
int v4; // w19
__int64 v5; // x0
void *v6; // x0
int v7; // w8
int v8; // w8
char *v9; // x0
__int64 v10; // x20
std::string __p; // [xsp+0h] [xbp-60h] BYREF
void *v12[2]; // [xsp+20h] [xbp-40h] BYREF
char v13; // [xsp+37h] [xbp-29h]
std::string v14; // [xsp+38h] [xbp-28h] BYREF
v2 = GameStatsManager::sharedState(a1);
Stat = GameStatsManager::getStat(v2, "13");
if ( (int)Stat < 50 )
{
sub_100009900(&v14, "zzz");
v7 = a1[120];
if ( v7 < 0 )
v8 = llroundf(vcvts_n_f32_s32(rand(), 0x1Fu) * 10.0);
else
v8 = v7 + 1;
if ( v8 > 10 )
v8 = 0;
a1[120] = v8;
if ( (unsigned int)v8 <= 0xA )
std::string::assign(&v14, off_1008CF898[v8]);
sub_100009900(v12, "The Keymaster");
if ( SHIBYTE(v14.__r_.__value_.__r.__words[2]) < 0 )
sub_1000097D0(&__p, v14.__r_.__value_.__l.__data_, v14.__r_.__value_.__l.__size_);
else
__p = v14;
v9 = DialogObject::create((__int64)v12, (__int64)&__p, 2, 0, 0xFFFFFF, 1.0);
v10 = DialogLayer::create((__int64)v9, 2);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
if ( v13 < 0 )
operator delete(v12[0]);
(*(void (__fastcall **)(_DWORD *, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v10, 100);
DialogLayer::updateChatPlacement(v10, 0);
DialogLayer::animateInRandomSide(v10);
if ( SHIBYTE(v14.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v14.__r_.__value_.__l.__data_);
}
else
{
v4 = cocos2d::CCDirector::sharedDirector(Stat);
v5 = sub_1003A63C4();
v6 = (void *)cocos2d::CCTransitionFade::create_1(v5, 0.5);
cocos2d::CCDirector::replaceScene(v4, v6);
}
}