//
// sub_1005B8278 from 0x1005b8278 to 0x1005b833c (196 bytes)
//
// 1 xrefs:
// > sub_1005BFA98 @ 0x1005bfac0
//
// 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
//
_QWORD *__fastcall sub_1005B8278(_QWORD *a1, __int64 *a2)
{
_QWORD *v2; // x20
_QWORD *v3; // x0
void *v4; // x19
unsigned int (__fastcall *v5)(_QWORD *, _QWORD *); // x8
__int64 v6; // x2
__int64 v7; // x4
void (__fastcall *v8)(void *); // x8
v2 = a1;
if ( a1 )
{
v3 = sub_1005B7838(a2);
v4 = v3;
if ( v3 )
{
v5 = *(unsigned int (__fastcall **)(_QWORD *, _QWORD *))(*v3 + 96LL);
if ( v5 )
{
if ( *v3 == *v2 )
{
if ( v3 == v2 )
return v2;
if ( v5(v3, v2) )
return v4;
goto LABEL_8;
}
v6 = 101;
v7 = 761;
}
else
{
v6 = 66;
v7 = 757;
}
sub_1005E0E48(16, 114, v6, "ec_lib.c", v7);
LABEL_8:
v8 = *(void (__fastcall **)(void *))(*(_QWORD *)v4 + 80LL);
if ( v8 )
v8(v4);
sub_100588C44(v4);
}
}
return nullptr;
}