//
// GJSongBrowser::exitLayer from 0x1403bd8c0 to 0x1403bd979 (185 bytes)
//
// 2 xrefs:
// > ??> @ 0x140782ca8
// > ??> @ 0x140923f00
//
// 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:31:27 +0000
//
__int64 __fastcall GJSongBrowser::exitLayer(unsigned __int8 *a1)
{
_QWORD *v2; // rbx
__int64 v3; // rcx
void *v5; // [rsp+30h] [rbp+8h]
v2 = (_QWORD *)qword_14090BF60;
if ( !qword_14090BF60 )
{
v5 = operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v5);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v2 = (_QWORD *)qword_14090BF60;
}
v3 = v2[69];
if ( v3 )
FMOD::ChannelControl::stop(v3);
sub_14003EB60(v2 + 137);
sub_14003EB60(v2 + 145);
sub_14003EB60(v2 + 153);
(*(void (__fastcall **)(unsigned __int8 *, _QWORD))(*(_QWORD *)a1 + 992LL))(a1, 0);
(*(void (__fastcall **)(unsigned __int8 *))(*(_QWORD *)a1 + 1120LL))(a1);
return (*(__int64 (__fastcall **)(unsigned __int8 *, _QWORD))(*(_QWORD *)a1 + 1088LL))(a1, a1[600]);
}