//
// sub_942EB8 from 0x942eb8 to 0x942f1c (100 bytes)
//
// 3 xrefs:
// > sub_90B718 @ 0x90b8e8
// > sub_90B718 @ 0x90bb0e
// > sub_90B718 @ 0x90bb24
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:05:08 +0000
//
_DWORD *__fastcall sub_942EB8(_DWORD *result, unsigned int *a2, unsigned int a3)
{
unsigned int *v3; // r4
unsigned int *v4; // r2
unsigned int v5; // t1
int v6; // r3
result[2] = -8;
result[1] = 254;
v3 = (unsigned int *)((char *)a2 + a3);
result[3] = a2;
result[4] = (char *)a2 + a3;
*result = 0;
result[6] = 0;
if ( a3 <= 3 )
{
result[5] = a2;
}
else
{
v4 = (unsigned int *)((char *)a2 + a3 - 3);
result[5] = v4;
if ( a2 < v4 )
{
v5 = *a2;
result[2] = 16;
result[3] = (char *)a2 + 3;
*result = bswap32(v5) >> 8;
return result;
}
}
if ( a2 >= v3 )
{
v6 = 1;
}
else
{
v6 = (int)a2 + 1;
result[2] = 0;
result[3] = (char *)a2 + 1;
}
if ( a2 >= v3 )
{
result[2] = 0;
result[6] = v6;
}
else
{
v6 = *(unsigned __int8 *)a2;
}
if ( a2 < v3 )
*result = v6;
return result;
}