//
// sub_1005B85C4 from 0x1005b85c4 to 0x1005b8648 (132 bytes)
//
// 3 xrefs:
// > sub_1005BB970 @ 0x1005bc1b0
// > sub_1005BB970 @ 0x1005bc2e8
// > sub_1005BC950 @ 0x1005bcc7c
//
// 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_1005B85C4(__int64 *a1, _QWORD *a2, _QWORD *a3, _QWORD *a4)
{
__int64 v4; // x8
__int64 (*v5)(void); // x5
__int64 v6; // x2
__int64 v7; // x4
v4 = *a1;
v5 = *(__int64 (**)(void))(*a1 + 168);
if ( !v5 )
{
v6 = 66;
v7 = 921;
goto LABEL_7;
}
if ( v4 != *a2 || v4 != *a3 || v4 != *a4 )
{
v6 = 101;
v7 = 926;
LABEL_7:
sub_1005E0E48(16, 112, v6, "ec_lib.c", v7);
return 0;
}
return v5();
}