//
// FMOD_OS_Time_GetUs from 0x1800c1790 to 0x1800c17e3 (83 bytes)
//
// 9 xrefs:
// > sub_180098120 @ 0x1800981a5
// > sub_180098120 @ 0x180098242
// > sub_1800B8AE0 @ 0x1800b8b05
// > sub_1800B8AE0 @ 0x1800b8b32
// > sub_1800B8B60 @ 0x1800b8b69
// > sub_1800B8B80 @ 0x1800b8ba2
// > sub_180112AC0 @ 0x180112c3e
// > ??> @ 0x180194348
// > ??> @ 0x1801fdc20
//
// 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:03 +0000
//
__int64 __fastcall FMOD_OS_Time_GetUs(DWORD *a1)
{
DWORD v3; // ecx
LARGE_INTEGER PerformanceCount; // [rsp+38h] [rbp+10h] BYREF
LARGE_INTEGER Frequency; // [rsp+40h] [rbp+18h] BYREF
if ( QueryPerformanceCounter(&PerformanceCount) )
{
QueryPerformanceFrequency(&Frequency);
*a1 = 1000000 * PerformanceCount.QuadPart / Frequency.QuadPart;
return 0;
}
else
{
v3 = 1000 * timeGetTime();
*a1 = v3;
return 0;
}
}