//
// sub_1005ECC2C from 0x1005ecc2c to 0x1005eccac (128 bytes)
//
// 2 xrefs:
// > sub_100525468 @ 0x100525a38
// > sub_10061395C @ 0x100613d14
//
// 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_1005ECC2C(__int64 *a1)
{
__int64 v2; // x8
__int64 (__fastcall *v3)(__int64 *); // x8
__int64 result; // x0
if ( a1 && (v2 = *a1) != 0 && *(_QWORD *)(v2 + 152) )
{
*((_DWORD *)a1 + 8) = 256;
v3 = *(__int64 (__fastcall **)(__int64 *))(v2 + 144);
if ( v3 )
{
result = v3(a1);
if ( (int)result <= 0 )
*((_DWORD *)a1 + 8) = 0;
}
else
{
return 1;
}
}
else
{
sub_1005E0E48(6, 139, 150, (__int64)"pmeth_fn.c", 189);
return 4294967294LL;
}
return result;
}