//
// SecretLayer5::showFirstDialog from 0x10047ba10 to 0x10047bee7 (1239 bytes)
//
// 1 xrefs:
// > SecretLayer5::init @ 0x10047afe2
//
// 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 SecretLayer5::showFirstDialog(SecretLayer5 *a1)
{
GameManager *v2; // rdi
cocos2d::CCArray *v3; // r14
char *v4; // rax
char *v5; // rax
char *v6; // rax
char *v7; // rax
char *v8; // rax
DialogLayer *v9; // r14
std::string v10; // [rsp+8h] [rbp-108h] BYREF
std::string v11; // [rsp+20h] [rbp-F0h] BYREF
std::string v12; // [rsp+38h] [rbp-D8h] BYREF
std::string v13; // [rsp+50h] [rbp-C0h] BYREF
std::string v14; // [rsp+68h] [rbp-A8h] BYREF
__int128 v15; // [rsp+80h] [rbp-90h] BYREF
void *v16; // [rsp+90h] [rbp-80h]
__int128 v17; // [rsp+98h] [rbp-78h] BYREF
void *v18; // [rsp+A8h] [rbp-68h]
__int128 v19; // [rsp+B0h] [rbp-60h] BYREF
void *v20; // [rsp+C0h] [rbp-50h]
__int128 v21; // [rsp+C8h] [rbp-48h] BYREF
void *v22; // [rsp+D8h] [rbp-38h]
__int128 v23; // [rsp+E0h] [rbp-30h] BYREF
void *v24; // [rsp+F0h] [rbp-20h]
v2 = GameManager::sharedState();
GameManager::setUGV(v2, "38", 1);
v3 = (cocos2d::CCArray *)sub_10071F9E0(v2, "38");
LOBYTE(v15) = 20;
strcpy((char *)&v15 + 1, "The Wraith");
v10.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x58u);
v10.__r_.__value_.__r.__words[0] = 89;
v10.__r_.__value_.__l.__size_ = 86;
strcpy(
v10.__r_.__value_.__l.__data_,
"Great... Just what I needed.\nAnother visitor to my prison.");
v4 = DialogObject::create(&v15, &v10, 54, 1, 0xFFFFFF, 1.0);
sub_10071FCD0(v3, v4);
if ( (*(_BYTE *)&v10.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v10.__r_.__value_.__l.__data_);
if ( (v15 & 1) != 0 )
operator delete(v16);
LOBYTE(v17) = 20;
strcpy((char *)&v17 + 1, "The Wraith");
v11.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x60u);
v11.__r_.__value_.__r.__words[0] = 97;
v11.__r_.__value_.__l.__size_ = 95;
strcpy(
v11.__r_.__value_.__l.__data_,
"Must be my lucky day... or yours.\nI don't really have days anymore.");
v5 = DialogObject::create(&v17, &v11, 53, 0, 0xFFFFFF, 1.0);
sub_10071FCD0(v3, v5);
if ( (*(_BYTE *)&v11.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v11.__r_.__value_.__l.__data_);
if ( (v17 & 1) != 0 )
operator delete(v18);
LOBYTE(v19) = 20;
strcpy((char *)&v19 + 1, "The Wraith");
v12.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x78u);
v12.__r_.__value_.__r.__words[0] = 121;
v12.__r_.__value_.__l.__size_ = 115;
strcpy(
v12.__r_.__value_.__l.__data_,
"I wasn't always like this, you know.\n"
"I used to be something, greater...");
v6 = DialogObject::create(&v19, &v12, 55, 0, 0xFFFFFF, 1.0);
sub_10071FCD0(v3, v6);
if ( (*(_BYTE *)&v12.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v12.__r_.__value_.__l.__data_);
if ( (v19 & 1) != 0 )
operator delete(v20);
LOBYTE(v21) = 20;
strcpy((char *)&v21 + 1, "The Wraith");
v13.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x50u);
v13.__r_.__value_.__r.__words[0] = 81;
v13.__r_.__value_.__l.__size_ = 72;
strcpy(v13.__r_.__value_.__l.__data_, "Now instead, I get to listen to you.\nWhat a treat...");
v7 = DialogObject::create(&v21, &v13, 53, 0, 0xFFFFFF, 1.0);
sub_10071FCD0(v3, v7);
if ( (*(_BYTE *)&v13.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v13.__r_.__value_.__l.__data_);
if ( (v21 & 1) != 0 )
operator delete(v22);
LOBYTE(v23) = 20;
strcpy((char *)&v23 + 1, "The Wraith");
v14.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x48u);
v14.__r_.__value_.__r.__words[0] = 73;
v14.__r_.__value_.__l.__size_ = 69;
strcpy(v14.__r_.__value_.__l.__data_, "Go on, or don't.\nNot like I can stop you.");
v8 = DialogObject::create(&v23, &v14, 56, 0, 0xFFFFFF, 1.0);
sub_10071FCD0(v3, v8);
if ( (*(_BYTE *)&v14.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v14.__r_.__value_.__l.__data_);
if ( (v23 & 1) != 0 )
operator delete(v24);
v9 = DialogLayer::createWithObjects(v3, 4);
((void (__fastcall *)(SecretLayer5 *, DialogLayer *, __int64))a1->addChild_0)(a1, v9, 100);
DialogLayer::updateChatPlacement(v9, Center);
DialogLayer::animateIn(v9, FromLeft);
a1->m_uiLocked = 0;
((void (__fastcall *)(CCTextInputNode *, __int64))a1->m_textInput->setTouchEnabled)(a1->m_textInput, 1);
}