//
// sub_82E2B4 from 0x82e2b4 to 0x82e4ba (518 bytes)
//
// 1 xrefs:
// > sub_82EB00 @ 0x830b8a
//
// 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:02 +0000
//
int __fastcall sub_82E2B4(const char *a1, void **a2, void **a3)
{
size_t v6; // r10
void *v7; // r4
char *v8; // r0
char *v9; // r12
size_t v10; // r5
void **v11; // r0
void **v12; // r11
char *v13; // r5
int v14; // r4
void *v16; // r0
void **v17; // [sp+4h] [bp-18h]
void **v18; // [sp+8h] [bp-14h]
char *v19; // [sp+Ch] [bp-10h]
char *v20; // [sp+Ch] [bp-10h]
char *v21; // [sp+Ch] [bp-10h]
char *v22; // [sp+10h] [bp-Ch] BYREF
_DWORD v23[2]; // [sp+14h] [bp-8h] BYREF
v22 = nullptr;
v23[0] = 0;
if ( !a1 )
{
v13 = nullptr;
if ( a2 )
goto LABEL_17;
goto LABEL_36;
}
v6 = strlen(a1);
if ( !a2 )
{
v7 = nullptr;
v17 = nullptr;
if ( a3 )
goto LABEL_4;
LABEL_38:
v18 = a3;
goto LABEL_22;
}
v7 = &dword_0 + 1;
v17 = (void **)&v22;
if ( !a3 )
goto LABEL_38;
LABEL_4:
v8 = strchr(a1, 58);
v9 = v8;
if ( v8 < &a1[v6] )
{
if ( v8 )
{
if ( v8 == a1 )
v7 = nullptr;
v10 = &a1[v6] - v8 - 1;
v6 = v8 - a1;
if ( !v7 )
{
v18 = (void **)v23;
if ( !v10 )
goto LABEL_14;
LABEL_10:
v19 = v9;
v11 = (void **)off_D200AC(v10 + 1);
v9 = v19;
v12 = v11;
if ( v11 )
{
if ( !v7 )
{
LABEL_13:
memcpy(v12, v9 + 1, v10);
*((_BYTE *)v12 + v10) = 0;
off_D200B0(*v18);
*v18 = v12;
goto LABEL_14;
}
LABEL_12:
v20 = v9;
memcpy(v7, a1, v6);
*((_BYTE *)v7 + v6) = 0;
off_D200B0(*v17);
v9 = v20;
*v17 = v7;
if ( !v12 )
goto LABEL_14;
goto LABEL_13;
}
off_D200B0(v7);
return 27;
}
v21 = v8;
v18 = (void **)v23;
v7 = off_D200AC(v6 + 1);
if ( !v7 )
return 27;
v9 = v21;
if ( v10 )
goto LABEL_10;
LABEL_28:
v12 = nullptr;
goto LABEL_12;
}
v18 = (void **)v23;
if ( v6 && v7 )
{
v10 = 0;
goto LABEL_26;
}
goto LABEL_14;
}
v18 = (void **)v23;
LABEL_22:
if ( !v6 )
v7 = nullptr;
if ( v7 )
{
v10 = 0;
LABEL_26:
v16 = off_D200AC(v6 + 1);
v9 = nullptr;
v7 = v16;
if ( !v16 )
return 27;
v12 = v18;
if ( !v18 )
goto LABEL_12;
goto LABEL_28;
}
LABEL_14:
if ( a2 )
{
v13 = v22;
if ( v22 )
{
v14 = 0;
goto LABEL_18;
}
if ( *a1 == 58 )
{
v13 = off_D200B8(&byte_BF4ECA);
v22 = v13;
if ( v13 )
v14 = 0;
else
v14 = 27;
goto LABEL_18;
}
LABEL_17:
v14 = 0;
LABEL_18:
off_D200B0(*a2);
*a2 = v13;
goto LABEL_19;
}
LABEL_36:
v14 = 0;
LABEL_19:
if ( a3 )
{
off_D200B0(*a3);
*a3 = (void *)v23[0];
return v14;
}
return v14;
}