//
// sub_1005EDAA0 from 0x1005edaa0 to 0x1005edb14 (116 bytes)
//
// 0 xrefs:
//
// 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 11:09:46 +0000
//
unsigned __int64 __fastcall sub_1005EDAA0(unsigned __int64 a1, int a2)
{
unsigned __int64 v2; // x19
unsigned int v4; // w0
__int64 v5; // x8
__int64 i; // x9
v2 = a1;
if ( a1 )
{
v4 = sub_1005ECC08(a1);
if ( (int)(2 * v4 + 2) <= a2 )
{
if ( (v4 & 0x80000000) == 0 )
{
v5 = 2LL * v4;
for ( i = v4; i != -1; --i )
{
*(_WORD *)(v2 + v5) = *(unsigned __int8 *)(v2 + i);
v5 -= 2;
}
}
}
else
{
return 0;
}
}
return v2;
}