//
// sub_EDDAEC from 0xeddaec to 0xeddc34 (328 bytes)
//
// 2 xrefs:
// > sub_EDE8D4 @ 0xededb0
// > sub_EDE8D4 @ 0xedeed4
//
// 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 13:11:47 +0000
//
__int64 __fastcall sub_EDDAEC(int *a1, int **a2)
{
__int64 v2; // x8
int *v3; // x5
int v4; // w3
int v5; // w1
int v6; // w13
int v7; // w2
int v8; // w10
int v9; // w11
int v10; // w4
int *v11; // x11
int v12; // w3
__int64 v13; // x12
_BYTE *v14; // x9
int v15; // w2
int v16; // w7
_BYTE *v17; // x6
__int64 v18; // x5
unsigned int v19; // w4
v2 = *((_QWORD *)a1 + 19);
if ( !v2 )
return 0;
v3 = *a2;
v4 = a1[2];
v5 = a1[3];
v6 = *v3;
v7 = v4;
v8 = a1[4];
if ( a1[22] )
{
if ( v4 )
{
v9 = a1[32];
v7 = v4 - 1;
v2 -= *a1;
v10 = v8 + v4 + v9;
if ( v10 != a1[33] )
goto LABEL_5;
}
else
{
v9 = a1[32];
v10 = v8 + v9;
--v8;
if ( v10 != a1[33] )
goto LABEL_5;
}
v8 = v10 - v9 - v7;
}
LABEL_5:
v11 = v3 + 4;
v12 = v3[6];
v13 = *((_QWORD *)v3 + 2) + v12 * v7;
v14 = (_BYTE *)(v13 + 1);
if ( v8 <= 0 )
return 0;
v15 = 0;
v16 = 15;
do
{
if ( v5 > 0 )
{
v17 = v14;
v18 = 0;
do
{
v19 = *(unsigned __int8 *)(v2 + v18++);
v19 >>= 4;
v16 &= v19;
*v17 = v19 | *v17 & 0xF0;
v17 += 2;
}
while ( v5 > (int)v18 );
v12 = v11[2];
}
++v15;
v14 += v12;
v2 += *a1;
}
while ( v15 != v8 );
if ( v16 == 15 || (unsigned int)(v6 - 7) > 3 )
return 0;
off_1569020(v13);
return 0;
}