//
// sub_623DF4 from 0x623df4 to 0x623eee (250 bytes)
//
// 27 xrefs:
// > sub_60F8C0 @ 0x60f8e4
// > sub_619AF4 @ 0x619bc0
// > sub_619AF4 @ 0x619c48
// > sub_619AF4 @ 0x619c7a
// > sub_619AF4 @ 0x619cb2
// > sub_61CB58 @ 0x61ce18
// > sub_61D55C @ 0x61d5c0
// > sub_61D55C @ 0x61d5d4
// > sub_61D9EC @ 0x61dc2c
// > sub_61D9EC @ 0x61dcbc
// > sub_61D9EC @ 0x61dcea
// > sub_623518 @ 0x623528
// > sub_623EFC @ 0x623f18
// > sub_623F2C @ 0x623f42
// > sub_6338DC @ 0x6339b2
// > sub_6343C0 @ 0x6344a4
// > sub_636E70 @ 0x637042
// > sub_636E70 @ 0x6370ac
// > sub_636E70 @ 0x63725e
// > sub_636E70 @ 0x6373a0
// > sub_636E70 @ 0x637768
// > sub_6386CC @ 0x6386f4
// > sub_6386CC @ 0x63871c
// > sub_6392C8 @ 0x6392ea
// > sub_63966C @ 0x639696
// > sub_63B97C @ 0x63ba4e
// > sub_63ED14 @ 0x63ed4e
//
// 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_623DF4(int a1, char *a2, int a3, _DWORD *a4, _DWORD *a5, char a6)
{
char *v6; // r4
size_t v7; // r5
char *v8; // r10
int result; // r0
unsigned int v10; // r6
char *v11; // r8
int v12; // r7
unsigned int v13; // r3
_BOOL4 v14; // r1
int v15; // r11
unsigned int v16; // r0
int v17; // r2
char v19[4]; // [sp+8h] [bp-Ch] BYREF
char *v20; // [sp+Ch] [bp-8h] BYREF
v6 = a2;
v7 = a3 + 1;
if ( !a3 )
v7 = strlen(a2) + 1;
v8 = (char *)off_ABAEAC(v7);
result = 27;
if ( v8 )
{
v10 = v7 - 1;
if ( v7 != 1 )
{
v11 = v8 - 1;
v12 = 0;
while ( 1 )
{
v13 = (unsigned __int8)*v6;
v14 = v13 == 37;
if ( v10 <= 2 )
v14 = 0;
if ( v14 )
{
LOBYTE(v13) = 37;
if ( (*(_BYTE *)(ctype_ + (unsigned __int8)v6[1] + 1) & 0x44) == 0
|| (v15 = (unsigned __int8)v6[2], v7 -= 3, (*(_BYTE *)(ctype_ + v15 + 1) & 0x44) == 0) )
{
v7 = v10;
goto LABEL_12;
}
v19[0] = v6[1];
v19[2] = 0;
v6 += 2;
v19[1] = v15;
v16 = strtoul(v19, &v20, 16);
v13 = sub_63B7D0(v16);
}
else
{
v7 = v10;
}
if ( v13 <= 0x1F )
v17 = a6 & 1;
else
v17 = 0;
if ( v17 )
{
off_ABAEB0(v8);
return 3;
}
LABEL_12:
v10 = v7 - 1;
++v12;
*++v11 = v13;
++v6;
if ( v7 == 1 )
goto LABEL_13;
}
}
v12 = 0;
LABEL_13:
v8[v12] = 0;
if ( a5 )
*a5 = v12;
result = 0;
*a4 = v8;
}
return result;
}