//
// sub_84E8F0 from 0x84e8f0 to 0x84e978 (136 bytes)
//
// 2 xrefs:
// > sub_83F5B8 @ 0x83f704
// > sub_83F808 @ 0x83f8f8
//
// 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:02:29 +0000
//
int __fastcall sub_84E8F0(const char **a1, _DWORD **a2)
{
const char **v3; // r6
_DWORD *v4; // r9
_DWORD *v5; // r5
const char *v6; // r0
const char *v7; // t1
char *v8; // r4
v3 = a1;
v4 = *a2;
if ( !a1 )
{
v5 = nullptr;
LABEL_10:
if ( v4 )
sub_83E280(v4, 0);
*a2 = v5;
return 0;
}
v5 = sub_83E19C((int)&loc_84E5DC + 1);
if ( !v5 )
return 3;
v6 = *v3;
if ( !*v3 )
goto LABEL_10;
while ( 1 )
{
v8 = off_D200B8(v6);
if ( !v8 )
{
sub_83E280(v5, 0);
return 3;
}
if ( !sub_83E1C0(v5, v5[1], (int)v8) )
break;
v7 = v3[1];
++v3;
v6 = v7;
if ( !v7 )
goto LABEL_10;
}
sub_83E280(v5, 0);
off_D200B0(v8);
return 3;
}