//
// sub_B82E00 from 0xb82e00 to 0xb82f88 (392 bytes)
//
// 2 xrefs:
// > sub_B87DB4 @ 0xb88c80
// > sub_B87DB4 @ 0xb8964c
//
// 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
//
__int64 __fastcall sub_B82E00(const char *a1, char *a2)
{
size_t v4; // x21
char *v5; // x0
size_t v6; // x25
size_t v7; // x19
size_t v8; // x20
size_t v9; // x24
char *v11; // x0
const char *v12; // x19
v4 = strlen(a2);
v5 = strchr(a1, 58);
if ( v5 )
v6 = v5 - a1;
else
v6 = strlen(a1);
v7 = 0;
if ( !v4 )
return 0;
while ( 1 )
{
if ( v4 > v7 )
{
do
{
if ( !strchr(", ", (unsigned __int8)a2[v7]) )
{
if ( v4 == v7 )
return 0;
v8 = v7;
if ( v4 <= v7 )
goto LABEL_26;
do
{
if ( strchr(", ", (unsigned __int8)a2[v8]) )
break;
++v8;
}
while ( v4 > v8 );
if ( a2[v7] == 46 )
goto LABEL_24;
goto LABEL_14;
}
++v7;
}
while ( v4 > v7 );
if ( v4 == v7 )
return 0;
v8 = v7;
v9 = 0;
if ( a2[v7] == 46 )
goto LABEL_24;
}
else
{
if ( v4 == v7 )
return 0;
LABEL_26:
v11 = &a2[v7];
v8 = v7;
if ( a2[v7] != 46 )
{
v9 = 0;
goto LABEL_20;
}
LABEL_24:
++v7;
LABEL_14:
v9 = v8 - v7;
if ( v8 - v7 > v6 )
goto LABEL_15;
}
v11 = &a2[v7];
LABEL_20:
v12 = &a1[v7 + v6 - v8];
if ( (unsigned int)sub_B94674(v11, v12, v9) )
{
if ( v9 == v6 || *(v12 - 1) == 46 )
return 1;
}
LABEL_15:
v7 = v8 + 1;
if ( v4 <= v8 + 1 )
return 0;
}
}