//
// sub_1800BE470 from 0x1800be470 to 0x1800be5b5 (325 bytes)
//
// 2 xrefs:
// > _cfltcvt_init @ 0x1800be69c
// > ??> @ 0x1801fd890
//
// 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 10:54:02 +0000
//
__int64 __fastcall sub_1800BE470(
_QWORD *a1,
__int64 a2,
__int64 a3,
int *a4,
_DWORD *a5,
_DWORD *a6,
_DWORD *a7,
unsigned int a8)
{
__int64 v10; // rbx
_DWORD *v11; // rax
_DWORD *v12; // rdi
int v13; // ecx
unsigned __int64 v14; // r8
int v15; // edx
void *v16; // rax
if ( !*a5 )
{
*a5 = 3;
*a6 = 2;
}
v10 = 32;
v11 = sub_1800B6880(
*((_QWORD *)off_1801AED20 + 52),
32,
"C:\\buildagent1\\work\\570ad728b1678096\\core_api\\src\\fmod_output_nosound.cpp",
67,
0);
*a1 = v11;
v12 = v11;
if ( !v11 )
return 38;
v13 = *a4;
LODWORD(v14) = a8;
*v11 = *a4;
v11[1] = a8;
v15 = (int)(1000 * a8) / v13 / 3;
if ( v15 < 1 )
v15 = 1;
v11[2] = v15;
switch ( *a7 )
{
case 1:
v10 = 8;
break;
case 2:
v10 = 16;
break;
case 3:
v10 = 24;
break;
default:
if ( (unsigned int)(*a7 - 4) > 1 )
goto LABEL_15;
break;
}
v14 = (v10 * (unsigned __int64)a8) >> 3;
LABEL_15:
v16 = sub_1800B6880(
*((_QWORD *)off_1801AED20 + 52),
(unsigned int)(v14 * *a6),
"C:\\buildagent1\\work\\570ad728b1678096\\core_api\\src\\fmod_output_nosound.cpp",
84,
0);
*((_QWORD *)v12 + 3) = v16;
if ( v16 )
return 0;
return 38;
}