//
// SecretLayer3::dialogClosed from 0x61b020 to 0x61b1c2 (418 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'SecretLayer3::dialogClosed @ 0x61b1e0
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:54:59 +0000
//
int __fastcall SecretLayer3::dialogClosed(cocos2d::CCNode **this, DialogLayer *a2)
{
int v4; // r7
char v5; // r2
cocos2d::CCNode *v6; // r6
int v7; // r3
unsigned __int8 v8; // r2
cocos2d::CCSequence *v9; // r10
cocos2d::CCFiniteTimeAction *v10; // r0
cocos2d::CCAction *v11; // r0
float v12; // r1
int v13; // r0
cocos2d::CCSequence *v14; // r0
cocos2d::CCSequence *v15; // r7
cocos2d::CCFiniteTimeAction *v16; // r0
cocos2d::CCAction *v17; // r0
int result; // r0
GameManager *v19; // r0
char *v20; // r1
_BYTE v21[4]; // [sp+0h] [bp-18h] BYREF
int v22; // [sp+4h] [bp-14h]
int v23; // [sp+8h] [bp-10h]
_DWORD (*v24)(SecretLayer3 *__hidden); // [sp+Ch] [bp-Ch]
int v25; // [sp+10h] [bp-8h]
if ( (*(int (__fastcall **)(DialogLayer *))(*(_DWORD *)a2 + 32))(a2) != 4 )
{
if ( (*(int (__fastcall **)(DialogLayer *))(*(_DWORD *)a2 + 32))(a2) == 5 )
{
v19 = (GameManager *)GameManager::sharedState((GameManager *)&byte_5);
v20 = "13";
}
else
{
if ( (*(int (__fastcall **)(DialogLayer *))(*(_DWORD *)a2 + 32))(a2) == 3 )
return SecretLayer3::revealStep3((SecretLayer3 *)this);
if ( (*(int (__fastcall **)(DialogLayer *))(*(_DWORD *)a2 + 32))(a2) == 1 )
return SecretLayer3::firstInteractionStep3(this);
if ( (*(int (__fastcall **)(DialogLayer *))(*(_DWORD *)a2 + 32))(a2) != 2 )
{
result = (*(int (__fastcall **)(DialogLayer *))(*(_DWORD *)a2 + 32))(a2);
if ( result != 6 )
return result;
goto LABEL_18;
}
v19 = (GameManager *)GameManager::sharedState((GameManager *)((char *)&dword_0 + 2));
v20 = "12";
}
result = GameManager::setUGV(v19, v20, (_BYTE *)&dword_0 + 1);
LABEL_18:
*((_BYTE *)this + 324) = 0;
return result;
}
v4 = 0;
v5 = -1;
while ( 1 )
{
v21[3] = v5;
v21[0] = -1;
v21[1] = -1;
v21[2] = -1;
v6 = (cocos2d::CCNode *)cocos2d::CCLayerColor::create(v21);
(*((void (__fastcall **)(cocos2d::CCNode **, cocos2d::CCNode *, int))*this + 58))(this, v6, 100);
v7 = *(_DWORD *)v6;
v24 = (_DWORD (*)(SecretLayer3 *__hidden))(&stru_2FC + 6);
v25 = 1;
(*(void (__fastcall **)(cocos2d::CCNode *, int, int))(v7 + 644))(v6, 770, 1);
v9 = (cocos2d::CCSequence *)cocos2d::CCFadeTo::create((cocos2d::CCFadeTo *)0x40000000, 0.0, v8);
v22 = 268;
v23 = 1;
v10 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v6, 268, 1);
v11 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v9, v10, 0);
cocos2d::CCNode::runAction(v6, v11);
v5 = 80;
if ( v4 )
break;
v4 = 1;
}
cocos2d::CCNode::stopAllActions(*(this + 83));
(*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 83) + 172))(*(this + 83), 0);
(*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 84) + 172))(*(this + 84), 0);
v13 = (int)*(this + 85);
if ( v13 )
{
(*(void (__fastcall **)(int, int))(*(_DWORD *)v13 + 172))(v13, v4);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 85) + 528))(*(this + 85), v4);
}
v14 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)0x40400000, v12);
v25 = 0;
v24 = SecretLayer3::revealStep5;
v15 = v14;
v16 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(this, SecretLayer3::revealStep5, 0);
v17 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v15, v16, 0);
return cocos2d::CCNode::runAction((cocos2d::CCNode *)this, v17);
}