//
// sub_E02BDC from 0xe02bdc to 0xe02ca8 (204 bytes)
//
// 2 xrefs:
// > sub_E02CA8 @ 0xe02cf4
// > sub_E02CA8 @ 0xe02cfc
//
// 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
//
bool __fastcall sub_E02BDC(_BYTE *a1, size_t a2, void *a3, size_t a4, __int16 a5)
{
size_t v5; // x5
v5 = a2;
if ( a5 < 0 )
{
if ( a4 >= a2 )
{
if ( a4 != a2 )
return 0;
}
else
{
if ( !*a1 )
goto LABEL_9;
if ( (a5 & 0x10) != 0 )
{
if ( *a1 != 46 )
{
do
{
--v5;
++a1;
}
while ( a4 < v5 && *a1 && *a1 != 46 );
}
LABEL_9:
if ( a4 != v5 )
return 0;
goto LABEL_16;
}
while ( 1 )
{
--v5;
++a1;
if ( a4 >= v5 )
break;
if ( !*a1 )
goto LABEL_9;
}
if ( a4 != v5 )
return 0;
}
LABEL_16:
v5 = a4;
return memcmp(a1, a3, v5) == 0;
}
if ( a4 == a2 )
return memcmp(a1, a3, v5) == 0;
return 0;
}