//
// sub_879980 from 0x879980 to 0x8799f6 (118 bytes)
//
// 0 xrefs:
//
// 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:03:05 +0000
//
int __fastcall sub_879980(int result, int *a2, int *a3, int a4, int a5)
{
int v5; // r12
int v6; // r10
int v8; // r6
int v9; // r4
int v10; // t1
_BYTE *v11; // r5
int v12; // r4
_BYTE *v13; // r7
int v14; // r3
v5 = 4 * a4 - (_DWORD)a2 - 4;
v6 = *(_DWORD *)(result + 28);
v8 = *(_DWORD *)(*(_DWORD *)(result + 412) + 8);
while ( --a5 >= 0 )
{
while ( 1 )
{
v10 = *a2++;
v9 = v10;
result = *a3;
v11 = *(_BYTE **)((char *)a2 + v5 + *a3);
if ( !v6 )
break;
v12 = v9 + 3;
v13 = &v11[v6];
do
{
v14 = *(unsigned __int8 *)(v12 - 2);
v12 += 3;
result = *(_DWORD *)(v8 + 4 * (*(unsigned __int8 *)(v12 - 4) + 512));
*v11++ = (unsigned int)(*(_DWORD *)(v8 + 4 * (v14 + 256))
+ *(_DWORD *)(v8 + 4 * *(unsigned __int8 *)(v12 - 6))
+ result) >> 16;
}
while ( v11 != v13 );
if ( --a5 < 0 )
return result;
}
}
return result;
}