//
// SecretLayer3::revealStep5 from 0x1405843e0 to 0x140584995 (1461 bytes)
//
// 2 xrefs:
// > SecretLayer3::dialogClosed @ 0x140584b24
// > ??> @ 0x14092c9e4
//
// 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:27 +0000
//
// Hidden C++ exception states: #wind=1
struct cocos2d::CCAction *__fastcall SecretLayer3::revealStep5(__int64 a1)
{
cocos2d::CCArray *v2; // rbx
void **v3; // rax
void **v4; // rax
void **v5; // rax
void **v6; // rax
void **v7; // rax
cocos2d::CCNode *DialogLayer; // rsi
__int64 v9; // rcx
__int64 v10; // rcx
__int64 v11; // rax
__int64 *v12; // rdi
__int64 v13; // rbx
__int64 v14; // rax
_WORD v16[8]; // [rsp+30h] [rbp-50h] BYREF
__int64 v17; // [rsp+40h] [rbp-40h]
__int64 v18; // [rsp+48h] [rbp-38h]
__int128 v19; // [rsp+50h] [rbp-30h] BYREF
__int64 v20; // [rsp+60h] [rbp-20h]
__int64 v21; // [rsp+68h] [rbp-18h]
__int128 *v22; // [rsp+A8h] [rbp+28h] BYREF
__int16 v23; // [rsp+B0h] [rbp+30h] BYREF
char v24; // [rsp+B2h] [rbp+32h]
v2 = (cocos2d::CCArray *)cocos2d::CCArray::create(a1);
v22 = &v19;
v23 = -1;
v24 = -1;
v19 = 0;
v20 = 0;
v21 = 0;
*(_QWORD *)&v19 = sub_14003D460(0x20u);
v20 = 23;
v21 = 31;
strcpy((char *)v19, "Hey I heard some noi...");
v16[7] = 0;
v17 = 13;
v18 = 15;
strcpy((char *)v16, "The Keymaster");
v3 = DialogObject::create((__int64)v16, (__int64)&v19, 2, 1.0, 0, (__int64)&v23);
cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v3);
v22 = &v19;
v23 = -1;
v24 = -1;
v19 = 0;
v20 = 0;
v21 = 0;
*(_QWORD *)&v19 = sub_14003D460(0x40u);
v20 = 58;
v21 = 63;
strcpy((char *)v19, "Wait... Is the gate...");
v16[7] = 0;
v17 = 13;
v18 = 15;
strcpy((char *)v16, "The Keymaster");
v4 = DialogObject::create((__int64)v16, (__int64)&v19, 4, 1.0, 0, (__int64)&v23);
cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v4);
v22 = &v19;
v23 = -1;
v24 = -1;
v19 = 0;
v20 = 0;
v21 = 0;
*(_QWORD *)&v19 = sub_14003D460(0x40u);
v20 = 62;
v21 = 63;
strcpy((char *)v19, "... You opened the gate...");
v16[7] = 0;
v17 = 13;
v18 = 15;
strcpy((char *)v16, "The Keymaster");
v5 = DialogObject::create((__int64)v16, (__int64)&v19, 17, 1.0, 0, (__int64)&v23);
cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v5);
v22 = &v19;
v23 = -1;
v24 = -1;
v19 = 0;
v20 = 0;
v21 = 0;
*(_QWORD *)&v19 = sub_14003D460(0x30u);
v20 = 43;
v21 = 47;
strcpy((char *)v19, "YOU OPENED THE GATE!\nGAH THIS IS BAD.");
v16[7] = 0;
v17 = 13;
v18 = 15;
strcpy((char *)v16, "The Keymaster");
v6 = DialogObject::create((__int64)v16, (__int64)&v19, 18, 1.0, 0, (__int64)&v23);
cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v6);
v22 = &v19;
v23 = -1;
v24 = -1;
v19 = 0;
v20 = 0;
v21 = 0;
*(_QWORD *)&v19 = sub_14003D460(0x50u);
v20 = 76;
v21 = 79;
strcpy((char *)v19, "BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD...");
v16[7] = 0;
v17 = 13;
v18 = 15;
strcpy((char *)v16, "The Keymaster");
v7 = DialogObject::create((__int64)v16, (__int64)&v19, 18, 1.0, 0, (__int64)&v23);
cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v7);
DialogLayer = DialogLayer::createDialogLayer(0, (__int64)v2, 2u);
(*(void (__fastcall **)(__int64, cocos2d::CCNode *, __int64))(*(_QWORD *)a1 + 456LL))(a1, DialogLayer, 100);
v9 = a1 + 408;
if ( !a1 )
v9 = 0;
*((_QWORD *)DialogLayer + 78) = v9;
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)DialogLayer + 64LL))(DialogLayer, 5);
v11 = cocos2d::CCDirector::sharedDirector(v10);
cocos2d::CCDirector::getWinSize(v11, &v22);
v12 = *((__int64 **)DialogLayer + 70);
v13 = *v12;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v23, *(float *)&v22 * 0.5, *((float *)&v22 + 1) * 0.5);
(*(void (__fastcall **)(__int64 *, __int64))(v13 + 184))(v12, v14);
return DialogLayer::animateIn(DialogLayer, 2);
}