//
// sub_1080BF0 from 0x1080bf0 to 0x1080d18 (296 bytes)
//
// 2 xrefs:
// > sub_1080FE8 @ 0x10811c0
// > sub_1080FE8 @ 0x10811c4
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:17:10 +0000
//
__int64 __fastcall sub_1080BF0(
unsigned __int8 *a1,
unsigned __int64 a2,
unsigned __int8 *a3,
unsigned __int64 a4,
__int16 a5)
{
_BYTE *v5; // x6
int v6; // w0
__int64 result; // x0
int v8; // w3
int v9; // w4
unsigned __int8 *v10; // x7
unsigned __int8 *v11; // x1
int v12; // t1
v5 = a1;
if ( (a5 & 0x8000) == 0 )
{
result = 0;
if ( a4 != a2 )
return result;
goto LABEL_17;
}
if ( a4 >= a2 )
{
result = 0;
if ( a4 != a2 )
return result;
}
else
{
v6 = *a1;
if ( *v5 )
{
if ( (a5 & 0x10) == 0 )
{
while ( 1 )
{
--a2;
++v5;
if ( a4 >= a2 )
break;
if ( !*v5 )
goto LABEL_9;
}
if ( a4 != a2 )
return 0;
goto LABEL_16;
}
if ( v6 != 46 )
{
do
{
--a2;
++v5;
}
while ( a4 < a2 && *v5 && *v5 != 46 );
}
}
LABEL_9:
if ( a4 != a2 )
return 0;
}
LABEL_16:
a2 = a4;
LABEL_17:
if ( a2 )
{
v8 = (unsigned __int8)*v5;
v9 = *a3;
if ( !*v5 )
return 0;
v10 = v5 + 1;
v11 = &v5[a2];
while ( 1 )
{
++a3;
if ( v8 != v9 )
break;
LABEL_25:
if ( v10 == v11 )
return 1;
v12 = *v10++;
v8 = v12;
v9 = *a3;
if ( !v12 )
return 0;
}
if ( (unsigned __int8)(v8 - 65) <= 0x19u )
{
v8 = (unsigned __int8)(v8 + 32);
if ( (unsigned __int8)(v9 - 65) > 0x19u )
{
LABEL_24:
if ( v8 != v9 )
return 0;
goto LABEL_25;
}
}
else if ( (unsigned __int8)(v9 - 65) > 0x19u )
{
return 0;
}
v9 = (unsigned __int8)(v9 + 32);
goto LABEL_24;
}
return 1;
}