//
// sub_1005B8150 from 0x1005b8150 to 0x1005b81c8 (120 bytes)
//
// 3 xrefs:
// > sub_1005BB970 @ 0x1005bbaec
// > sub_1005C1D1C @ 0x1005c1d64
// > sub_100629680 @ 0x1006296ec
//
// 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_1005B8150(__int64 *a1, _QWORD *a2, _QWORD *a3)
{
__int64 v3; // x8
__int64 (*v4)(void); // x4
__int64 v5; // x2
__int64 v6; // x4
v3 = *a1;
v4 = *(__int64 (**)(void))(*a1 + 208);
if ( !v4 )
{
v5 = 66;
v6 = 998;
goto LABEL_6;
}
if ( v3 != *a2 || v3 != *a3 )
{
v5 = 101;
v6 = 1002;
LABEL_6:
sub_1005E0E48(16, 113, v5, "ec_lib.c", v6);
return 0xFFFFFFFFLL;
}
return v4();
}