//
// SecretLayer3::firstInteractionStep2 from 0x93bab4 to 0x93c018 (1380 bytes)
//
// 3 xrefs:
// > ??> @ 0xa8a68
// > SecretLayer3::firstInteractionStep1 @ 0x941ab0
// > ??> @ 0x122dd60
//
// 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::firstInteractionStep2(SecretLayer3 *a1)
{
cocos2d::CCArray *v2; // x22
cocos2d::CCObject *v3; // x0
void *v4; // x0
void *v5; // x0
cocos2d::CCObject *v6; // x0
void *v7; // x0
void *v8; // x0
cocos2d::CCObject *v9; // x0
void *v10; // x0
void *v11; // x0
cocos2d::CCObject *v12; // x0
void *v13; // x0
void *v14; // x0
DialogLayer *v15; // x19
DialogLayer_vtbl *v16; // x2
unsigned int *v17; // x1
int v18; // w2
unsigned int *v19; // x1
int v20; // w2
unsigned int *v21; // x1
int v22; // w2
unsigned int *v23; // x1
int v24; // w2
unsigned int *v25; // x1
int v26; // w2
unsigned int *v27; // x1
int v28; // w2
unsigned int *v29; // x1
int v30; // w2
unsigned int *v31; // x1
int v32; // w2
__int64 v33; // [xsp+78h] [xbp+78h] BYREF
__int64 v34; // [xsp+80h] [xbp+80h] BYREF
v2 = (cocos2d::CCArray *)cocos2d::CCArray::create(_stack_chk_guard);
sub_D153B8((int)&v33, "...");
sub_D153B8((int)&v34, "Well, well, well.\nWhat do we have here?");
v3 = (cocos2d::CCObject *)DialogObject::create(1.0, (__int64)&v33, (__int64)&v34, 15, 0, (int)&unk_FFFFFF);
cocos2d::CCArray::addObject(v2, v3);
v4 = (void *)(v34 - 24);
if ( (__int64 *)(v34 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v17 = (unsigned int *)(v34 - 8);
do
v18 = __ldaxr(v17);
while ( __stlxr(v18 - 1, v17) );
}
else
{
v18 = *(_DWORD *)(v34 - 8);
*(_DWORD *)(v34 - 8) = v18 - 1;
}
if ( v18 <= 0 )
operator delete(v4);
}
v5 = (void *)(v33 - 24);
if ( (__int64 *)(v33 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v19 = (unsigned int *)(v33 - 8);
do
v20 = __ldaxr(v19);
while ( __stlxr(v20 - 1, v19) );
}
else
{
v20 = *(_DWORD *)(v33 - 8);
*(_DWORD *)(v33 - 8) = v20 - 1;
}
if ( v20 <= 0 )
operator delete(v5);
}
sub_D153B8((int)&v33, "...");
sub_D153B8((int)&v34, "You look like someone who is interested in a deal...");
v6 = (cocos2d::CCObject *)DialogObject::create(1.0, (__int64)&v33, (__int64)&v34, 15, 0, (int)&unk_FFFFFF);
cocos2d::CCArray::addObject(v2, v6);
v7 = (void *)(v34 - 24);
if ( (__int64 *)(v34 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v21 = (unsigned int *)(v34 - 8);
do
v22 = __ldaxr(v21);
while ( __stlxr(v22 - 1, v21) );
}
else
{
v22 = *(_DWORD *)(v34 - 8);
*(_DWORD *)(v34 - 8) = v22 - 1;
}
if ( v22 <= 0 )
operator delete(v7);
}
v8 = (void *)(v33 - 24);
if ( (__int64 *)(v33 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v23 = (unsigned int *)(v33 - 8);
do
v24 = __ldaxr(v23);
while ( __stlxr(v24 - 1, v23) );
}
else
{
v24 = *(_DWORD *)(v33 - 8);
*(_DWORD *)(v33 - 8) = v24 - 1;
}
if ( v24 <= 0 )
operator delete(v8);
}
sub_D153B8((int)&v33, "...");
sub_D153B8((int)&v34, "Help me get out of here, and I will make it worth your while.");
v9 = (cocos2d::CCObject *)DialogObject::create(1.0, (__int64)&v33, (__int64)&v34, 15, 0, (int)&unk_FFFFFF);
cocos2d::CCArray::addObject(v2, v9);
v10 = (void *)(v34 - 24);
if ( (__int64 *)(v34 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v25 = (unsigned int *)(v34 - 8);
do
v26 = __ldaxr(v25);
while ( __stlxr(v26 - 1, v25) );
}
else
{
v26 = *(_DWORD *)(v34 - 8);
*(_DWORD *)(v34 - 8) = v26 - 1;
}
if ( v26 <= 0 )
operator delete(v10);
}
v11 = (void *)(v33 - 24);
if ( (__int64 *)(v33 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v27 = (unsigned int *)(v33 - 8);
do
v28 = __ldaxr(v27);
while ( __stlxr(v28 - 1, v27) );
}
else
{
v28 = *(_DWORD *)(v33 - 8);
*(_DWORD *)(v33 - 8) = v28 - 1;
}
if ( v28 <= 0 )
operator delete(v11);
}
sub_D153B8((int)&v33, "...");
sub_D153B8((int)&v34, "See those locks over there?\nYou need to unlock them.");
v12 = (cocos2d::CCObject *)DialogObject::create(1.0, (__int64)&v33, (__int64)&v34, 15, 0, (int)&unk_FFFFFF);
cocos2d::CCArray::addObject(v2, v12);
v13 = (void *)(v34 - 24);
if ( (__int64 *)(v34 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v29 = (unsigned int *)(v34 - 8);
do
v30 = __ldaxr(v29);
while ( __stlxr(v30 - 1, v29) );
}
else
{
v30 = *(_DWORD *)(v34 - 8);
*(_DWORD *)(v34 - 8) = v30 - 1;
}
if ( v30 <= 0 )
operator delete(v13);
}
v14 = (void *)(v33 - 24);
if ( (__int64 *)(v33 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v31 = (unsigned int *)(v33 - 8);
do
v32 = __ldaxr(v31);
while ( __stlxr(v32 - 1, v31) );
}
else
{
v32 = *(_DWORD *)(v33 - 8);
*(_DWORD *)(v33 - 8) = v32 - 1;
}
if ( v32 <= 0 )
operator delete(v14);
}
v15 = DialogLayer::createWithObjects(v2, (int)&byte_4);
a1->addChild_0(a1, v15, 100);
v16 = v15->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v15->m_delegate = &a1->DialogDelegate;
v16->setTag(v15, 1);
DialogLayer::updateChatPlacement(v15, Top);
DialogLayer::animateIn(v15, FromCenter);
SecretLayer3::animateEyes(a1);
}