//
// sub_1005C5BF4 from 0x1005c5bf4 to 0x1005c5c8c (152 bytes)
//
// 5 xrefs:
// > sub_10051FFFC @ 0x100520434
// > sub_1005234DC @ 0x100523f38
// > sub_1005BD8D4 @ 0x1005bde4c
// > sub_1005BEBF4 @ 0x1005becec
// > sub_1005BF364 @ 0x1005bf3b8
//
// 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_1005C5BF4(__int64 a1, _QWORD *a2, _BYTE *a3, __int64 a4, __int64 *a5)
{
__int64 v5; // x8
__int64 (*v6)(void); // x5
__int64 v7; // x2
__int64 v8; // x4
v5 = *(_QWORD *)a1;
v6 = *(__int64 (**)(void))(*(_QWORD *)a1 + 160LL);
if ( !v6 && (*(_BYTE *)v5 & 1) == 0 )
{
v7 = 66;
v8 = 171;
LABEL_6:
sub_1005E0E48(16, 122, v7, "ec_oct.c", v8);
return 0;
}
if ( v5 != *a2 )
{
v7 = 101;
v8 = 175;
goto LABEL_6;
}
if ( (*(_BYTE *)v5 & 1) == 0 )
return v6();
if ( *(_DWORD *)(v5 + 4) == 406 )
return sub_1005C4D00(a1, a2, a3, a4, a5);
return sub_1005C5694(a1, a2, a3, a4, a5);
}