//
// sub_8109E4 from 0x8109e4 to 0x810a0a (38 bytes)
//
// 3 xrefs:
// > sub_811818 @ 0x81185e
// > sub_81406C @ 0x8142bc
// > sub_81AD98 @ 0x81ae38
//
// 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:01:37 +0000
//
_BYTE *__fastcall sub_8109E4(unsigned int *a1, int a2, _BYTE *a3)
{
unsigned int *v3; // r4
unsigned int v4; // r5
_BYTE *result; // r0
unsigned int v6; // r1
unsigned int v7; // t1
v3 = a1;
v4 = (unsigned int)&a1[a2];
result = a3;
while ( (unsigned int)v3 < v4 )
{
v7 = *v3++;
v6 = v7;
if ( v7 >= 0x10000 )
result = (_BYTE *)sub_80F59C((int)result, v6);
else
result = sub_8102FC(result, v6);
}
return result;
}