//
// sub_1005ECBAC from 0x1005ecbac to 0x1005ecc2c (128 bytes)
//
// 3 xrefs:
// > sub_100520EC8 @ 0x1005213b4
// > sub_1005E92BC @ 0x1005e943c
// > sub_1005ED6F0 @ 0x1005ed7b4
//
// 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_1005ECBAC(_DWORD *a1)
{
__int64 (*v1)(void); // x5
if ( a1 && *(_QWORD *)a1 && (v1 = *(__int64 (**)(void))(*(_QWORD *)a1 + 88LL)) != nullptr )
{
if ( a1[8] == 16 )
{
return v1();
}
else
{
sub_1005E0E48(6, 142, 151, (__int64)"pmeth_fn.c", 144);
return 0xFFFFFFFFLL;
}
}
else
{
sub_1005E0E48(6, 142, 150, (__int64)"pmeth_fn.c", 140);
return 4294967294LL;
}
}