//
// SecretRewardsLayer::showLockedChest from 0x100633160 to 0x1006332fc (412 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall SecretRewardsLayer::showLockedChest(SecretRewardsLayer *a1)
{
double v1; // xmm0_8
int v2; // r14d
const std::string::value_type *v3; // rsi
char *v4; // rax
DialogLayer *v5; // r14
int m_lockedDialogIndex; // eax
int v7; // edx
std::string v8; // [rsp+0h] [rbp-60h] BYREF
__int128 v9; // [rsp+20h] [rbp-40h] BYREF
void *v10; // [rsp+30h] [rbp-30h]
std::string v11; // [rsp+38h] [rbp-28h] BYREF
v11.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)6;
*(_DWORD *)((char *)&v11.__r_.__value_.__l.0 + 1) = 8026746;
v2 = 2;
switch ( a1->m_lockedDialogIndex )
{
case 0:
v3 = "The chest is not ready.";
goto LABEL_13;
case 1:
v3 = "It's still not ready...";
goto LABEL_13;
case 2:
v3 = "Seriously, stop.";
goto LABEL_13;
case 3:
v2 = 17;
std::string::assign(&v11, "Wow it magically opened!");
break;
case 4:
v3 = "I was wrong.";
goto LABEL_13;
case 5:
v3 = "S T O P";
goto LABEL_13;
case 6:
v3 = "El cofre esta cerrado.";
goto LABEL_13;
case 7:
v3 = "This is getting ridiculous.";
goto LABEL_13;
case 8:
v3 = "I really can't help you.";
goto LABEL_13;
case 9:
v3 = "Don't make me do it...";
goto LABEL_13;
case 0xA:
v3 = "Roses are red. Violets are blue. This is not. 2.2";
LABEL_13:
std::string::assign(&v11, v3);
break;
default:
break;
}
LOBYTE(v9) = 26;
strcpy((char *)&v9 + 1, "The Keymaster");
if ( (*(_BYTE *)&v11.__r_.__value_.__s.0 & 1) != 0 )
sub_100006B70(&v8, v11.__r_.__value_.__l.__data_, v11.__r_.__value_.__l.__size_, v1);
else
v8 = v11;
v4 = DialogObject::create(&v9, &v8, v2, 0, 0xFFFFFF, 1.0);
v5 = DialogLayer::create((DialogObject *)v4, 2);
if ( (*(_BYTE *)&v8.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v8.__r_.__value_.__l.__data_);
if ( (v9 & 1) != 0 )
operator delete(v10);
DialogLayer::addToMainScene(v5);
DialogLayer::updateChatPlacement(v5, Center);
DialogLayer::animateInRandomSide(v5);
m_lockedDialogIndex = a1->m_lockedDialogIndex;
v7 = 0;
if ( m_lockedDialogIndex < 10 )
v7 = m_lockedDialogIndex + 1;
a1->m_lockedDialogIndex = v7;
if ( (*(_BYTE *)&v11.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v11.__r_.__value_.__l.__data_);
}