//
// sub_A71328 from 0xa71328 to 0xa71474 (332 bytes)
//
// 5 xrefs:
// > sub_A70FA0 @ 0xa71224
// > sub_A70FA0 @ 0xa712c4
// > sub_A70FA0 @ 0xa7113c
// > sub_A70FA0 @ 0xa71144
// > ??> @ 0xa71310
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:08:42 +0000
//
bool __fastcall sub_A71328(unsigned __int8 *a1, size_t a2, char *a3, int a4)
{
size_t v5; // r5
int v6; // r4
unsigned __int8 *v7; // r6
char *v8; // lr
unsigned __int8 *v9; // r12
unsigned __int8 *v10; // r3
int v11; // r7
size_t v12; // r7
int v13; // r3
unsigned __int8 *v14; // r7
unsigned __int8 *v15; // r6
unsigned int v16; // r8
int v17; // t1
int v18; // t1
if ( a2 != a4 )
return 0;
if ( !a2 )
{
LABEL_10:
v5 = a2;
return memcmp(a1, a3, v5) == 0;
}
v5 = a2 - 1;
v6 = a1[a2 - 1];
v7 = &a1[a2 - 1];
if ( v6 == 64 )
{
LABEL_26:
v12 = a2 - v5;
if ( a2 != v5 )
{
v8 = &a3[v5];
v13 = (unsigned __int8)a3[v5];
v6 = 64;
goto LABEL_15;
}
LABEL_28:
if ( !v5 )
v5 = a2;
return memcmp(a1, a3, v5) == 0;
}
v8 = &a3[v5];
if ( a3[v5] != 64 )
{
v9 = (unsigned __int8 *)&a3[a2 - 2];
v10 = &a1[a2 - 2];
do
{
v8 = (char *)v9;
v7 = v10;
if ( !v5 )
goto LABEL_10;
v6 = *v10;
--v5;
--v10;
if ( v6 == 64 )
goto LABEL_26;
v11 = *v9--;
}
while ( v11 != 64 );
}
v12 = a2 - v5;
if ( a2 == v5 )
goto LABEL_28;
if ( v6 )
{
v13 = 64;
LABEL_15:
v14 = &v7[v12];
v15 = v7 + 1;
do
{
if ( v6 == v13 )
goto LABEL_23;
v16 = v13 - 65;
if ( (unsigned __int8)(v6 - 65) <= 0x19u )
{
v6 = (unsigned __int8)(v6 + 32);
if ( v16 > 0x19 )
goto LABEL_22;
}
else if ( v16 > 0x19 )
{
return 0;
}
v13 = (unsigned __int8)(v13 + 32);
LABEL_22:
if ( v6 != v13 )
return 0;
LABEL_23:
if ( v15 == v14 )
goto LABEL_28;
v17 = *v15++;
v6 = v17;
v18 = (unsigned __int8)*++v8;
v13 = v18;
}
while ( v6 );
}
return v6;
}