//
// sub_1004EC730 from 0x1004ec730 to 0x1004ec778 (72 bytes)
//
// 0 xrefs:
//
// 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_1004EC730(__int64 a1, int a2)
{
int v2; // w9
int v3; // w8
v2 = *(_DWORD *)(a1 + 64);
do
{
do
{
v3 = a2;
a2 = v2 - 1;
}
while ( v2 <= v3 );
if ( v3 < 0 )
break;
a2 = -1;
}
while ( !*(_DWORD *)(a1 + 8) );
if ( v3 < 0 )
return *(unsigned int *)(a1 + 132);
else
return *(unsigned int *)(*(_QWORD *)(a1 + 88) + 4LL * (unsigned int)v3);
}