//
// sub_84ED94 from 0x84ed94 to 0x84ee52 (190 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:02:30 +0000
//
int __fastcall sub_84ED94(int *a1)
{
int v2; // r6
void *v3; // r0
int v4; // r5
char *v5; // r1
int v6; // r0
int v7; // r5
int result; // r0
const char *v9; // r0
int v10; // r3
bool v11; // zf
const char *v12; // r0
const char *v13; // r6
char *v14; // r0
_BYTE *v15; // r2
int v16; // r3
int v17; // t1
char *v18; // [sp+Ch] [bp-8h] BYREF
v2 = *a1;
v3 = off_D200BC(1u, 0x14u);
*(_DWORD *)(v2 + 332) = v3;
if ( !v3 )
return 27;
v4 = *a1;
v5 = *(char **)(v4 + 34676);
v6 = v4;
v7 = *(_DWORD *)(v4 + 332);
result = sub_833E74(v6, v5, 0, &v18, nullptr, 1);
if ( !result )
{
v9 = v18;
v10 = (unsigned __int8)*v18;
v11 = v10 == 47;
if ( v10 != 47 )
v11 = v10 == 92;
if ( v11 )
v9 = v18 + 1;
v12 = off_D200B8(v9);
v13 = v12;
*(_DWORD *)(v7 + 4) = v12;
if ( v12 )
{
v14 = strchr(v12, 47);
if ( v14 || (v14 = strchr(v13, 92)) != nullptr )
{
v15 = v14 + 1;
*v14 = 0;
*(_DWORD *)(v7 + 8) = v14 + 1;
v16 = (unsigned __int8)v14[1];
if ( v14[1] )
{
do
{
if ( v16 == 47 )
*v15 = 92;
v17 = (unsigned __int8)*++v15;
v16 = v17;
}
while ( v17 );
}
off_D200B0(v18);
return 0;
}
else
{
off_D200B0(v18);
return 3;
}
}
else
{
off_D200B0(v18);
return 27;
}
}
return result;
}