//
// MoreOptionsLayer::onFMODDebug from 0x10079d360 to 0x10079d469 (265 bytes)
//
// 1 xrefs:
// > MoreOptionsLayer::init @ 0x10079c28a
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall MoreOptionsLayer::onFMODDebug(MoreOptionsLayer *a1, cocos2d::CCObject *a2)
{
double v2; // xmm0_8
FMODAudioEngine *v3; // rax
const char *data; // rbx
size_t v5; // rax
size_t v6; // r14
char *v7; // r15
size_t v8; // r12
char *v9; // rbx
std::string v10; // [rsp+0h] [rbp-50h] BYREF
_QWORD __dst[2]; // [rsp+18h] [rbp-38h] BYREF
void *__p; // [rsp+28h] [rbp-28h]
v3 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::getFMODStatus(&v10, (__int64)v3);
if ( (*(_BYTE *)&v10.__r_.__value_.__s.0 & 1) != 0 )
data = v10.__r_.__value_.__l.__data_;
else
data = v10.__r_.__value_.__s.__data_;
v5 = strlen(data);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v2);
v6 = v5;
if ( v5 >= 0x17 )
{
v8 = 26;
if ( (v5 | 7) != 0x17 )
v8 = (v5 | 7) + 1;
v7 = (char *)operator new(v8);
__p = v7;
__dst[0] = v8 | 1;
__dst[1] = v6;
goto LABEL_11;
}
LOBYTE(__dst[0]) = 2 * v5;
v7 = (char *)__dst + 1;
if ( v5 )
LABEL_11:
memmove(v7, data, v6);
v7[v6] = 0;
v9 = FLAlertLayer::create_1(0, (int)"FMOD Debug", (__int64)__dst, (int)"OK", 0, COERCE_DOUBLE(1136525312));
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
if ( (*(_BYTE *)&v10.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v10.__r_.__value_.__l.__data_);
(*(void (__fastcall **)(char *))(*(_QWORD *)v9 + 1288LL))(v9);
}