//
// sub_ED150 from 0xed150 to 0xed1fc (172 bytes)
//
// 4 xrefs:
// > sub_ED0B4 @ 0xed118
// > sub_F05B8 @ 0xf0804
// > sub_F05B8 @ 0xf0a08
// > sub_F2CD0 @ 0xf2cd8
//
// 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_ED150(__int64 result, _DWORD *a2, unsigned int a3)
{
unsigned int v3; // w19
unsigned int v5; // w8
__int64 v6; // x0
__int64 v7; // x1
int v8; // w22
_BYTE v9[4]; // [xsp+Ch] [xbp-24h] BYREF
v3 = a3;
if ( a3 )
{
while ( a2[6] )
{
result = sub_ED9F4(result, a2, v9);
if ( !(_DWORD)result )
return result;
if ( !--v3 )
return 1;
}
while ( v3 > 3 )
{
v5 = a2[5];
if ( v5 < a2[3] )
{
a2[5] = v5 + 1;
v3 -= 4;
}
else
{
v6 = sub_EDAF8(result);
result = sub_ECAC0(v6, v7);
if ( !(_DWORD)result )
return result;
}
}
v8 = -1;
while ( v3 != ++v8 )
{
result = sub_ED9F4(result, a2, v9);
if ( !(_DWORD)result )
return result;
}
}
return 1;
}