//
// MoreOptionsLayer::onFMODDebug from 0x10087e680 to 0x10087e789 (265 bytes)
//
// 1 xrefs:
// > MoreOptionsLayer::init @ 0x10087d4da
//
// 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 12:36:56 +0000
//
__int64 MoreOptionsLayer::onFMODDebug()
{
__int64 v0; // rax
const char *data; // rbx
size_t v2; // rax
size_t v3; // r14
char *v4; // r15
size_t v5; // r12
char *v6; // rbx
std::string v8; // [rsp+0h] [rbp-50h] BYREF
_QWORD __dst[2]; // [rsp+18h] [rbp-38h] BYREF
void *__p; // [rsp+28h] [rbp-28h]
v0 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::getFMODStatus(&v8, v0);
if ( (*(_BYTE *)&v8.__r_.__value_.__s.0 & 1) != 0 )
data = v8.__r_.__value_.__l.__data_;
else
data = v8.__r_.__value_.__s.__data_;
v2 = strlen(data);
if ( v2 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v3 = v2;
if ( v2 >= 0x17 )
{
v5 = 26;
if ( (v2 | 7) != 0x17 )
v5 = (v2 | 7) + 1;
v4 = (char *)operator new(v5);
__p = v4;
__dst[0] = v5 | 1;
__dst[1] = v3;
goto LABEL_11;
}
LOBYTE(__dst[0]) = 2 * v2;
v4 = (char *)__dst + 1;
if ( v2 )
LABEL_11:
memmove(v4, data, v3);
v4[v3] = 0;
v6 = FLAlertLayer::create_1(0, (int)"FMOD Debug", (__int64)__dst, (int)"OK", 0, 380.0);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
if ( (*(_BYTE *)&v8.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v8.__r_.__value_.__l.__data_);
return (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v6 + 1312LL))(v6);
}