//
// sub_63E870 from 0x63e870 to 0x63e8f8 (136 bytes)
//
// 2 xrefs:
// > sub_62F538 @ 0x62f684
// > sub_62F788 @ 0x62f878
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall sub_63E870(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_62E200(v4, 0);
*a2 = v5;
return 0;
}
v5 = sub_62E11C((int)&loc_63E55C + 1);
if ( !v5 )
return 3;
v6 = *v3;
if ( !*v3 )
goto LABEL_10;
while ( 1 )
{
v8 = off_ABAEB8(v6);
if ( !v8 )
{
sub_62E200(v5, 0);
return 3;
}
if ( !sub_62E140(v5, v5[1], (int)v8) )
break;
v7 = v3[1];
++v3;
v6 = v7;
if ( !v7 )
goto LABEL_10;
}
sub_62E200(v5, 0);
off_ABAEB0(v8);
return 3;
}