//
// LevelAreaLayer::showDialog from 0x1403de580 to 0x1403de8a8 (808 bytes)
//
// 2 xrefs:
// > LevelAreaLayer::init @ 0x1403de4e0
// > ??> @ 0x140924d40
//
// 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:31:40 +0000
//
// Hidden C++ exception states: #wind=2
__int64 __fastcall LevelAreaLayer::showDialog(__int64 a1)
{
__int64 v2; // rcx
__int64 v3; // rcx
cocos2d::CCArray *v4; // rbx
void **v5; // rax
void **v6; // rax
__int64 v7; // rcx
cocos2d::CCLayerColor *DialogLayer; // rsi
__int64 v9; // rax
__int64 v10; // rax
__int64 v11; // rcx
__int64 v12; // rax
__int64 v13; // rax
__int64 v14; // rdi
__int64 v15; // rbx
__int64 v16; // rax
char v18[8]; // [rsp+30h] [rbp-40h] BYREF
__int64 v19; // [rsp+38h] [rbp-38h]
__int64 v20; // [rsp+40h] [rbp-30h]
__int64 v21; // [rsp+48h] [rbp-28h]
__int128 v22; // [rsp+50h] [rbp-20h] BYREF
__int64 v23; // [rsp+60h] [rbp-10h]
__int64 v24; // [rsp+68h] [rbp-8h]
__int128 *v25; // [rsp+A8h] [rbp+38h] BYREF
__int16 v26; // [rsp+B0h] [rbp+40h] BYREF
char v27; // [rsp+B2h] [rbp+42h]
v2 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v25 = (__int128 *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v25);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v2 = qword_14090BFD0;
}
GameManager::setUGV(v2, &word_14075A858, 1u);
v4 = (cocos2d::CCArray *)cocos2d::CCArray::create(v3);
v25 = &v22;
v26 = -1;
v27 = -1;
v22 = 0;
v23 = 0;
v24 = 0;
*(_QWORD *)&v22 = sub_14003D460(0x20u);
v23 = 31;
v24 = 31;
strcpy((char *)v22, "Who left the lights on?");
v19 = 0;
v20 = 7;
v21 = 15;
strcpy(v18, "Scratch");
v5 = DialogObject::create((__int64)v18, (__int64)&v22, 13, 1.0, 0, (__int64)&v26);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v5);
v25 = &v22;
v26 = -1;
v27 = -1;
v22 = 0;
v23 = 0;
v24 = 0;
*(_QWORD *)&v22 = sub_14003D460(0x40u);
v23 = 59;
v24 = 63;
strcpy((char *)v22, "I got a bad feeling about this...");
v19 = 0;
v20 = 7;
v21 = 15;
strcpy(v18, "Scratch");
v6 = DialogObject::create((__int64)v18, (__int64)&v22, 11, 1.0, 0, (__int64)&v26);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v6);
DialogLayer = DialogLayer::createDialogLayer(0, (__int64)v4, 2u);
v9 = a1 + 408;
if ( !a1 )
v9 = 0;
*((_QWORD *)DialogLayer + 78) = v9;
v10 = cocos2d::CCDirector::sharedDirector(v7);
(*(void (__fastcall **)(_QWORD, cocos2d::CCLayerColor *, __int64))(**(_QWORD **)(v10 + 272) + 456LL))(
*(_QWORD *)(v10 + 272),
DialogLayer,
1000);
v12 = a1 + 408;
if ( !a1 )
v12 = 0;
*((_QWORD *)DialogLayer + 78) = v12;
v13 = cocos2d::CCDirector::sharedDirector(v11);
cocos2d::CCDirector::getWinSize(v13, &v25);
v14 = **((_QWORD **)DialogLayer + 70);
v15 = *((_QWORD *)DialogLayer + 70);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, *(float *)&v25 * 0.5, *((float *)&v25 + 1) * 0.5);
(*(void (__fastcall **)(__int64, __int64))(v14 + 184))(v15, v16);
return DialogLayer::animateInRandomSide(DialogLayer);
}