//
// SecretLayer5::showFirstDialog from 0x1403f7860 to 0x1403f7f76 (1814 bytes)
//
// 2 xrefs:
// > SecretLayer5::init @ 0x1403f512f
// > ??> @ 0x1406d82d0
//
// 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
//
// Hidden C++ exception states: #wind=2
void SecretLayer5::showFirstDialog(SecretLayer5 *a1)
{
GameManager *v2; // rcx
__int64 v3; // rcx
cocos2d::CCArray *v4; // rbx
char *v5; // rax
char *v6; // rax
char *v7; // rax
char *v8; // rax
char *v9; // rax
DialogLayer *DialogLayer; // rsi
__int64 v11; // rcx
cocos2d::CCDirector *v12; // rax
cocos2d::CCLayer_vtbl *v13; // rbx
const cocos2d::CCPoint *v14; // rax
_BOOL8 v15; // rdx
float v16; // xmm1_4
double v17; // xmm0_8
cocos2d::CCLayer_vtbl *v18; // rbx
const cocos2d::CCPoint *v19; // rax
struct cocos2d::CCMoveTo *v20; // rax
struct cocos2d::CCEaseElasticOut *v21; // rax
cocos2d::ccColor3B *v22; // r8
_BOOL8 v23; // rdx
float v24; // xmm6_4
struct cocos2d::CCFadeTo *v25; // rax
cocos2d::ccColor3B *v26; // r8
float v27; // [rsp+20h] [rbp-60h]
float v28; // [rsp+20h] [rbp-60h]
__int128 v29; // [rsp+30h] [rbp-50h] BYREF
__int64 v30; // [rsp+40h] [rbp-40h]
__int64 v31; // [rsp+48h] [rbp-38h]
__int128 v32; // [rsp+50h] [rbp-30h] BYREF
__int64 v33; // [rsp+60h] [rbp-20h]
__int64 v34; // [rsp+68h] [rbp-18h]
__int128 *v35; // [rsp+A8h] [rbp+28h] BYREF
__int16 v36; // [rsp+B0h] [rbp+30h] BYREF
char v37; // [rsp+B2h] [rbp+32h]
v2 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v35 = (__int128 *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v35);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v2 = (GameManager *)qword_1406C2ED8;
}
GameManager::setUGV(v2, (const char *)&word_14055A53C, 1);
v4 = (cocos2d::CCArray *)cocos2d::CCArray::create(v3);
v35 = &v29;
v36 = -1;
v37 = -1;
v29 = 0;
v30 = 0;
v31 = 15;
*(_QWORD *)&v29 = sub_14003AA10(0x60u);
v30 = 86;
v31 = 95;
strcpy((char *)v29, "Great... Just what I needed.\nAnother visitor to my prison.");
*((_QWORD *)&v32 + 1) = 26740;
v33 = 10;
v34 = 15;
*(_QWORD *)&v32 = 0x6961725720656854LL;
v5 = DialogObject::create((__int64)&v32, (__int64)&v29, 54, 1.0, 1, (__int64)&v36);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v5);
v35 = &v32;
v36 = -1;
v37 = -1;
v32 = 0;
v33 = 0;
v34 = 15;
*(_QWORD *)&v32 = sub_14003AA10(0x60u);
v33 = 95;
v34 = 95;
strcpy(
(char *)v32,
"Must be my lucky day... or yours.\nI don't really have days anymore.");
*((_QWORD *)&v29 + 1) = 26740;
v30 = 10;
v31 = 15;
*(_QWORD *)&v29 = 0x6961725720656854LL;
v6 = DialogObject::create((__int64)&v29, (__int64)&v32, 53, 1.0, 0, (__int64)&v36);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v6);
v35 = &v32;
v36 = -1;
v37 = -1;
v32 = 0;
v33 = 0;
v34 = 15;
*(_QWORD *)&v32 = sub_14003AA10(0x80u);
v33 = 115;
v34 = 127;
strcpy(
(char *)v32,
"I wasn't always like this, you know.\n"
"I used to be something, greater...");
*((_QWORD *)&v29 + 1) = 26740;
v30 = 10;
v31 = 15;
*(_QWORD *)&v29 = 0x6961725720656854LL;
v7 = DialogObject::create((__int64)&v29, (__int64)&v32, 55, 1.0, 0, (__int64)&v36);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v7);
v35 = &v32;
v36 = -1;
v37 = -1;
v32 = 0;
v33 = 0;
v34 = 15;
*(_QWORD *)&v32 = sub_14003AA10(0x50u);
v33 = 72;
v34 = 79;
strcpy((char *)v32, "Now instead, I get to listen to you.\nWhat a treat...");
*((_QWORD *)&v29 + 1) = 26740;
v30 = 10;
v31 = 15;
*(_QWORD *)&v29 = 0x6961725720656854LL;
v8 = DialogObject::create((__int64)&v29, (__int64)&v32, 53, 1.0, 0, (__int64)&v36);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v8);
v35 = &v32;
v36 = -1;
v37 = -1;
v32 = 0;
v33 = 0;
v34 = 15;
*(_QWORD *)&v32 = sub_14003AA10(0x50u);
v33 = 69;
v34 = 79;
strcpy((char *)v32, "Go on, or don't.\nNot like I can stop you.");
*((_QWORD *)&v29 + 1) = 26740;
v30 = 10;
v31 = 15;
*(_QWORD *)&v29 = 0x6961725720656854LL;
v9 = DialogObject::create((__int64)&v29, (__int64)&v32, 56, 1.0, 0, (__int64)&v36);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v9);
DialogLayer = DialogLayer::createDialogLayer(nullptr, v4, 4);
a1->addChild_0(a1, DialogLayer, 100);
v12 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v11);
cocos2d::CCDirector::getWinSize(v12);
v13 = DialogLayer->m_mainLayer->__vftable;
cocos2d::CCPoint::CCPoint(1.9431574e-19, *(float *)&v35 * 0.5);
v13->setPosition_0(DialogLayer->m_mainLayer, v14);
LOBYTE(v15) = 1;
DialogLayer->setVisible(DialogLayer, v15);
v16 = sub_14003CF30();
DialogLayer->m_animateTime = v16;
DialogLayer->m_mainLayer->getPosition_0(DialogLayer->m_mainLayer);
v17 = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v35);
v18 = DialogLayer->m_mainLayer->__vftable;
cocos2d::CCPoint::CCPoint(*(float *)&v17, -191.0);
v18->setPosition_0(DialogLayer->m_mainLayer, v19);
v20 = cocos2d::CCMoveTo::create(0.5, (const struct cocos2d::CCPoint *)&v35);
v21 = cocos2d::CCEaseElasticOut::create(v20, 0.60000002);
cocos2d::CCNode::runAction((CCLightFlash *)DialogLayer->m_mainLayer, (cocos2d::CCPoint)v21, v22, 1.0, v27);
v24 = (float)DialogLayer->getOpacity(&DialogLayer->cocos2d::CCRGBAProtocol);
if ( v24 > 0.0 )
{
DialogLayer->setOpacity(&DialogLayer->cocos2d::CCRGBAProtocol, 0);
v25 = cocos2d::CCFadeTo::create(0.14, (int)v24);
cocos2d::CCNode::runAction((CCLightFlash *)DialogLayer, (cocos2d::CCPoint)v25, v26, 1.0, v28);
}
a1->m_uiLocked = 0;
LOBYTE(v23) = 1;
a1->m_textInput->setTouchEnabled(a1->m_textInput, v23);
}