//
// OptionsLayer::layerHidden from 0x1404cc590 to 0x1404cc76e (478 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407ced88
// > ??> @ 0x14092966c
//
// 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 11:32:58 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall OptionsLayer::layerHidden(_BYTE *a1)
{
int v2; // ecx
int v3; // ecx
cocos2d::CCNode *v4; // rax
cocos2d::CCObject *v5; // rbx
__int64 v6; // rax
struct cocos2d::CCAction *(__fastcall *v7)(cocos2d::CCNode *, char); // r8
cocos2d::CCNode *v8; // rcx
cocos2d::CCNode *v9; // rbx
__int64 v10; // rax
__int64 result; // rax
__int64 v12; // rdx
v2 = *((_DWORD *)a1 + 160) - 1;
if ( !v2 )
{
v4 = (cocos2d::CCNode *)SongsLayer::create();
LABEL_11:
v9 = v4;
v10 = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 504LL))(a1);
(*(void (__fastcall **)(__int64, cocos2d::CCNode *, __int64))(*(_QWORD *)v10 + 456LL))(v10, v9, 100);
v7 = *(struct cocos2d::CCAction *(__fastcall **)(cocos2d::CCNode *, char))(*(_QWORD *)v9 + 1080LL);
v8 = v9;
goto LABEL_12;
}
v3 = v2 - 1;
if ( v3 )
{
if ( v3 != 1 )
goto LABEL_13;
v4 = (cocos2d::CCNode *)AccountLayer::create();
goto LABEL_11;
}
v5 = (cocos2d::CCObject *)operator new(0x280u);
GJDropDownLayer::GJDropDownLayer((__int64)v5);
*(_QWORD *)v5 = &SupportLayer::`vftable';
*((_QWORD *)v5 + 40) = &SupportLayer::`vftable';
*((_QWORD *)v5 + 41) = &SupportLayer::`vftable';
*((_QWORD *)v5 + 42) = &SupportLayer::`vftable';
*((_QWORD *)v5 + 43) = &SupportLayer::`vftable';
*((_QWORD *)v5 + 44) = &SupportLayer::`vftable';
*((_QWORD *)v5 + 51) = &SupportLayer::`vftable';
*((_QWORD *)v5 + 54) = &SupportLayer::`vftable';
*((_QWORD *)v5 + 76) = &SupportLayer::`vftable';
*((_QWORD *)v5 + 77) = &SupportLayer::`vftable';
*((_QWORD *)v5 + 78) = &SupportLayer::`vftable';
*((_QWORD *)v5 + 79) = 0;
if ( GJDropDownLayer::init((__int64 *)v5, (int)"Support", 220.0, 0) )
{
cocos2d::CCObject::autorelease(v5);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v5 + 8LL))(v5, 1);
v5 = nullptr;
}
v6 = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 504LL))(a1);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *, __int64))(*(_QWORD *)v6 + 456LL))(v6, v5, 100);
v7 = *(struct cocos2d::CCAction *(__fastcall **)(cocos2d::CCNode *, char))(*(_QWORD *)v5 + 1080LL);
v8 = v5;
if ( v7 == GJDropDownLayer::showLayer )
{
GJDropDownLayer::showLayer(v5, 0);
goto LABEL_13;
}
LABEL_12:
v7(v8, 0);
LABEL_13:
result = (*(__int64 (__fastcall **)(_BYTE *, _QWORD))(*(_QWORD *)a1 + 336LL))(a1, 0);
if ( a1[584] )
{
LOBYTE(v12) = 1;
return (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)a1 + 520LL))(a1, v12);
}
return result;
}