//
// SecretLayer3::revealStep4 from 0x93c678 to 0x93d01c (2468 bytes)
//
// 3 xrefs:
// > ??> @ 0x300a8
// > SecretLayer3::revealStep3 @ 0x941d4c
// > ??> @ 0x12296c0
//
// 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
//
void SecretLayer3::revealStep4(SecretLayer3 *a1)
{
cocos2d::CCArray *v1; // x22
cocos2d::CCObject *v2; // x0
char *v3; // x0
void *v4; // x0
cocos2d::CCObject *v5; // x0
char *v6; // x0
void *v7; // x0
double v8; // d0
cocos2d::CCString *v9; // x0
char *CString; // x0
char *v11; // x0
cocos2d::CCObject *v12; // x0
void *v13; // x0
void *v14; // x0
cocos2d::CCObject *v15; // x0
void *v16; // x0
void *v17; // x0
cocos2d::CCObject *v18; // x0
void *v19; // x0
void *v20; // x0
cocos2d::CCObject *v21; // x0
char *v22; // x0
void *v23; // x0
DialogLayer *v24; // x20
DialogLayer_vtbl *v25; // x2
char *v26; // x0
unsigned int *v27; // x1
int v28; // w2
unsigned int *v29; // x1
int v30; // w2
unsigned int *v31; // x1
int v32; // w2
unsigned int *v33; // x1
int v34; // w2
unsigned int *v35; // x1
int v36; // w2
unsigned int *v37; // x1
int v38; // w2
unsigned int *v39; // x1
int v40; // w2
unsigned int *v41; // x1
int v42; // w2
unsigned int *v43; // x1
int v44; // w2
unsigned int *v45; // x1
int v46; // w2
unsigned int *v47; // x1
int v48; // w2
unsigned int *v49; // x1
int v50; // w2
unsigned int *v51; // x1
int v52; // w2
unsigned int *v53; // x1
int v54; // w2
char *v56; // [xsp+90h] [xbp+90h] BYREF
__int64 v57; // [xsp+98h] [xbp+98h] BYREF
__int64 v58; // [xsp+A0h] [xbp+A0h] BYREF
__int64 v59; // [xsp+A8h] [xbp+A8h] BYREF
__int64 v60; // [xsp+B0h] [xbp+B0h] BYREF
__int64 v61; // [xsp+B8h] [xbp+B8h] BYREF
__int64 v62; // [xsp+C0h] [xbp+C0h] BYREF
__int64 v63; // [xsp+C8h] [xbp+C8h] BYREF
char *v64; // [xsp+D0h] [xbp+D0h] BYREF
v1 = (cocos2d::CCArray *)cocos2d::CCArray::create(_stack_chk_guard);
sub_D153B8((int)&v63, "...");
sub_D153B8((int)&v64, "RubRub told me he was cooking some chicken. Then he locked me in.");
v2 = (cocos2d::CCObject *)DialogObject::create(0.8, (__int64)&v63, (__int64)&v64, 16, 0, (int)&unk_FFFFFF);
cocos2d::CCArray::addObject(v1, v2);
v3 = v64 - 24;
if ( v64 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v27 = (unsigned int *)(v64 - 8);
do
v28 = __ldaxr(v27);
while ( __stlxr(v28 - 1, v27) );
}
else
{
v28 = *((_DWORD *)v64 - 2);
*((_DWORD *)v64 - 2) = v28 - 1;
}
if ( v28 <= 0 )
operator delete(v3);
}
v4 = (void *)(v63 - 24);
if ( (__int64 *)(v63 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v29 = (unsigned int *)(v63 - 8);
do
v30 = __ldaxr(v29);
while ( __stlxr(v30 - 1, v29) );
}
else
{
v30 = *(_DWORD *)(v63 - 8);
*(_DWORD *)(v63 - 8) = v30 - 1;
}
if ( v30 <= 0 )
operator delete(v4);
}
sub_D153B8((int)&v63, "...");
sub_D153B8((int)&v64, "Now that you have freed me, I can continue my master plan.");
v5 = (cocos2d::CCObject *)DialogObject::create(1.0, (__int64)&v63, (__int64)&v64, 16, 0, (int)&unk_FFFFFF);
cocos2d::CCArray::addObject(v1, v5);
v6 = v64 - 24;
if ( v64 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v31 = (unsigned int *)(v64 - 8);
do
v32 = __ldaxr(v31);
while ( __stlxr(v32 - 1, v31) );
}
else
{
v32 = *((_DWORD *)v64 - 2);
*((_DWORD *)v64 - 2) = v32 - 1;
}
if ( v32 <= 0 )
operator delete(v6);
}
v7 = (void *)(v63 - 24);
if ( (__int64 *)(v63 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v33 = (unsigned int *)(v63 - 8);
do
v34 = __ldaxr(v33);
while ( __stlxr(v34 - 1, v33) );
}
else
{
v34 = *(_DWORD *)(v63 - 8);
*(_DWORD *)(v63 - 8) = v34 - 1;
}
if ( v34 <= 0 )
operator delete(v7);
}
GameManager::sharedState();
*(_QWORD *)&v8 = sub_D18D28(&v64).n128_u64[0];
v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"DESTROY the world of Geometry Dash! And I could"
"n't have done it without you %s.",
v64,
v8);
CString = (char *)cocos2d::CCString::getCString(v9);
sub_D153B8((int)&v56, CString);
v11 = v64 - 24;
if ( v64 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v35 = (unsigned int *)(v64 - 8);
do
v36 = __ldaxr(v35);
while ( __stlxr(v36 - 1, v35) );
}
else
{
v36 = *((_DWORD *)v64 - 2);
*((_DWORD *)v64 - 2) = v36 - 1;
}
if ( v36 <= 0 )
operator delete(v11);
}
sub_D153B8((int)&v57, "...");
sub_D153B8((int)&v58, v56);
v12 = (cocos2d::CCObject *)DialogObject::create(0.8, (__int64)&v57, (__int64)&v58, 16, 0, (int)&unk_FFFFFF);
cocos2d::CCArray::addObject(v1, v12);
v13 = (void *)(v58 - 24);
if ( (__int64 *)(v58 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v37 = (unsigned int *)(v58 - 8);
do
v38 = __ldaxr(v37);
while ( __stlxr(v38 - 1, v37) );
}
else
{
v38 = *(_DWORD *)(v58 - 8);
*(_DWORD *)(v58 - 8) = v38 - 1;
}
if ( v38 <= 0 )
operator delete(v13);
}
v14 = (void *)(v57 - 24);
if ( (__int64 *)(v57 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v39 = (unsigned int *)(v57 - 8);
do
v40 = __ldaxr(v39);
while ( __stlxr(v40 - 1, v39) );
}
else
{
v40 = *(_DWORD *)(v57 - 8);
*(_DWORD *)(v57 - 8) = v40 - 1;
}
if ( v40 <= 0 )
operator delete(v14);
}
sub_D153B8((int)&v59, "...");
sub_D153B8((int)&v60, "But I almost forgot, I left you a small gift. As a token of my appreciation.");
v15 = (cocos2d::CCObject *)DialogObject::create(0.8, (__int64)&v59, (__int64)&v60, 16, 0, (int)&unk_FFFFFF);
cocos2d::CCArray::addObject(v1, v15);
v16 = (void *)(v60 - 24);
if ( (__int64 *)(v60 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v41 = (unsigned int *)(v60 - 8);
do
v42 = __ldaxr(v41);
while ( __stlxr(v42 - 1, v41) );
}
else
{
v42 = *(_DWORD *)(v60 - 8);
*(_DWORD *)(v60 - 8) = v42 - 1;
}
if ( v42 <= 0 )
operator delete(v16);
}
v17 = (void *)(v59 - 24);
if ( (__int64 *)(v59 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v43 = (unsigned int *)(v59 - 8);
do
v44 = __ldaxr(v43);
while ( __stlxr(v44 - 1, v43) );
}
else
{
v44 = *(_DWORD *)(v59 - 8);
*(_DWORD *)(v59 - 8) = v44 - 1;
}
if ( v44 <= 0 )
operator delete(v17);
}
sub_D153B8((int)&v61, "...");
sub_D153B8((int)&v62, "You should prepare yourself for when I return.");
v18 = (cocos2d::CCObject *)DialogObject::create(1.0, (__int64)&v61, (__int64)&v62, 16, 0, (int)&unk_FFFFFF);
cocos2d::CCArray::addObject(v1, v18);
v19 = (void *)(v62 - 24);
if ( (__int64 *)(v62 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v45 = (unsigned int *)(v62 - 8);
do
v46 = __ldaxr(v45);
while ( __stlxr(v46 - 1, v45) );
}
else
{
v46 = *(_DWORD *)(v62 - 8);
*(_DWORD *)(v62 - 8) = v46 - 1;
}
if ( v46 <= 0 )
operator delete(v19);
}
v20 = (void *)(v61 - 24);
if ( (__int64 *)(v61 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v47 = (unsigned int *)(v61 - 8);
do
v48 = __ldaxr(v47);
while ( __stlxr(v48 - 1, v47) );
}
else
{
v48 = *(_DWORD *)(v61 - 8);
*(_DWORD *)(v61 - 8) = v48 - 1;
}
if ( v48 <= 0 )
operator delete(v20);
}
sub_D153B8((int)&v63, "...");
sub_D153B8((int)&v64, "You will need it...");
v21 = (cocos2d::CCObject *)DialogObject::create(1.0, (__int64)&v63, (__int64)&v64, 16, 0, (int)&unk_FFFFFF);
cocos2d::CCArray::addObject(v1, v21);
v22 = v64 - 24;
if ( v64 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v49 = (unsigned int *)(v64 - 8);
do
v50 = __ldaxr(v49);
while ( __stlxr(v50 - 1, v49) );
}
else
{
v50 = *((_DWORD *)v64 - 2);
*((_DWORD *)v64 - 2) = v50 - 1;
}
if ( v50 <= 0 )
operator delete(v22);
}
v23 = (void *)(v63 - 24);
if ( (__int64 *)(v63 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v51 = (unsigned int *)(v63 - 8);
do
v52 = __ldaxr(v51);
while ( __stlxr(v52 - 1, v51) );
}
else
{
v52 = *(_DWORD *)(v63 - 8);
*(_DWORD *)(v63 - 8) = v52 - 1;
}
if ( v52 <= 0 )
operator delete(v23);
}
v24 = DialogLayer::createWithObjects(v1, (int)&byte_4);
a1->addChild_0(a1, v24, 100);
v25 = v24->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v24->m_delegate = &a1->DialogDelegate;
v25->setTag(v24, 4);
DialogLayer::updateChatPlacement(v24, Top);
DialogLayer::animateIn(v24, FromCenter);
v26 = v56 - 24;
if ( v56 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v53 = (unsigned int *)(v56 - 8);
do
v54 = __ldaxr(v53);
while ( __stlxr(v54 - 1, v53) );
}
else
{
v54 = *((_DWORD *)v56 - 2);
*((_DWORD *)v56 - 2) = v54 - 1;
}
if ( v54 <= 0 )
operator delete(v26);
}
}