//
// MenuLayer::openOptions from 0x140474c40 to 0x140474ddc (412 bytes)
//
// 4 xrefs:
// > MenuLayer::onOptions @ 0x140474c22
// > MenuLayer::onOptionsInstant @ 0x140474c32
// > MenuLayer::keyDown @ 0x1404755aa
// > ??> @ 0x1409282e0
//
// 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:40 +0000
//
// Hidden C++ exception states: #wind=1
struct cocos2d::CCAction *__fastcall MenuLayer::openOptions(__int64 a1, unsigned __int8 a2)
{
_QWORD *v4; // rbx
struct cocos2d::CCAction *(__fastcall *v5)(cocos2d::CCNode *, char); // r8
struct cocos2d::CCAction *result; // rax
__int64 v7; // rax
v4 = operator new(0x2A0u);
GJDropDownLayer::GJDropDownLayer((__int64)v4);
*v4 = &OptionsLayer::`vftable';
v4[40] = &OptionsLayer::`vftable';
v4[41] = &OptionsLayer::`vftable';
v4[42] = &OptionsLayer::`vftable';
v4[43] = &OptionsLayer::`vftable';
v4[44] = &OptionsLayer::`vftable';
v4[51] = &OptionsLayer::`vftable';
v4[54] = &OptionsLayer::`vftable';
v4[76] = &OptionsLayer::`vftable';
v4[77] = &OptionsLayer::`vftable';
v4[78] = 0;
v4[79] = 0;
*((_DWORD *)v4 + 160) = 0;
*((_BYTE *)v4 + 644) = 0;
v4[81] = 0;
v4[82] = 0;
*((_DWORD *)v4 + 166) = -1;
if ( GJDropDownLayer::init(v4, (int)"Settings", 220.0, 0) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v4);
}
else
{
(*(void (__fastcall **)(_QWORD *, __int64))(*v4 + 8LL))(v4, 1);
v4 = nullptr;
}
(*(void (__fastcall **)(__int64, _QWORD *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v4, 100);
v5 = *(struct cocos2d::CCAction *(__fastcall **)(cocos2d::CCNode *, char))(*v4 + 1080LL);
if ( v5 == GJDropDownLayer::showLayer )
result = GJDropDownLayer::showLayer((cocos2d::CCNode *)v4, a2);
else
result = v5((cocos2d::CCNode *)v4, a2);
if ( a2 )
{
v7 = VideoOptionsLayer::create();
return (struct cocos2d::CCAction *)(*(__int64 (__fastcall **)(_QWORD *, __int64, __int64))(*v4 + 456LL))(
v4,
v7,
100);
}
return result;
}