//
// SecretLayer3::dialogClosed from 0x1004a1100 to 0x1004a13f6 (758 bytes)
//
// 2 xrefs:
// > sub_1004A1400 @ 0x1004a140c
// > ??> @ 0x100b50e28
//
// 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 12:30:52 +0000
//
void __fastcall SecretLayer3::dialogClosed(__int64 a1, __int64 a2)
{
__int64 v2; // rax
__int64 v4; // r12
_OWORD *v5; // r13
__int64 v6; // rax
__int64 v7; // rax
__int64 v8; // r14
_OWORD *v9; // r15
__int64 v10; // rax
__int64 v11; // rax
__int64 v12; // rdi
_OWORD *v13; // r14
__int64 v14; // rax
__int64 v15; // rax
__int64 v16; // rax
const std::string::value_type *v17; // rsi
_OWORD *v18; // rax
__int64 v19; // rax
_OWORD *v20; // r14
__int64 v21; // rax
__int64 v22; // rax
_DWORD v23[11]; // [rsp+0h] [rbp-2Ch] BYREF
v23[0] = HIDWORD(v2);
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) != 4 )
{
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 5 )
{
v16 = GameManager::sharedState();
v17 = "13";
}
else
{
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 3 )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 448) + 912LL))(*(_QWORD *)(a1 + 448), 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 448) + 344LL))(*(_QWORD *)(a1 + 448), 1);
v18 = cocos2d::CCFadeIn::create((__m128)0x40400000u);
v19 = cocos2d::CCEaseInOut::create(v18, 1.5);
cocos2d::CCNode::runAction(*(_QWORD *)(a1 + 448), v19);
v20 = cocos2d::CCDelayTime::create((__m128)0x40800000u);
v21 = cocos2d::CCCallFunc::create(a1, SecretLayer3::revealStep4, 0);
v22 = sub_10039EB60((__int64)v20, v21, 0);
cocos2d::CCNode::runAction(a1, v22);
return;
}
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 1 )
{
SecretLayer3::firstInteractionStep3(a1);
return;
}
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) != 2 )
{
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) != 6 )
return;
LABEL_8:
*(_BYTE *)(a1 + 424) = 0;
return;
}
v16 = GameManager::sharedState();
v17 = "12";
}
GameManager::setUGV(v16, v17);
goto LABEL_8;
}
v23[0] = -1;
v4 = cocos2d::CCLayerColor::create_1(v23);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v4, 100);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v4 + 1288LL))(v4, 0x100000302LL);
v5 = cocos2d::CCFadeTo::create(0, (__m128)0x40000000u);
v6 = cocos2d::CCCallFunc::create(v4, 537, 0);
v7 = sub_10039EB60((__int64)v5, v6, 0);
cocos2d::CCNode::runAction(v4, v7);
v23[0] = 1358954495;
v8 = cocos2d::CCLayerColor::create_1(v23);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v8, 100);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 1288LL))(v8, 0x100000302LL);
v9 = cocos2d::CCFadeTo::create(0, (__m128)0x40000000u);
v10 = cocos2d::CCCallFunc::create(v8, 537, 0);
v11 = sub_10039EB60((__int64)v9, v10, 0);
cocos2d::CCNode::runAction(v8, v11);
cocos2d::CCNode::stopAllActions(*(_QWORD *)(a1 + 440));
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 440) + 344LL))(*(_QWORD *)(a1 + 440), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 448) + 344LL))(*(_QWORD *)(a1 + 448), 0);
v12 = *(_QWORD *)(a1 + 456);
if ( v12 )
{
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v12 + 344LL))(v12, 1);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 456) + 1056LL))(*(_QWORD *)(a1 + 456), 1);
}
v13 = cocos2d::CCDelayTime::create((__m128)0x40400000u);
v14 = cocos2d::CCCallFunc::create(a1, SecretLayer3::revealStep5, 0);
v15 = sub_10039EB60((__int64)v13, v14, 0);
cocos2d::CCNode::runAction(a1, v15);
}