//
// LevelSettingsLayer::onClose from 0xb60eb4 to 0xb60fd0 (284 bytes)
//
// 5 xrefs:
// > LevelSettingsLayer::keyBackClicked @ 0xb60ffc
// > LevelSettingsLayer::onLiveEdit @ 0xb619f4
// > ??> @ 0xa68a0
// > LevelSettingsLayer::init @ 0xb65a5c
// > ??> @ 0x1544ac0
//
// This function is hookable on this platform (idp: arm, 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 13:02:12 +0000
//
__int64 __fastcall LevelSettingsLayer::onClose(LevelSettingsLayer *this, cocos2d::CCObject *a2)
{
__int64 v3; // x0
__int64 v4; // x0
__int64 v5; // x0
__int64 v6; // x1
__int64 v7; // x0
void (__fastcall ***v8)(_QWORD); // x0
v3 = *((_QWORD *)this + 108);
if ( v3 )
{
*(_QWORD *)(v3 + 584) = 0;
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 108) + 1160LL))(*((_QWORD *)this + 108), 0);
}
v4 = *((_QWORD *)this + 109);
if ( v4 )
{
*(_QWORD *)(v4 + 584) = 0;
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 109) + 1160LL))(*((_QWORD *)this + 109), 0);
}
v5 = *((_QWORD *)this + 102);
if ( !*(_BYTE *)(v5 + 368) )
{
v6 = *((_QWORD *)this + 88);
if ( v6 && *(_BYTE *)(v6 + 349) )
{
v7 = *(_QWORD *)(v5 + 384);
if ( *(_BYTE *)(v6 + 348) )
{
*(_DWORD *)(v7 + 608) = *(_DWORD *)(v6 + 344);
}
else
{
*(_DWORD *)(v7 + 608) = 0;
*(_DWORD *)(*(_QWORD *)(*((_QWORD *)this + 102) + 384LL) + 604LL) = *(_DWORD *)(*((_QWORD *)this + 88) + 344LL);
}
*(_BYTE *)(*((_QWORD *)this + 102) + 416LL) = 1;
v5 = *((_QWORD *)this + 102);
}
if ( *(_DWORD *)(v5 + 332) != *((_DWORD *)this + 178) || *(_BYTE *)(v5 + 416) )
*(_BYTE *)(v5 + 416) = 0;
v8 = *((void (__fastcall ****)(_QWORD))this + 106);
if ( v8 )
(**v8)(v8);
}
(*(void (__fastcall **)(LevelSettingsLayer *, _QWORD))(*(_QWORD *)this + 1072LL))(this, 0);
return (*(__int64 (__fastcall **)(LevelSettingsLayer *, __int64))(*(_QWORD *)this + 528LL))(this, 1);
}