//
// sub_10058A418 from 0x10058a418 to 0x10058a47c (100 bytes)
//
// 2 xrefs:
// > sub_10058A510 @ 0x10058a548
// > sub_10058A5FC @ 0x10058a630
//
// 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
//
unsigned __int64 __fastcall sub_10058A418(unsigned int *a1)
{
int v2; // w0
__int64 v3; // x1
__int64 (__fastcall **v4)(_QWORD); // x0
__int64 v5; // x0
if ( qword_100882CB0 && (v2 = sub_1005DEA4C(qword_100882CB0), v3 = *a1, v2 > (int)v3) )
{
v4 = (__int64 (__fastcall **)(_QWORD))sub_1005DEA60(qword_100882CB0, v3);
v5 = (*v4)(*((_QWORD *)a1 + 1));
}
else
{
v5 = sub_1005DEC64(*((_QWORD *)a1 + 1));
}
return (int)*a1 ^ (unsigned __int64)v5;
}