//
// sub_ED1FC from 0xed1fc to 0xed2cc (208 bytes)
//
// 7 xrefs:
// > sub_F05B8 @ 0xf07c0
// > sub_F05B8 @ 0xf09cc
// > sub_F05B8 @ 0xf0b28
// > sub_F05B8 @ 0xf0b74
// > sub_F05B8 @ 0xf0bc0
// > sub_F05B8 @ 0xf10d8
// > sub_F2C60 @ 0xf2c6c
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:15:03 +0000
//
__int64 __fastcall sub_ED1FC(__int64 a1, __int64 a2, _BYTE *a3, unsigned int a4)
{
unsigned int v4; // w19
__int64 result; // x0
__int64 v9; // x8
__int64 v10; // x9
int i; // w23
char v12; // [xsp+Ch] [xbp-24h]
v4 = a4;
if ( a4 )
{
while ( *(_DWORD *)(a2 + 24) )
{
result = sub_EDA58();
if ( !(_DWORD)result )
return result;
--v4;
*a3++ = v12;
if ( !v4 )
return 1;
}
while ( v4 > 3 )
{
v9 = *(unsigned int *)(a2 + 20);
if ( (unsigned int)v9 < *(_DWORD *)(a2 + 12) )
{
v10 = *(_QWORD *)a2;
*(_DWORD *)(a2 + 20) = v9 + 1;
v4 -= 4;
*(_DWORD *)a3 = bswap32(*(_DWORD *)(v10 + 4 * v9));
a3 += 4;
}
else
{
result = sub_ECAC0(a1, a2);
if ( !(_DWORD)result )
return result;
}
}
for ( i = 0; v4 != i; ++i )
{
result = sub_EDA58();
if ( !(_DWORD)result )
return result;
*a3++ = v12;
}
}
return 1;
}