//
// OptionsScrollLayer::onClose from 0x14047f2d0 to 0x14047f393 (195 bytes)
//
// 5 xrefs:
// > OptionsScrollLayer::keyBackClicked @ 0x14047f3a9
// > OptionsScrollLayer::init @ 0x14047e834
// > ??> @ 0x1408cf8d0
// > ??> @ 0x1408cf8e0
// > ??> @ 0x1409287e4
//
// 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:44 +0000
//
__int64 __fastcall OptionsScrollLayer::onClose(_QWORD *a1, __int64 a2, __int64 a3)
{
__int64 v3; // rax
__int64 v5; // rax
struct cocos2d::CCObject *v6; // rbx
cocos2d::CCTouchDispatcher *v7; // rax
void (__fastcall ***v8)(_QWORD, _QWORD *, __int64); // rcx
__int64 v9; // rdx
v3 = a1[87];
if ( v3 )
{
*(_QWORD *)(v3 + 600) = 0;
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)a1[87] + 1032LL))(a1[87], 0);
}
if ( a1[85] )
{
v5 = cocos2d::CCDirector::sharedDirector(a1);
v6 = (struct cocos2d::CCObject *)a1[85];
v7 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 144LL))(v5);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v7, v6);
(*(void (__fastcall **)(_QWORD))(*(_QWORD *)a1[85] + 528LL))(a1[85]);
a1[85] = 0;
}
v8 = (void (__fastcall ***)(_QWORD, _QWORD *, __int64))a1[70];
if ( v8 )
{
LOBYTE(a3) = 1;
(**v8)(v8, a1, a3);
}
(*(void (__fastcall **)(_QWORD *, _QWORD))(*a1 + 992LL))(a1, 0);
LOBYTE(v9) = 1;
return (*(__int64 (__fastcall **)(_QWORD *, __int64))(*a1 + 520LL))(a1, v9);
}