//
// sub_58828 from 0x58828 to 0x588b4 (140 bytes)
//
// 3 xrefs:
// > sub_581C4 @ 0x58364
// > sub_587C0 @ 0x587e8
// > sub_58828 @ 0x58870
//
// 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_58828(__int64 a1)
{
__int64 v1; // x8
__int64 v2; // x19
float v3; // s0
char v4; // zf
_QWORD *v5; // x20
_QWORD *v6; // x21
__int64 v7; // x19
float v9; // [xsp+Ch] [xbp-14h] BYREF
v1 = *(_QWORD *)(a1 + 32);
v2 = a1;
if ( v1 )
v3 = *(float *)(v1 + 504);
else
v3 = 1.0;
*(float *)(a1 + 504) = *(float *)(a1 + 52) * v3;
while ( 1 )
{
sub_5937C(a1);
if ( v4 )
break;
a1 = sub_58828(*(_QWORD *)(v2 + 416));
}
v5 = *(_QWORD **)(v2 + 424);
v6 = (_QWORD *)(v2 + 424);
while ( v5 != v6 )
{
v7 = v5[2];
sub_5B818(v7, &v9);
sub_596C0(v7, v9);
v5 = (_QWORD *)*v5;
}
return 0;
}