//
// sub_1005ED24C from 0x1005ed24c to 0x1005ed324 (216 bytes)
//
// 2 xrefs:
// > sub_100535924 @ 0x100535cd4
// > sub_100536004 @ 0x1005362c0
//
// 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_1005ED24C(int a1, __int64 a2)
{
__int64 *v2; // x19
__int64 result; // x0
__int64 v4; // x8
int (__fastcall *v5)(__int64 *); // x8
__int64 v6; // [xsp+8h] [xbp-28h] BYREF
v6 = 0;
v2 = sub_1005EC62C(a1, a2);
result = 0;
if ( v2 )
{
v4 = *v2;
if ( *v2 && *(_QWORD *)(v4 + 56) )
{
*((_DWORD *)v2 + 8) = 4;
v5 = *(int (__fastcall **)(__int64 *))(v4 + 48);
if ( v5 && v5(v2) <= 0 )
{
*((_DWORD *)v2 + 8) = 0;
}
else if ( (int)sub_1005EC7FC(v2, -1, 4) >= 1 )
{
sub_1005ED148(v2, &v6);
}
}
else
{
sub_1005E0E48(6, 147, 150, (__int64)"pmeth_gn.c", 123);
}
sub_1005EC790(v2);
return v6;
}
return result;
}