//
// SetupSFXPopup::overridePlaySFX from 0x1405de460 to 0x1405de511 (177 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407ff870
// > ??> @ 0x14092ecf4
//
// 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 11:35:00 +0000
//
// Hidden C++ exception states: #wind=2
char __fastcall SetupSFXPopup::overridePlaySFX(__int64 a1)
{
__int64 v1; // rbx
__int64 v2; // rcx
void *v4; // [rsp+30h] [rbp+8h]
void *v5; // [rsp+30h] [rbp+8h]
v1 = *(_QWORD *)(a1 - 328);
if ( v1 )
{
if ( *(_BYTE *)(v1 + 1996) )
{
v2 = qword_14090BF60;
if ( !qword_14090BF60 )
{
v4 = operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v4);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v2 = qword_14090BF60;
}
FMODAudioEngine::updateReverb(v2, *(_DWORD *)(v1 + 1992), 0);
}
if ( !qword_14090BFD0 )
{
v5 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v5);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
}
GameManager::playSFXTrigger(a1, v1);
}
return 1;
}