//
// compareStrings from 0x3ffbac to 0x3ffcfe (338 bytes)
//
// 0 xrefs:
//
// 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 compareStrings(int *a1, unsigned __int8 **a2)
{
int v4; // r9
unsigned __int8 *v5; // r5
unsigned __int8 *v6; // r10
int v7; // r4
unsigned __int8 *v8; // r11
int v9; // r10
int v10; // r0
int v11; // r0
int v12; // r3
int v13; // r11
int v14; // r8
int v15; // r0
int v16; // r5
int v17; // r0
char *v19; // r1
unsigned __int8 *v20; // [sp+0h] [bp-14h]
char v21[4]; // [sp+8h] [bp-Ch] BYREF
v4 = *a1;
v5 = *a2;
v6 = (unsigned __int8 *)*a1;
do
{
v20 = v5;
v7 = (int)&v6[-v4];
v8 = v6;
if ( v6 == (unsigned __int8 *)sub_774090(a1) || v5 == (unsigned __int8 *)sub_774090(a2) )
{
if ( v6 == (unsigned __int8 *)sub_774090(a1) && v5 == (unsigned __int8 *)sub_774090(a2) )
v19 = "The strings are identical.\n";
else
v19 = "The strings have different lengths.\n";
return sub_7599CC((int)&unk_ACCC5C, v19);
}
++v6;
++v5;
}
while ( *v8 == *v20 );
v9 = v7 + 100;
v10 = sub_7599CC((int)&unk_ACCC5C, "Mismatch found at position ");
v11 = sub_759BFC(v10, v7);
sub_7599CC(v11, ":\n");
if ( v7 > 100 )
v4 = v7 - 100;
v12 = *(_DWORD *)(*a1 - 12);
if ( v7 <= 100 )
v4 = 0;
if ( v12 >= v9 )
v12 = v7 + 100;
v13 = v12;
if ( v9 >= *((_DWORD *)*a2 - 3) )
v9 = *((_DWORD *)*a2 - 3);
v14 = sub_7599CC((int)&unk_ACCC5C, "Str1: ");
sub_776158(v21, a1, v4, v13 - v4);
v15 = sub_7581F8(v14, v21);
sub_7599CC(v15, "\n");
sub_774008(v21);
v16 = sub_7599CC((int)&unk_ACCC5C, "Str2: ");
sub_776158(v21, a2, v4, v9 - v4);
v17 = sub_7581F8(v16, v21);
sub_7599CC(v17, "\n");
return sub_774008(v21);
}