//
// sub_EECB08 from 0xeecb08 to 0xeecf00 (1016 bytes)
//
// 1 xrefs:
// > sub_EECF00 @ 0xeecfc8
//
// 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:56 +0000
//
__int64 __fastcall sub_EECB08(_BYTE *a1, _BYTE *a2, int a3, int a4, int a5, int a6)
{
int v6; // w3
__int64 v7; // x18
__int64 v8; // x21
__int64 v9; // x19
__int64 v10; // x13
__int64 v11; // x16
__int64 v12; // x22
_BYTE *v13; // x28
int v14; // w11
int v15; // w17
int v16; // w9
int v17; // w10
__int64 v18; // x6
int v19; // w14
int v20; // w15
int v21; // w8
int v22; // w12
int v23; // w20
int v24; // w12
int v25; // w6
int v26; // w8
_BYTE *v27; // x12
int v28; // w10
int v29; // w23
int v30; // w8
int v31; // w9
__int64 result; // x0
int v33; // w25
int v34; // w15
int v35; // w6
int v36; // w14
int v37; // w0
int v38; // w24
int v39; // w26
int v40; // w6
int v41; // w8
int v42; // w10
int v43; // w6
int v44; // w9
v6 = 2 * a4 + 1;
v7 = -3 * a3;
v8 = -4 * a3;
v9 = -2 * a3;
v10 = -a3;
v11 = 2 * a3;
v12 = 3 * a3;
v13 = a1 + 8;
do
{
while ( 1 )
{
v14 = (unsigned __int8)a1[v9];
v15 = (unsigned __int8)a1[a3];
v16 = (unsigned __int8)a1[v10];
v17 = (unsigned __int8)*a1;
v18 = v14 - v15;
v19 = (unsigned __int8)a1[v7];
v20 = (unsigned __int8)a1[v11];
if ( v6 < byte_11E4BAF[v18] + 4 * byte_11E4BAF[v16 - v17] )
goto LABEL_12;
if ( a5 < byte_11E4BAF[(unsigned __int8)a1[v8] - v19] )
goto LABEL_12;
if ( a5 < byte_11E4BAF[v19 - v14] )
goto LABEL_12;
v21 = byte_11E4BAF[v14 - v16];
if ( a5 < v21 )
goto LABEL_12;
if ( a5 < byte_11E4BAF[(unsigned __int8)a1[v12] - v20] )
goto LABEL_12;
if ( a5 < byte_11E4BAF[v20 - v15] )
goto LABEL_12;
v22 = byte_11E4BAF[v15 - v17];
if ( a5 < v22 )
goto LABEL_12;
if ( a6 < v21 || a6 < v22 )
break;
v23 = byte_11E46AC[3 * (v17 - v16) + byte_11E46AC[v18]];
v24 = (9 * v23 + 63) >> 7;
v25 = (18 * v23 + 63) >> 7;
v26 = (27 * v23 + 63) >> 7;
a1[v7] = byte_11E3FBF[v19 + v24];
a1[v9] = byte_11E3FBF[v14 + v25];
a1[v10] = byte_11E3FBF[v16 + v26];
*a1 = byte_11E3FBF[v17 - v26];
a1[a3] = byte_11E3FBF[v15 - v25];
a1[v11] = byte_11E3FBF[v20 - v24];
LABEL_12:
if ( ++a1 == v13 )
goto LABEL_13;
}
v41 = 3 * (v17 - v16) + byte_11E46AC[v18];
v42 = v17 - byte_11E4230[(v41 + 4) >> 3];
a1[v10] = byte_11E3FBF[v16 + byte_11E4230[(v41 + 3) >> 3]];
*a1++ = byte_11E3FBF[v42];
}
while ( a1 != v13 );
LABEL_13:
v27 = a2 + 8;
while ( 1 )
{
LABEL_14:
v28 = (unsigned __int8)a2[v9];
v29 = (unsigned __int8)a2[a3];
v30 = (unsigned __int8)a2[v10];
v31 = (unsigned __int8)*a2;
result = v28 - v29;
v33 = (unsigned __int8)a2[v7];
v34 = (unsigned __int8)a2[v11];
if ( v6 < byte_11E4BAF[result] + 4 * byte_11E4BAF[v30 - v31] )
goto LABEL_24;
if ( a5 < byte_11E4BAF[(unsigned __int8)a2[v8] - v33] )
goto LABEL_24;
if ( a5 < byte_11E4BAF[v33 - v28] )
goto LABEL_24;
v35 = byte_11E4BAF[v28 - v30];
if ( a5 < v35 )
goto LABEL_24;
if ( a5 < byte_11E4BAF[(unsigned __int8)a2[v12] - v34] )
goto LABEL_24;
if ( a5 < byte_11E4BAF[v34 - v29] )
goto LABEL_24;
v36 = byte_11E4BAF[v29 - v31];
if ( a5 < v36 )
goto LABEL_24;
if ( a6 < v35 || a6 < v36 )
break;
v37 = byte_11E46AC[3 * (v31 - v30) + byte_11E46AC[result]];
v38 = (9 * v37 + 63) >> 7;
v39 = (18 * v37 + 63) >> 7;
v40 = (27 * v37 + 63) >> 7;
a2[v7] = byte_11E3FBF[v33 + v38];
a2[v9] = byte_11E3FBF[v28 + v39];
a2[v10] = byte_11E3FBF[v30 + v40];
*a2 = byte_11E3FBF[v31 - v40];
a2[a3] = byte_11E3FBF[v29 - v39];
result = (unsigned __int8)byte_11E3FBF[v34 - v38];
a2[v11] = result;
LABEL_24:
if ( ++a2 == v27 )
return result;
}
v43 = 3 * (v31 - v30) + byte_11E46AC[result];
v44 = v31 - byte_11E4230[(v43 + 4) >> 3];
a2[v10] = byte_11E3FBF[v30 + byte_11E4230[(v43 + 3) >> 3]];
++a2;
result = (unsigned __int8)byte_11E3FBF[v44];
*(a2 - 1) = result;
if ( a2 != v27 )
goto LABEL_14;
return result;
}