//
// MoreOptionsLayer::onFMODDebug from 0x8ee384 to 0x8ee50c (392 bytes)
//
// 3 xrefs:
// > ??> @ 0xaf9d8
// > MoreOptionsLayer::init @ 0x8f8404
// > ??> @ 0x1544ff0
//
// 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 12:56:57 +0000
//
__int64 __fastcall MoreOptionsLayer::onFMODDebug(MoreOptionsLayer *this, cocos2d::CCObject *a2)
{
const char *v2; // x23
FMOD::System **v3; // x0
size_t v4; // x0
size_t v5; // x19
unsigned __int64 v6; // x21
char *v7; // x3
__int64 v8; // x19
__int64 v10[2]; // [xsp+58h] [xbp+58h] BYREF
void *v11; // [xsp+68h] [xbp+68h]
__int64 v12; // [xsp+70h] [xbp+70h] BYREF
size_t v13; // [xsp+78h] [xbp+78h]
void *v14; // [xsp+80h] [xbp+80h]
v2 = (char *)v10 + 1;
v3 = (FMOD::System **)FMODAudioEngine::sharedEngine(_stack_chk_guard);
FMODAudioEngine::getFMODStatus(v3, v10);
if ( (v10[0] & 1) != 0 )
v2 = (const char *)v11;
v12 = 0;
v13 = 0;
v14 = nullptr;
v4 = strlen(v2);
v5 = v4;
if ( v4 > 0xFFFFFFFFFFFFFFEFLL )
sub_62CD3C();
if ( v4 > 0x16 )
{
v6 = (v4 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v7 = (char *)operator new(v6);
v14 = v7;
v13 = v5;
v12 = v6 | 1;
LABEL_6:
v7 = (char *)memcpy(v7, v2, v5);
goto LABEL_7;
}
LOBYTE(v12) = 2 * v4;
v7 = (char *)&v12 + 1;
if ( v4 )
goto LABEL_6;
LABEL_7:
v7[v5] = 0;
v8 = FLAlertLayer::create(
0,
(cocos2d::CCLabelBMFont *)"FMOD Debug",
(char *)&v12,
(ButtonSprite *)"OK",
nullptr,
380.0);
if ( (v12 & 1) != 0 )
operator delete(v14);
if ( (v10[0] & 1) != 0 )
operator delete(v11);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 1312LL))(v8);
return _stack_chk_guard;
}