//
// FMODAudioEngine::stop from 0x3ecd18 to 0x3ece08 (240 bytes)
//
// 2 xrefs:
// > Java_com_customRobTop_JniToCpp_didShowInterstitial @ 0x395968
// > AppDelegate::pauseSound @ 0x3f6ea4
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:47:10 +0000
//
FMODAudioEngine *__fastcall FMODAudioEngine::stop(FMODAudioEngine *this, int a2)
{
FMODAudioEngine *v2; // r4
FMOD::ChannelControl *v3; // r0
FMOD::ChannelControl *v4; // r0
_DWORD *i; // r5
FMOD::ChannelControl *v6; // r0
FMOD::ChannelControl *v7; // r10
int *v8; // r3
int v9; // r0
FMOD::System *v10; // r0
__int16 v11; // [sp+2h] [bp-6h] BYREF
int v12; // [sp+4h] [bp-4h]
v11 = HIWORD(this);
v12 = a2;
v2 = this;
if ( !*((_BYTE *)this + 404) )
{
FMODAudioEngine::logLifecycleState(this, "stop in");
v3 = *((FMOD::ChannelControl **)v2 + 94);
LOBYTE(v11) = 0;
FMOD::ChannelControl::getPaused(v3, (bool *)&v11);
if ( !(_BYTE)v11 )
{
v4 = *((FMOD::ChannelControl **)v2 + 94);
*((_BYTE *)v2 + 405) = 1;
FMOD::ChannelControl::setPaused(v4, 1);
}
for ( i = *((_DWORD **)v2 + 68); i; i = (_DWORD *)*i )
{
v6 = (FMOD::ChannelControl *)FMODAudioEngine::channelForChannelID(v2, i[3]);
HIBYTE(v11) = 1;
v7 = v6;
if ( v6 )
FMOD::ChannelControl::getPaused(v6, (bool *)&v11 + 1);
if ( !HIBYTE(v11) )
{
FMOD::ChannelControl::setPaused(v7, 1);
v8 = *((int **)v2 + 102);
while ( v8 != *((int **)v2 + 103) )
{
v9 = *v8++;
if ( v9 == i[3] )
goto LABEL_16;
}
if ( v8 == *((int **)v2 + 104) )
{
std::vector::__push_back_slow_path((int)v2 + 408, i + 3);
}
else
{
if ( v8 )
*v8 = i[3];
*((_DWORD *)v2 + 103) += 4;
}
}
LABEL_16:
;
}
FMOD::System::update(*((FMOD::System **)v2 + 91));
v10 = *((FMOD::System **)v2 + 91);
*((_BYTE *)v2 + 404) = 1;
*((_DWORD *)v2 + 97) = FMOD::System::mixerSuspend(v10);
return (FMODAudioEngine *)cocos2d::CCNode::pauseSchedulerAndActions(v2);
}
return this;
}