//
// SecretRewardsLayer::showLockedChest from 0xb9e3cc to 0xb9e688 (700 bytes)
//
// 1 xrefs:
// > ??> @ 0xab8b0
//
// 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:02:45 +0000
//
__int64 __fastcall SecretRewardsLayer::showLockedChest(SecretRewardsLayer *this)
{
int v2; // w23
DialogLayer *v3; // x0
DialogLayer *v4; // x21
char v5; // w1
int v6; // w0
__int64 v8; // [xsp+40h] [xbp+40h] BYREF
size_t v9; // [xsp+48h] [xbp+48h]
void *v10; // [xsp+50h] [xbp+50h]
__int64 v11[2]; // [xsp+58h] [xbp+58h] BYREF
void *v12; // [xsp+68h] [xbp+68h]
__int64 v13; // [xsp+70h] [xbp+70h] BYREF
size_t v14; // [xsp+78h] [xbp+78h]
void *v15; // [xsp+80h] [xbp+80h]
v8 = 0;
v9 = 0;
v10 = nullptr;
std::string::__init(&v8, "zzz", 3u);
switch ( *((_DWORD *)this + 148) )
{
case 0:
std::string::assign(&v8, "The chest is not ready.");
goto LABEL_3;
case 1:
std::string::assign(&v8, "It's still not ready...");
goto LABEL_3;
case 2:
std::string::assign(&v8, "Seriously, stop.");
goto LABEL_3;
case 3:
std::string::assign(&v8, "Wow it magically opened!");
v2 = 17;
goto LABEL_4;
case 4:
std::string::assign(&v8, "I was wrong.");
goto LABEL_3;
case 5:
std::string::assign(&v8, "S T O P");
goto LABEL_3;
case 6:
std::string::assign(&v8, "El cofre esta cerrado.");
goto LABEL_3;
case 7:
std::string::assign(&v8, "This is getting ridiculous.");
goto LABEL_3;
case 8:
std::string::assign(&v8, "I really can't help you.");
goto LABEL_3;
case 9:
std::string::assign(&v8, "Don't make me do it...");
goto LABEL_3;
case 0xA:
std::string::assign(
&v8,
"Roses are red. Violets are blue. This is not. 2.2");
goto LABEL_3;
default:
LABEL_3:
v2 = 2;
LABEL_4:
v11[0] = 0;
v11[1] = 0;
v12 = nullptr;
std::string::__init(v11, "The Keymaster", 0xDu);
v13 = 0;
v14 = 0;
v15 = nullptr;
if ( (v8 & 1) != 0 )
{
std::string::__init(&v13, v10, v9);
}
else
{
v13 = v8;
v14 = v9;
v15 = v10;
}
v3 = (DialogLayer *)DialogObject::create((char *)v11, (char *)&v13, v2, 0, 0xFFFFFF, 1.0);
v4 = (DialogLayer *)DialogLayer::create(v3, (DialogObject *)((char *)&dword_0 + 2));
if ( (v13 & 1) != 0 )
operator delete(v15);
if ( (v11[0] & 1) != 0 )
operator delete(v12);
DialogLayer::addToMainScene(v4);
DialogLayer::updateChatPlacement((__int64)v4, 0);
DialogLayer::animateInRandomSide(v4);
v5 = v8;
v6 = *((_DWORD *)this + 148) + 1;
if ( v6 > 10 )
v6 = 0;
*((_DWORD *)this + 148) = v6;
if ( (v5 & 1) != 0 )
operator delete(v10);
return _stack_chk_guard;
}
}