//
// sub_1005B8414 from 0x1005b8414 to 0x1005b8480 (108 bytes)
//
// 6 xrefs:
// > sub_1005BAAD4 @ 0x1005bab8c
// > sub_1005BCFE8 @ 0x1005bd214
// > sub_1005C453C @ 0x1005c4930
// > sub_1005C4D00 @ 0x1005c4ff0
// > sub_1006250BC @ 0x10062522c
// > sub_100629118 @ 0x10062925c
//
// 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_1005B8414(__int64 a1, _QWORD *a2)
{
__int64 (*v2)(void); // x5
__int64 v3; // x2
__int64 v4; // x4
v2 = *(__int64 (**)(void))(*(_QWORD *)a1 + 128LL);
if ( !v2 )
{
v3 = 66;
v4 = 851;
goto LABEL_5;
}
if ( *(_QWORD *)a1 != *a2 )
{
v3 = 101;
v4 = 856;
LABEL_5:
sub_1005E0E48(16, 124, v3, "ec_lib.c", v4);
return 0;
}
return v2();
}