//
// SecretLayer3::revealStep4 from 0x1403ee2a0 to 0x1403eeae3 (2115 bytes)
//
// 2 xrefs:
// > SecretLayer3::dialogClosed @ 0x1403ef3ee
// > ??> @ 0x1406d80d8
//
// 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=6
void SecretLayer3::revealStep4(SecretLayer3 *a1)
{
cocos2d::CCArray *v2; // rdi
char *v3; // rax
char *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
char *v12; // rax
char *v13; // rax
char *v14; // rax
char *v15; // rax
DialogLayer *DialogLayer; // rdi
__int64 v17; // rcx
cocos2d::CCDirector *v18; // rax
cocos2d::CCLayer_vtbl *v19; // rbx
const cocos2d::CCPoint *v20; // rax
_BOOL8 v21; // rdx
float v22; // xmm2_4
struct cocos2d::CCScaleTo *v23; // rax
struct cocos2d::CCEaseElasticOut *v24; // rax
cocos2d::ccColor3B *v25; // r8
float v26; // xmm6_4
struct cocos2d::CCFadeTo *v27; // rax
cocos2d::ccColor3B *v28; // r8
void *v29; // rcx
float v30; // [rsp+28h] [rbp-89h]
float v31; // [rsp+28h] [rbp-89h]
__int64 v32[2]; // [rsp+38h] [rbp-79h] BYREF
__int128 v33; // [rsp+48h] [rbp-69h] BYREF
__int64 v34; // [rsp+58h] [rbp-59h]
__int64 v35; // [rsp+60h] [rbp-51h]
__int128 v36; // [rsp+68h] [rbp-49h] BYREF
__int64 v37; // [rsp+78h] [rbp-39h]
__int64 v38; // [rsp+80h] [rbp-31h]
void *Block[2]; // [rsp+90h] [rbp-21h] BYREF
__int64 v40; // [rsp+A0h] [rbp-11h]
unsigned __int64 v41; // [rsp+A8h] [rbp-9h]
_QWORD v42[4]; // [rsp+B0h] [rbp-1h] BYREF
v2 = (cocos2d::CCArray *)cocos2d::CCArray::create(a1);
v32[0] = (__int64)&v36;
LOWORD(v32[0]) = -1;
BYTE2(v32[0]) = -1;
v36 = 0;
v37 = 0;
v38 = 15;
*(_QWORD *)&v36 = sub_14003AA10(0x50u);
v37 = 79;
v38 = 79;
strcpy((char *)v36, "RubRub told me he was cooking some chicken. Then he locked me in.");
v33 = 0;
v34 = 3;
v35 = 15;
LOWORD(v33) = *(_WORD *)"...";
WORD1(v33) = (unsigned __int8)asc_14053DBB0[2];
v3 = DialogObject::create((__int64)&v33, (__int64)&v36, 16, 0.80000001, 0, (__int64)v32);
cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v3);
v32[0] = (__int64)&v33;
LOWORD(v32[0]) = -1;
BYTE2(v32[0]) = -1;
v33 = 0;
v34 = 0;
v35 = 15;
*(_QWORD *)&v33 = sub_14003AA10(0x40u);
v34 = 58;
v35 = 63;
strcpy((char *)v33, "Now that you have freed me, I can continue my master plan.");
v36 = 0;
v37 = 3;
v38 = 15;
LOWORD(v36) = *(_WORD *)"...";
WORD1(v36) = (unsigned __int8)asc_14053DBB0[2];
v4 = DialogObject::create((__int64)&v36, (__int64)&v33, 16, 1.0, 0, (__int64)v32);
cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v4);
v5 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v32[0] = (__int64)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v32[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v5 = qword_1406C2ED8;
}
sub_14003BDB0((__int64)v42, v5 + 616);
v6 = (const char *)v42;
if ( v42[3] > 0xFu )
v6 = (const char *)v42[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;
v40 = 0;
v41 = 0;
v9 = -1;
v10 = -1;
do
++v10;
while ( CString[v10] );
sub_14003A930(Block, CString, v10);
sub_14003A830((__int64)v42);
v32[0] = (__int64)&v36;
LOWORD(v32[0]) = -1;
BYTE2(v32[0]) = -1;
v11 = Block;
if ( v41 > 0xF )
v11 = (void **)Block[0];
v36 = 0;
v37 = 0;
v38 = 0;
do
++v9;
while ( *((_BYTE *)v11 + v9) );
sub_14003A930(&v36, v11, v9);
v33 = 0;
v34 = 3;
v35 = 15;
LOWORD(v33) = *(_WORD *)"...";
WORD1(v33) = (unsigned __int8)asc_14053DBB0[2];
v12 = DialogObject::create((__int64)&v33, (__int64)&v36, 16, 0.80000001, 0, (__int64)v32);
cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v12);
v32[0] = (__int64)&v33;
LOWORD(v32[0]) = -1;
BYTE2(v32[0]) = -1;
v33 = 0;
v34 = 0;
v35 = 15;
*(_QWORD *)&v33 = sub_14003AA10(0x60u);
v34 = 90;
v35 = 95;
strcpy((char *)v33, "But I almost forgot, I left you a small gift. As a token of my appreciation.");
v36 = 0;
v37 = 3;
v38 = 15;
LOWORD(v36) = *(_WORD *)"...";
WORD1(v36) = (unsigned __int8)asc_14053DBB0[2];
v13 = DialogObject::create((__int64)&v36, (__int64)&v33, 16, 0.80000001, 0, (__int64)v32);
cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v13);
v32[0] = (__int64)&v33;
LOWORD(v32[0]) = -1;
BYTE2(v32[0]) = -1;
v33 = 0;
v34 = 0;
v35 = 15;
*(_QWORD *)&v33 = sub_14003AA10(0x40u);
v34 = 54;
v35 = 63;
strcpy((char *)v33, "You should prepare yourself for when I return.");
v36 = 0;
v37 = 3;
v38 = 15;
LOWORD(v36) = *(_WORD *)"...";
WORD1(v36) = (unsigned __int8)asc_14053DBB0[2];
v14 = DialogObject::create((__int64)&v36, (__int64)&v33, 16, 1.0, 0, (__int64)v32);
cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v14);
v32[0] = (__int64)&v33;
LOWORD(v32[0]) = -1;
BYTE2(v32[0]) = -1;
v33 = 0;
v34 = 0;
v35 = 15;
*(_QWORD *)&v33 = sub_14003AA10(0x30u);
v34 = 45;
v35 = 47;
strcpy((char *)v33, "You will need it...");
v36 = 0;
v37 = 3;
v38 = 15;
LOWORD(v36) = *(_WORD *)"...";
WORD1(v36) = (unsigned __int8)asc_14053DBB0[2];
v15 = DialogObject::create((__int64)&v36, (__int64)&v33, 16, 1.0, 0, (__int64)v32);
cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v15);
DialogLayer = DialogLayer::createDialogLayer(nullptr, v2, 4);
a1->addChild_0(a1, DialogLayer, 100);
DialogLayer->m_delegate = &a1->DialogDelegate;
DialogLayer->setTag(DialogLayer, 4);
v18 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v17);
cocos2d::CCDirector::getWinSize(v18);
v19 = DialogLayer->m_mainLayer->__vftable;
cocos2d::CCPoint::CCPoint(0.0, *(float *)v32 * 0.5);
v19->setPosition_0(DialogLayer->m_mainLayer, v20);
LOBYTE(v21) = 1;
DialogLayer->setVisible(DialogLayer, v21);
v22 = sub_14003CF30();
DialogLayer->m_animateTime = v22;
((void (__fastcall *)(cocos2d::CCLayer *))DialogLayer->m_mainLayer->setScale_0)(DialogLayer->m_mainLayer);
v23 = cocos2d::CCScaleTo::create(0.5, 1.0);
v24 = cocos2d::CCEaseElasticOut::create(v23, 0.60000002);
cocos2d::CCNode::runAction((CCLightFlash *)DialogLayer->m_mainLayer, (cocos2d::CCPoint)v24, v25, 1.0, v30);
v26 = (float)DialogLayer->getOpacity(&DialogLayer->cocos2d::CCRGBAProtocol);
if ( v26 > 0.0 )
{
DialogLayer->setOpacity(&DialogLayer->cocos2d::CCRGBAProtocol, 0);
v27 = cocos2d::CCFadeTo::create(0.14, (int)v26);
cocos2d::CCNode::runAction((CCLightFlash *)DialogLayer, (cocos2d::CCPoint)v27, v28, 1.0, v31);
}
if ( v41 > 0xF )
{
v29 = Block[0];
if ( v41 + 1 >= 0x1000 )
{
v29 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v29 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v29);
}
}