//
// sub_1005DF138 from 0x1005df138 to 0x1005df264 (300 bytes)
//
// 1 xrefs:
// > sub_1005DF0B0 @ 0x1005df0c8
//
// This function is hookable on this platform (idp: arm, 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:09:39 +0000
//
__int64 __fastcall sub_1005DF138(
_QWORD *a1,
__int64 a2,
__int64 a3,
int *a4,
_DWORD *a5,
_DWORD *a6,
_DWORD *a7,
int a8)
{
unsigned __int64 v8; // x19
_DWORD *v13; // x0
_DWORD *v14; // x20
int v15; // w8
int v16; // w8
int v17; // w8
int v18; // w9
void *v19; // x0
LODWORD(v8) = a8;
if ( !*a5 )
{
*a5 = 3;
*a6 = 2;
}
v13 = sub_1005D7660(
*((__int64 **)off_1009DA5E8 + 54),
32,
(char)"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_output_nosound.cpp",
67,
0);
*a1 = v13;
if ( !v13 )
return 38;
v14 = v13;
v15 = *a4;
*v13 = *a4;
v13[1] = v8;
v16 = 1000 * (int)v8 / v15;
if ( v16 < 3 )
v17 = 1;
else
v17 = v16 / 3;
v13[2] = v17;
v18 = *a7 - 1;
if ( (unsigned int)v18 <= 4 )
v8 = (qword_1007741A0[v18] * (unsigned __int64)(unsigned int)v8) >> 3;
v19 = sub_1005D7660(
*((__int64 **)off_1009DA5E8 + 54),
(int)v8 * *a6,
(char)"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_output_nosound.cpp",
84,
0);
*((_QWORD *)v14 + 3) = v19;
if ( v19 )
return 0;
else
return 38;
}