//
// sub_78D94 from 0x78d94 to 0x78dd8 (68 bytes)
//
// 4 xrefs:
// > sub_78EB8 @ 0x78f0e
// > sub_78EB8 @ 0x78f74
// > sub_78EB8 @ 0x78fca
// > sub_78EB8 @ 0x78ffa
//
// 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 11:41:12 +0000
//
int __fastcall sub_78D94(int a1, int *a2)
{
unsigned int v2; // r5
unsigned int v3; // r12
int v4; // r2
char v5; // r4
char v6; // r3
v3 = *(_DWORD *)(a1 + 12);
v2 = *(_DWORD *)(a1 + 8);
v4 = 0;
v5 = 0;
while ( v5 != 4 && v2 < v3 )
{
*(_DWORD *)(a1 + 8) = v2 + 1;
++v5;
v6 = *(_BYTE *)(*(_DWORD *)(a1 + 4) + v2);
v4 = v6 & 0x7F | (v4 << 7);
++v2;
if ( (v6 & 0x80) == 0 )
{
*a2 = v4;
return 0;
}
}
*(_BYTE *)(a1 + 28) = 1;
return 16;
}