//
// sub_1004CE440 from 0x1004ce440 to 0x1004ce50c (204 bytes)
//
// 92 xrefs:
// > FMOD::System::release @ 0x1004c79e0
// > FMOD::System::setOutput @ 0x1004c7abc
// > FMOD::System::getOutput @ 0x1004c7b94
// > FMOD::System::getNumDrivers @ 0x1004c7c6c
// > FMOD::System::getDriverInfo @ 0x1004c7d68
// > FMOD::System::setDriver @ 0x1004c7fd8
// > FMOD::System::getDriver @ 0x1004c80b0
// > FMOD::System::setSoftwareChannels @ 0x1004c8188
// > FMOD::System::getSoftwareChannels @ 0x1004c8260
// > FMOD::System::setSoftwareFormat @ 0x1004c834c
// > FMOD::System::getSoftwareFormat @ 0x1004c84b0
// > FMOD::System::setDSPBufferSize @ 0x1004c8624
// > FMOD::System::getDSPBufferSize @ 0x1004c874c
// > FMOD::System::setFileSystem @ 0x1004c888c
// > FMOD::System::attachFileSystem @ 0x1004c8b30
// > FMOD::System::setAdvancedSettings @ 0x1004c8cbc
// > FMOD::System::getAdvancedSettings @ 0x1004c8d94
// > FMOD::System::setCallback @ 0x1004c8e78
// > FMOD::System::setPluginPath @ 0x1004c8f98
// > FMOD::System::loadPlugin @ 0x1004c9084
// > FMOD::System::unloadPlugin @ 0x1004c91d4
// > FMOD::System::getNumNestedPlugins @ 0x1004c92b8
// > FMOD::System::getNestedPlugin @ 0x1004c93e8
// > FMOD::System::getNumPlugins @ 0x1004c9544
// > FMOD::System::getPluginHandle @ 0x1004c9674
// > FMOD::System::getPluginInfo @ 0x1004c97e0
// > FMOD::System::setOutputByPlugin @ 0x1004c9988
// > FMOD::System::getOutputByPlugin @ 0x1004c9a60
// > FMOD::System::createDSPByPlugin @ 0x1004c9b44
// > FMOD::System::getDSPInfoByPlugin @ 0x1004c9c6c
// > FMOD::System::registerCodec @ 0x1004c9d9c
// > FMOD::System::registerDSP @ 0x1004c9ef8
// > FMOD::System::registerOutput @ 0x1004ca020
// > FMOD::System::init @ 0x1004ca14c
// > FMOD::System::close @ 0x1004ca28c
// > FMOD::System::update @ 0x1004ca364
// > FMOD::System::setSpeakerPosition @ 0x1004ca444
// > FMOD::System::getSpeakerPosition @ 0x1004ca5d8
// > FMOD::System::setStreamBufferSize @ 0x1004ca760
// > FMOD::System::getStreamBufferSize @ 0x1004ca888
// > FMOD::System::set3DSettings @ 0x1004ca9bc
// > FMOD::System::get3DSettings @ 0x1004cab24
// > FMOD::System::set3DNumListeners @ 0x1004cac74
// > FMOD::System::get3DNumListeners @ 0x1004cad4c
// > FMOD::System::set3DListenerAttributes @ 0x1004cae40
// > FMOD::System::get3DListenerAttributes @ 0x1004cb004
// > FMOD::System::set3DRolloffCallback @ 0x1004cb1ac
// > FMOD::System::mixerSuspend @ 0x1004cb284
// > FMOD::System::mixerResume @ 0x1004cb348
// > FMOD::System::getSpeakerModeChannels @ 0x1004cb418
// > FMOD::System::getDefaultMixMatrix @ 0x1004cb500
// > FMOD::System::getVersion @ 0x1004cb5e0
// > FMOD::System::getOutputHandle @ 0x1004cb6b8
// > FMOD::System::getChannelsPlaying @ 0x1004cb798
// > FMOD::System::getCPUUsage @ 0x1004cb8a4
// > FMOD::System::getFileUsage @ 0x1004cb980
// > FMOD::System::createSound @ 0x1004cbad8
// > FMOD::System::createStream @ 0x1004cbc5c
// > FMOD::System::createDSP @ 0x1004cbdd8
// > FMOD::System::createDSPByType @ 0x1004cbf00
// > FMOD::System::createChannelGroup @ 0x1004cc028
// > FMOD::System::createSoundGroup @ 0x1004cc150
// > FMOD::System::createReverb3D @ 0x1004cc26c
// > FMOD::System::playSound @ 0x1004cc35c
// > FMOD::System::playDSP @ 0x1004cc4f0
// > FMOD::System::getChannel @ 0x1004cc678
// > FMOD::System::getDSPInfoByType @ 0x1004cc7a0
// > FMOD::System::getMasterChannelGroup @ 0x1004cc8b8
// > FMOD::System::getMasterSoundGroup @ 0x1004cc984
// > FMOD::System::attachChannelGroupToPort @ 0x1004cca74
// > FMOD::System::detachChannelGroupFromPort @ 0x1004ccbc8
// > FMOD::System::setReverbProperties @ 0x1004cccac
// > FMOD::System::getReverbProperties @ 0x1004ccdd4
// > FMOD::System::lockDSP @ 0x1004ccee8
// > FMOD::System::unlockDSP @ 0x1004ccf9c
// > FMOD::System::getRecordNumDrivers @ 0x1004cd064
// > FMOD::System::getRecordDriverInfo @ 0x1004cd1a8
// > FMOD::System::getRecordPosition @ 0x1004cd460
// > FMOD::System::recordStart @ 0x1004cd590
// > FMOD::System::recordStop @ 0x1004cd6e0
// > FMOD::System::isRecording @ 0x1004cd7c4
// > FMOD::System::createGeometry @ 0x1004cd8f4
// > FMOD::System::setGeometrySettings @ 0x1004cda48
// > FMOD::System::getGeometrySettings @ 0x1004cdb24
// > FMOD::System::loadGeometry @ 0x1004cdc10
// > FMOD::System::getGeometryOcclusion @ 0x1004cdd78
// > FMOD::System::setNetworkProxy @ 0x1004cdef4
// > FMOD::System::getNetworkProxy @ 0x1004cdfd8
// > FMOD::System::setNetworkTimeout @ 0x1004ce0f4
// > FMOD::System::getNetworkTimeout @ 0x1004ce1cc
// > FMOD::System::setUserData @ 0x1004ce2a0
// > FMOD::System::getUserData @ 0x1004ce368
//
// 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
//
__int64 __fastcall sub_1004CE440(__int64 a1, __int64 *a2, __int64 *a3)
{
__int64 result; // x0
*a2 = 0;
if ( *((_QWORD *)off_1008524C8 + 46) != a1
&& *((_QWORD *)off_1008524C8 + 47) != a1
&& *((_QWORD *)off_1008524C8 + 48) != a1
&& *((_QWORD *)off_1008524C8 + 49) != a1
&& *((_QWORD *)off_1008524C8 + 50) != a1
&& *((_QWORD *)off_1008524C8 + 51) != a1
&& *((_QWORD *)off_1008524C8 + 52) != a1
&& *((_QWORD *)off_1008524C8 + 53) != a1 )
{
return 30;
}
*a2 = a1;
if ( !a1 )
return 30;
if ( !a3 )
return 0;
if ( *a3 )
return 28;
result = sub_100442CFC(a1);
if ( !(_DWORD)result )
*a3 = a1;
return result;
}