//
// LevelOptionsLayer::onSettings from 0x14045d6e0 to 0x14045d8bc (476 bytes)
//
// 2 xrefs:
// > LevelOptionsLayer::setupOptions @ 0x14045d61e
// > ??> @ 0x140927d94
//
// 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:32 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall LevelOptionsLayer::onSettings(_QWORD *a1)
{
__int64 v2; // rbx
_QWORD *v3; // rsi
__int64 v4; // r8
int v5; // r9d
__int64 v6; // rcx
__int64 v7; // rax
struct cocos2d::CCLabelBMFont *v8; // rdi
__int64 v9; // rbx
__int64 v10; // rax
__int64 (__fastcall *v11)(__int64); // rdx
_QWORD *v13; // [rsp+40h] [rbp+8h] BYREF
char v14; // [rsp+50h] [rbp+18h] BYREF
v2 = a1[142];
v3 = operator new(0x478u);
v13 = v3;
LevelOptionsLayer::LevelOptionsLayer(v3);
*v3 = &LevelOptionsLayer2::`vftable';
v3[40] = &LevelOptionsLayer2::`vftable';
v3[41] = &LevelOptionsLayer2::`vftable';
v3[42] = &LevelOptionsLayer2::`vftable';
v3[43] = &LevelOptionsLayer2::`vftable';
v3[44] = &LevelOptionsLayer2::`vftable';
v3[51] = &LevelOptionsLayer2::`vftable';
v3[54] = &LevelOptionsLayer2::`vftable';
v3[68] = &LevelOptionsLayer2::`vftable';
v3[83] = &LevelOptionsLayer2::`vftable';
v3[84] = &LevelOptionsLayer2::`vftable';
if ( LevelOptionsLayer::init((__int64)v3, v2, v4, v5) )
{
v7 = cocos2d::CCDirector::sharedDirector(v6);
cocos2d::CCDirector::getWinSize(v7, &v13);
v8 = cocos2d::CCLabelBMFont::create("Legacy Options", "goldFont.fnt");
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v8 + 160LL))(v8);
v9 = *(_QWORD *)v8;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v14,
*(float *)&v13 * 0.5,
(float)((float)(*((float *)v3 + 184) * 0.5) + (float)(*((float *)&v13 + 1) * 0.5)) - 20.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v9 + 184))(v8, v10);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(*(_QWORD *)v3[73] + 456LL))(
v3[73],
v8,
1);
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v3);
}
else
{
(*(void (__fastcall **)(_QWORD *, __int64))(*v3 + 8LL))(v3, 1);
v3 = nullptr;
}
v11 = *(__int64 (__fastcall **)(__int64))(*v3 + 1064LL);
if ( v11 == SetupTriggerPopup::show )
SetupTriggerPopup::show((__int64)v3);
else
v11((__int64)v3);
return (*(__int64 (__fastcall **)(_QWORD *, _QWORD))(*a1 + 1104LL))(a1, 0);
}