//
// SecretLayer3::revealStep4 from 0x140583c40 to 0x1405843d8 (1944 bytes)
//
// 2 xrefs:
// > SecretLayer3::dialogClosed @ 0x140584c04
// > ??> @ 0x14092c9d8
//
// 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=6
void __fastcall SecretLayer3::revealStep4(__int64 a1)
{
cocos2d::CCArray *v2; // rdi
void **v3; // rax
void **v4; // rax
__int64 v5; // rdx
const char *v6; // rdx
cocos2d::CCString *v7; // rax
const char *CString; // rax
size_t v9; // rbx
size_t v10; // r8
void **v11; // rdx
void **v12; // rax
void **v13; // rax
void **v14; // rax
void **v15; // rax
cocos2d::CCNode *DialogLayer; // rsi
__int64 v17; // rcx
__int64 v18; // rax
__int64 v19; // rdi
__int64 v20; // rbx
__int64 v21; // rax
void *v22; // rcx
__int64 v23[2]; // [rsp+30h] [rbp-59h] BYREF
__int128 v24; // [rsp+40h] [rbp-49h] BYREF
__int64 v25; // [rsp+50h] [rbp-39h]
__int64 v26; // [rsp+58h] [rbp-31h]
__int128 v27; // [rsp+60h] [rbp-29h] BYREF
__int64 v28; // [rsp+70h] [rbp-19h]
__int64 v29; // [rsp+78h] [rbp-11h]
_BYTE v30[8]; // [rsp+80h] [rbp-9h] BYREF
void *Block[2]; // [rsp+88h] [rbp-1h] BYREF
__int64 v32; // [rsp+98h] [rbp+Fh]
unsigned __int64 v33; // [rsp+A0h] [rbp+17h]
_QWORD v34[4]; // [rsp+A8h] [rbp+1Fh] BYREF
v2 = (cocos2d::CCArray *)cocos2d::CCArray::create(a1);
v23[0] = (__int64)Block;
LOWORD(v23[0]) = -1;
BYTE2(v23[0]) = -1;
*(_OWORD *)Block = 0;
v32 = 0;
v33 = 0;
Block[0] = sub_14003D460(0x50u);
v32 = 79;
v33 = 79;
strcpy((char *)Block[0], "RubRub told me he was cooking some chicken. Then he locked me in.");
v24 = 0;
v25 = 3;
v26 = 15;
LOWORD(v24) = *(_WORD *)"...";
WORD1(v24) = (unsigned __int8)asc_14070EB14[2];
v3 = DialogObject::create((__int64)&v24, (__int64)Block, 16, 0.80000001, 0, (__int64)v23);
cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v3);
v23[0] = (__int64)&v24;
LOWORD(v23[0]) = -1;
BYTE2(v23[0]) = -1;
v24 = 0;
v25 = 0;
v26 = 0;
*(_QWORD *)&v24 = sub_14003D460(0x40u);
v25 = 58;
v26 = 63;
strcpy((char *)v24, "Now that you have freed me, I can continue my master plan.");
*(_OWORD *)Block = 0;
v32 = 3;
v33 = 15;
LOWORD(Block[0]) = *(_WORD *)"...";
WORD1(Block[0]) = (unsigned __int8)asc_14070EB14[2];
v4 = DialogObject::create((__int64)Block, (__int64)&v24, 16, 1.0, 0, (__int64)v23);
cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v4);
v5 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v23[0] = (__int64)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v23[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v5 = qword_14090BFD0;
}
sub_14003F4F0((__int64)v34, v5 + 656);
v6 = (const char *)v34;
if ( v34[3] > 0xFu )
v6 = (const char *)v34[0];
v7 = cocos2d::CCString::createWithFormat(
"DESTROY the world of Geometry Dash! And I couldn't have done it without you %s.",
v6);
CString = cocos2d::CCString::getCString(v7);
*(_OWORD *)Block = 0;
v32 = 0;
v33 = 0;
v9 = -1;
v10 = -1;
do
++v10;
while ( CString[v10] );
sub_14003D230(Block, CString, v10);
sub_14003D310((__int64)v34);
v23[0] = (__int64)&v27;
LOWORD(v23[0]) = -1;
BYTE2(v23[0]) = -1;
v11 = Block;
if ( v33 > 0xF )
v11 = (void **)Block[0];
v27 = 0;
v28 = 0;
v29 = 0;
do
++v9;
while ( *((_BYTE *)v11 + v9) );
sub_14003D230(&v27, v11, v9);
v24 = 0;
v25 = 3;
v26 = 15;
LOWORD(v24) = *(_WORD *)"...";
WORD1(v24) = (unsigned __int8)asc_14070EB14[2];
v12 = DialogObject::create((__int64)&v24, (__int64)&v27, 16, 0.80000001, 0, (__int64)v23);
cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v12);
v23[0] = (__int64)&v24;
LOWORD(v23[0]) = -1;
BYTE2(v23[0]) = -1;
v24 = 0;
v25 = 0;
v26 = 0;
*(_QWORD *)&v24 = sub_14003D460(0x60u);
v25 = 90;
v26 = 95;
strcpy((char *)v24, "But I almost forgot, I left you a small gift. As a token of my appreciation.");
v27 = 0;
v28 = 3;
v29 = 15;
LOWORD(v27) = *(_WORD *)"...";
WORD1(v27) = (unsigned __int8)asc_14070EB14[2];
v13 = DialogObject::create((__int64)&v27, (__int64)&v24, 16, 0.80000001, 0, (__int64)v23);
cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v13);
v23[0] = (__int64)&v27;
LOWORD(v23[0]) = -1;
BYTE2(v23[0]) = -1;
v27 = 0;
v28 = 0;
v29 = 0;
*(_QWORD *)&v27 = sub_14003D460(0x40u);
v28 = 54;
v29 = 63;
strcpy((char *)v27, "You should prepare yourself for when I return.");
v24 = 0;
v25 = 3;
v26 = 15;
LOWORD(v24) = *(_WORD *)"...";
WORD1(v24) = (unsigned __int8)asc_14070EB14[2];
v14 = DialogObject::create((__int64)&v24, (__int64)&v27, 16, 1.0, 0, (__int64)v23);
cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v14);
v23[0] = (__int64)&v27;
LOWORD(v23[0]) = -1;
BYTE2(v23[0]) = -1;
v27 = 0;
v28 = 0;
v29 = 0;
*(_QWORD *)&v27 = sub_14003D460(0x30u);
v28 = 45;
v29 = 47;
strcpy((char *)v27, "You will need it...");
v24 = 0;
v25 = 3;
v26 = 15;
LOWORD(v24) = *(_WORD *)"...";
WORD1(v24) = (unsigned __int8)asc_14070EB14[2];
v15 = DialogObject::create((__int64)&v24, (__int64)&v27, 16, 1.0, 0, (__int64)v23);
cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v15);
DialogLayer = DialogLayer::createDialogLayer(0, (__int64)v2, 4u);
(*(void (__fastcall **)(__int64, cocos2d::CCNode *, __int64))(*(_QWORD *)a1 + 456LL))(a1, DialogLayer, 100);
*((_QWORD *)DialogLayer + 78) = a1 + 408;
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)DialogLayer + 64LL))(DialogLayer, 4);
v18 = cocos2d::CCDirector::sharedDirector(v17);
cocos2d::CCDirector::getWinSize(v18, v23);
v19 = **((_QWORD **)DialogLayer + 70);
v20 = *((_QWORD *)DialogLayer + 70);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v30, *(float *)v23 * 0.5, (float)(*((float *)v23 + 1) - 50.0) - 20.0);
(*(void (__fastcall **)(__int64, __int64))(v19 + 184))(v20, v21);
DialogLayer::animateIn(DialogLayer, 1);
if ( v33 > 0xF )
{
v22 = Block[0];
if ( v33 + 1 >= 0x1000 )
{
v22 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v22 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v22);
}
}