//
// SecretLayer5::showFirstDialog from 0x14058d1d0 to 0x14058d812 (1602 bytes)
//
// 2 xrefs:
// > SecretLayer5::init @ 0x14058a7e5
// > ??> @ 0x14092cbc4
//
// This function is hookable on this platform (idp: pc, 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 11:34:30 +0000
//
// Hidden C++ exception states: #wind=2
__int64 __fastcall SecretLayer5::showFirstDialog(__int64 a1)
{
__int64 v2; // rcx
__int64 v3; // rcx
cocos2d::CCArray *v4; // rbx
void **v5; // rax
void **v6; // rax
void **v7; // rax
void **v8; // rax
void **v9; // rax
cocos2d::CCLayerColor *DialogLayer; // rsi
__int64 v11; // rcx
__int64 v12; // rax
__int64 v13; // rdi
__int64 v14; // rbx
__int64 v15; // rax
__int64 v16; // rdx
__int128 v18; // [rsp+30h] [rbp-50h] BYREF
__int64 v19; // [rsp+40h] [rbp-40h]
__int64 v20; // [rsp+48h] [rbp-38h]
__int128 v21; // [rsp+50h] [rbp-30h] BYREF
__int64 v22; // [rsp+60h] [rbp-20h]
__int64 v23; // [rsp+68h] [rbp-18h]
__int128 *v24; // [rsp+A8h] [rbp+28h] BYREF
__int16 v25; // [rsp+B0h] [rbp+30h] BYREF
char v26; // [rsp+B2h] [rbp+32h]
v2 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v24 = (__int128 *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v24);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v2 = qword_14090BFD0;
}
GameManager::setUGV(v2, &word_14075A9E0, 1u);
v4 = (cocos2d::CCArray *)cocos2d::CCArray::create(v3);
v24 = &v18;
v25 = -1;
v26 = -1;
v18 = 0;
v19 = 0;
v20 = 0;
*(_QWORD *)&v18 = sub_14003D460(0x60u);
v19 = 86;
v20 = 95;
strcpy((char *)v18, "Great... Just what I needed.\nAnother visitor to my prison.");
*((_QWORD *)&v21 + 1) = 26740;
v22 = 10;
v23 = 15;
*(_QWORD *)&v21 = 0x6961725720656854LL;
v5 = DialogObject::create((__int64)&v21, (__int64)&v18, 54, 1.0, 1, (__int64)&v25);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v5);
v24 = &v21;
v25 = -1;
v26 = -1;
v21 = 0;
v22 = 0;
v23 = 0;
*(_QWORD *)&v21 = sub_14003D460(0x60u);
v22 = 95;
v23 = 95;
strcpy(
(char *)v21,
"Must be my lucky day... or yours.\nI don't really have days anymore.");
*((_QWORD *)&v18 + 1) = 26740;
v19 = 10;
v20 = 15;
*(_QWORD *)&v18 = 0x6961725720656854LL;
v6 = DialogObject::create((__int64)&v18, (__int64)&v21, 53, 1.0, 0, (__int64)&v25);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v6);
v24 = &v21;
v25 = -1;
v26 = -1;
v21 = 0;
v22 = 0;
v23 = 0;
*(_QWORD *)&v21 = sub_14003D460(0x80u);
v22 = 115;
v23 = 127;
strcpy(
(char *)v21,
"I wasn't always like this, you know.\n"
"I used to be something, greater...");
*((_QWORD *)&v18 + 1) = 26740;
v19 = 10;
v20 = 15;
*(_QWORD *)&v18 = 0x6961725720656854LL;
v7 = DialogObject::create((__int64)&v18, (__int64)&v21, 55, 1.0, 0, (__int64)&v25);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v7);
v24 = &v21;
v25 = -1;
v26 = -1;
v21 = 0;
v22 = 0;
v23 = 0;
*(_QWORD *)&v21 = sub_14003D460(0x50u);
v22 = 72;
v23 = 79;
strcpy((char *)v21, "Now instead, I get to listen to you.\nWhat a treat...");
*((_QWORD *)&v18 + 1) = 26740;
v19 = 10;
v20 = 15;
*(_QWORD *)&v18 = 0x6961725720656854LL;
v8 = DialogObject::create((__int64)&v18, (__int64)&v21, 53, 1.0, 0, (__int64)&v25);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v8);
v24 = &v21;
v25 = -1;
v26 = -1;
v21 = 0;
v22 = 0;
v23 = 0;
*(_QWORD *)&v21 = sub_14003D460(0x50u);
v22 = 69;
v23 = 79;
strcpy((char *)v21, "Go on, or don't.\nNot like I can stop you.");
*((_QWORD *)&v18 + 1) = 26740;
v19 = 10;
v20 = 15;
*(_QWORD *)&v18 = 0x6961725720656854LL;
v9 = DialogObject::create((__int64)&v18, (__int64)&v21, 56, 1.0, 0, (__int64)&v25);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v9);
DialogLayer = DialogLayer::createDialogLayer(0, (__int64)v4, 4u);
(*(void (__fastcall **)(__int64, cocos2d::CCLayerColor *, __int64))(*(_QWORD *)a1 + 456LL))(a1, DialogLayer, 100);
v12 = cocos2d::CCDirector::sharedDirector(v11);
cocos2d::CCDirector::getWinSize(v12, &v24);
v13 = **((_QWORD **)DialogLayer + 70);
v14 = *((_QWORD *)DialogLayer + 70);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, *(float *)&v24 * 0.5, *((float *)&v24 + 1) * 0.5);
(*(void (__fastcall **)(__int64, __int64))(v13 + 184))(v14, v15);
DialogLayer::animateIn(DialogLayer, 2);
*(_BYTE *)(a1 + 552) = 0;
LOBYTE(v16) = 1;
return (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 464) + 920LL))(*(_QWORD *)(a1 + 464), v16);
}