//
// sub_1005B8558 from 0x1005b8558 to 0x1005b85c4 (108 bytes)
//
// 9 xrefs:
// > sub_1005C052C @ 0x1005c0688
// > sub_1005C052C @ 0x1005c06e0
// > sub_1005C0BB4 @ 0x1005c0cc4
// > sub_1005C0BB4 @ 0x1005c0ce0
// > sub_1005C0D6C @ 0x1005c0e08
// > sub_1005C5324 @ 0x1005c54c0
// > sub_1005D170C @ 0x1005d1878
// > sub_1005D1B78 @ 0x1005d1f70
// > sub_1005D5744 @ 0x1005d5940
//
// 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_1005B8558(__int64 a1, _QWORD *a2)
{
__int64 (*v2)(void); // x5
__int64 v3; // x2
__int64 v4; // x4
v2 = *(__int64 (**)(void))(*(_QWORD *)a1 + 136LL);
if ( !v2 )
{
v3 = 66;
v4 = 905;
goto LABEL_5;
}
if ( *(_QWORD *)a1 != *a2 )
{
v3 = 101;
v4 = 910;
LABEL_5:
sub_1005E0E48(16, 183, v3, "ec_lib.c", v4);
return 0;
}
return v2();
}