//
// sub_61E138 from 0x61e138 to 0x61e22a (242 bytes)
//
// 2 xrefs:
// > sub_62160C @ 0x621cb2
// > sub_62160C @ 0x6223f4
//
// 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_61E138(const char *a1, char *a2)
{
size_t v4; // r6
char *v5; // r0
size_t v6; // r10
size_t v7; // r4
char *v8; // r5
int v9; // t1
char *v10; // r11
size_t v11; // r5
int v12; // t1
size_t v13; // r11
char *v15; // r0
const char *v16; // r4
v4 = strlen(a2);
v5 = strchr(a1, 58);
if ( v5 )
v6 = v5 - a1;
else
v6 = strlen(a1);
if ( !v4 )
return 0;
v7 = 0;
while ( v4 > v7 )
{
v8 = &a2[v7];
while ( 1 )
{
v9 = (unsigned __int8)*v8++;
if ( !strchr(", ", v9) )
break;
if ( v4 <= ++v7 )
{
if ( v4 == v7 )
return 0;
v11 = v7;
if ( a2[v7] != 46 )
{
v13 = 0;
goto LABEL_22;
}
goto LABEL_30;
}
}
if ( v4 == v7 )
return 0;
if ( v4 <= v7 )
goto LABEL_28;
v10 = &a2[v7];
v11 = v7;
do
{
v12 = (unsigned __int8)*v10++;
if ( strchr(", ", v12) )
break;
++v11;
}
while ( v4 > v11 );
if ( a2[v7] == 46 )
goto LABEL_30;
LABEL_15:
v13 = v11 - v7;
if ( v11 - v7 <= v6 )
{
LABEL_22:
v15 = &a2[v7];
goto LABEL_23;
}
LABEL_16:
v7 = v11 + 1;
if ( v4 <= v11 + 1 )
return 0;
}
if ( v4 == v7 )
return 0;
LABEL_28:
v15 = &a2[v7];
v11 = v7;
if ( a2[v7] == 46 )
{
LABEL_30:
++v7;
goto LABEL_15;
}
v13 = 0;
LABEL_23:
v16 = &a1[v7 + v6 - v11];
if ( !sub_62AB64(v15, v16, v13) || v13 != v6 && *(v16 - 1) != 46 )
goto LABEL_16;
return 1;
}