//
// sub_EEBFE4 from 0xeebfe4 to 0xeec1d0 (492 bytes)
//
// 1 xrefs:
// > sub_EECF00 @ 0xeecfb8
//
// 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:55 +0000
//
unsigned __int8 *__fastcall sub_EEBFE4(unsigned __int8 *result, int a2, int a3, int a4, int a5)
{
int v5; // w2
int v6; // w11
int v7; // w10
int v8; // w13
int v9; // w7
int v10; // w8
__int64 v11; // x5
int v12; // w18
int v13; // w17
int v14; // w6
int v15; // w12
int v16; // w12
int v17; // w20
int v18; // w19
int v19; // w6
int v20; // w6
int v21; // w8
v5 = 2 * a3 + 1;
v6 = 16;
do
{
while ( 1 )
{
v7 = *(result - 2);
v8 = result[1];
v9 = *(result - 1);
v10 = *result;
v11 = v7 - v8;
v12 = *(result - 3);
v13 = result[2];
if ( v5 < byte_11E4BAF[v11] + 4 * byte_11E4BAF[v9 - v10] )
goto LABEL_12;
if ( a4 < byte_11E4BAF[*(result - 4) - v12] )
goto LABEL_12;
if ( a4 < byte_11E4BAF[v12 - v7] )
goto LABEL_12;
v14 = byte_11E4BAF[v7 - v9];
if ( a4 < v14 )
goto LABEL_12;
if ( a4 < byte_11E4BAF[result[3] - v13] )
goto LABEL_12;
if ( a4 < byte_11E4BAF[v13 - v8] )
goto LABEL_12;
v15 = byte_11E4BAF[v8 - v10];
if ( a4 < v15 )
goto LABEL_12;
if ( a5 < v14 || a5 < v15 )
break;
v16 = byte_11E46AC[3 * (v10 - v9) + byte_11E46AC[v11]];
v17 = (9 * v16 + 63) >> 7;
v18 = (18 * v16 + 63) >> 7;
v19 = (27 * v16 + 63) >> 7;
*(result - 3) = byte_11E3FBF[v12 + v17];
*(result - 2) = byte_11E3FBF[v7 + v18];
*(result - 1) = byte_11E3FBF[v9 + v19];
*result = byte_11E3FBF[v10 - v19];
result[1] = byte_11E3FBF[v8 - v18];
result[2] = byte_11E3FBF[v13 - v17];
LABEL_12:
--v6;
result += a2;
if ( !v6 )
return result;
}
--v6;
v20 = 3 * (v10 - v9) + byte_11E46AC[v11];
v21 = v10 - byte_11E4230[(v20 + 4) >> 3];
*(result - 1) = byte_11E3FBF[v9 + byte_11E4230[(v20 + 3) >> 3]];
*result = byte_11E3FBF[v21];
result += a2;
}
while ( v6 );
return result;
}