//
// sub_1005FC5A0 from 0x1005fc5a0 to 0x1005fc618 (120 bytes)
//
// 6 xrefs:
// > sub_1005C1D9C @ 0x1005c1dd4
// > sub_1005CA4EC @ 0x1005ca518
// > sub_1005CFC4C @ 0x1005cfc80
// > sub_1005D39D8 @ 0x1005d3a08
// > sub_1005EB334 @ 0x1005eb370
// > sub_1006281FC @ 0x100628248
//
// 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_1005FC5A0(_QWORD *a1, _QWORD *a2, _DWORD *a3, _QWORD *a4, __int64 a5)
{
__int64 v5; // x8
if ( a1 )
*a1 = **(_QWORD **)(a5 + 16);
v5 = *(_QWORD *)(a5 + 24);
if ( *(_DWORD *)v5 == 16 )
{
*(_DWORD *)a5 = 1;
if ( !a2 )
goto LABEL_9;
goto LABEL_8;
}
if ( *(_DWORD *)v5 != 4 )
return 0;
*(_DWORD *)a5 = 0;
if ( a2 )
{
LABEL_8:
*a2 = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 8LL);
*a3 = **(_DWORD **)(*(_QWORD *)(a5 + 24) + 8LL);
}
LABEL_9:
if ( a4 )
*a4 = *(_QWORD *)(a5 + 16);
return 1;
}