//
// sub_1005113B0 from 0x1005113b0 to 0x100511418 (104 bytes)
//
// 1 xrefs:
// > ??> @ 0x100858920
//
// 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 sub_1005113B0(__int64 *a1, int a2, _QWORD *a3, _DWORD *a4, _BYTE *a5)
{
__int64 v5; // x8
__int64 v6; // x9
float v7; // s0
__int64 result; // x0
if ( a2 != 2 )
return 31;
v5 = *a1;
if ( *(_DWORD *)(*a1 + 552) == -1 )
{
v7 = 0.0;
}
else
{
v6 = *(_QWORD *)(v5 + 568);
if ( v6 )
v7 = *(float *)(v6 + 628);
else
v7 = 1.0;
}
*(float *)(v5 + 560) = v7 * *(float *)(v5 + 544);
*a3 = v5 + 556;
*a4 = 8;
result = 0;
if ( a5 )
*a5 = 0;
return result;
}