//
// FMOD_Thread_SetAttributes from 0xe4100 to 0xe41ac (172 bytes)
//
// 4 xrefs:
// > .FMOD_Thread_SetAttributes @ 0x107fec
// > ??> @ 0x4858
// > .FMOD_Thread_SetAttributes @ 0x107fe4
// > ??> @ 0x1108b8
//
// 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 FMOD_Thread_SetAttributes(int a1, __int64 a2, int a3, int a4)
{
char *v5; // x8
char *v6; // x8
if ( a1 > 12 )
return 31;
if ( a2 == 0x4000000000000000LL )
{
if ( (unsigned int)a1 > 0xC )
a2 = 0;
else
a2 = qword_4E6F0[a1];
}
v5 = (char *)off_114000;
*((_QWORD *)off_114000 + (unsigned int)a1 + 11) = a2;
if ( a3 == -32769 )
{
if ( (unsigned int)a1 > 0xC )
a3 = 0;
else
a3 = dword_4E758[a1];
}
v6 = &v5[4 * a1];
*((_DWORD *)v6 + 48) = a3;
if ( !a4 )
{
if ( (unsigned int)a1 > 0xC )
a4 = 0;
else
a4 = dword_4E78C[a1];
}
*((_DWORD *)v6 + 61) = a4;
return 0;
}