//
// sub_8E1348 from 0x8e1348 to 0x8e156c (548 bytes)
//
// 3 xrefs:
// > sub_8E6108 @ 0x8e6290
// > sub_8E6108 @ 0x8e6294
// > ??> @ 0x8e6400
//
// 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:04:09 +0000
//
int __fastcall sub_8E1348(
int result,
int *a2,
int a3,
int a4,
int a5,
int a6,
int a7,
int a8,
unsigned __int16 *a9,
unsigned __int16 *a10,
unsigned __int16 *a11,
unsigned __int16 *a12)
{
int v14; // [sp+4h] [bp-38h]
int v20; // [sp+24h] [bp-18h]
int v21; // [sp+28h] [bp-14h]
int v22; // [sp+2Ch] [bp-10h]
int v23; // [sp+30h] [bp-Ch]
int v24; // [sp+34h] [bp-8h]
while ( a6-- != 0 )
{
v14 = a5;
while ( v14-- != 0 )
{
v23 = *(unsigned __int8 *)(*(_DWORD *)(result + 80) + *a12++);
v24 = *(_DWORD *)(result + 76) + (v23 << 8);
v20 = *(unsigned __int8 *)(v24 + *(unsigned __int8 *)(*(_DWORD *)(result + 80) + *a9++));
v21 = *(unsigned __int8 *)(v24 + *(unsigned __int8 *)(*(_DWORD *)(result + 80) + *a10++));
v22 = *(unsigned __int8 *)(v24 + *(unsigned __int8 *)(*(_DWORD *)(result + 80) + *a11++));
*a2++ = (v21 << 8) | v20 | (v22 << 16) | (v23 << 24);
}
a9 += a7;
a10 += a7;
a11 += a7;
a12 += a7;
a2 += a8;
}
return result;
}