//
// sub_10027EB20 from 0x10027eb20 to 0x10027ef02 (994 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: pc, 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 12:27:42 +0000
//
void __fastcall sub_10027EB20(unsigned __int8 *a1, unsigned __int8 *a2)
{
unsigned int v4; // esi
unsigned __int8 *v5; // r15
unsigned int v6; // ecx
unsigned __int8 *v7; // rax
__int64 v8; // rdx
unsigned __int8 *v9; // rdi
unsigned __int8 *v10; // rsi
unsigned __int8 *v11; // r13
__int64 v12; // r8
__int64 v13; // r13
_QWORD *v14; // rax
_QWORD *v15; // rax
int v16; // eax
unsigned int v17; // ebx
unsigned int v18; // r13d
unsigned int v19; // ebx
unsigned int v20; // eax
unsigned int v21; // eax
_QWORD *v22; // rax
unsigned int v23; // r13d
unsigned __int64 v24; // r13
unsigned int v25; // ebx
size_t v26; // r13
char *v27; // r12
unsigned int v28; // edx
char *v29; // rsi
__int64 v30; // rdx
size_t v31; // rbx
_QWORD *v32; // rax
_QWORD *v33; // r15
unsigned int v34; // r12d
unsigned __int64 v35; // r12
__int64 v36; // rcx
unsigned __int8 *v37; // rsi
size_t v38; // r12
char *v39; // r14
unsigned int v40; // edx
char *v41; // rsi
__int64 v42; // rdx
__int64 v43; // r13
size_t v44; // rbx
char *v45; // rax
_QWORD *v46; // rax
_QWORD *v47; // [rsp+10h] [rbp-60h]
unsigned int v48; // [rsp+1Ch] [rbp-54h]
unsigned int v49; // [rsp+2Ch] [rbp-44h]
size_t __dst; // [rsp+30h] [rbp-40h] BYREF
size_t v51; // [rsp+38h] [rbp-38h]
void *__p; // [rsp+40h] [rbp-30h]
v4 = *a1;
v5 = a1 + 1;
v6 = *a2;
v7 = a2 + 1;
if ( (v6 & 1) != 0 )
v7 = *((unsigned __int8 **)a2 + 2);
v8 = v4 >> 1;
v9 = *((unsigned __int8 **)a1 + 2);
if ( (v4 & 1) != 0 )
v8 = *((_QWORD *)a1 + 1);
else
v9 = v5;
v10 = v7;
v11 = v9;
if ( !v8 )
{
LABEL_16:
if ( v11 == &v9[v8] )
{
LABEL_17:
if ( (v6 & 1) != 0 )
{
if ( v10 != &v7[*((_QWORD *)a2 + 1)] )
goto LABEL_19;
}
else if ( v10 != &v7[(unsigned __int8)v6 >> 1] )
{
goto LABEL_19;
}
sub_1001630E0(&std::cout, (__int64)"The strings are identical.\n", 27);
return;
}
LABEL_19:
sub_1001630E0(&std::cout, (__int64)"The strings have different lengths.\n", 36);
return;
}
if ( (v6 & 1) != 0 )
v12 = *((_QWORD *)a2 + 1);
else
v12 = v6 >> 1;
v10 = &v7[v12];
v13 = 0;
while ( 1 )
{
if ( v12 == v13 )
{
v11 = &v9[v13];
goto LABEL_16;
}
if ( v9[v13] != v7[v13] )
break;
if ( v8 == ++v13 )
{
v10 = &v7[v13];
goto LABEL_17;
}
}
v14 = sub_1001630E0(&std::cout, (__int64)"Mismatch found at position ", 27);
v15 = (_QWORD *)std::ostream::operator<<(v14, (unsigned int)v13);
sub_1001630E0(v15, (__int64)":\n", 2);
v16 = 100;
if ( (int)v13 >= 101 )
v16 = v13;
v17 = *a1;
v18 = v13 + 100;
if ( (v17 & 1) != 0 )
{
v19 = *((_DWORD *)a1 + 2);
if ( (int)v18 < (int)v19 )
LABEL_27:
v19 = v18;
}
else
{
v19 = v17 >> 1;
if ( v18 < v19 )
goto LABEL_27;
}
v49 = v16 - 100;
v20 = *a2;
if ( (v20 & 1) != 0 )
{
v21 = *((_DWORD *)a2 + 2);
if ( (int)v18 < (int)v21 )
LABEL_30:
v21 = v18;
}
else
{
v21 = v20 >> 1;
if ( v18 < v21 )
goto LABEL_30;
}
v48 = v21;
v22 = sub_1001630E0(&std::cout, (__int64)"Str1: ", 6);
v23 = *a1;
if ( (v23 & 1) != 0 )
{
v24 = *((_QWORD *)a1 + 1);
if ( v24 < v49 )
goto LABEL_74;
v5 = *((unsigned __int8 **)a1 + 2);
}
else
{
v24 = v23 >> 1;
if ( v24 < v49 )
goto LABEL_74;
}
v25 = v19 - v49;
v26 = v24 - v49;
if ( v26 >= (int)v25 )
v26 = (int)v25;
if ( v26 >= 0xFFFFFFFFFFFFFFF8LL )
goto LABEL_75;
v47 = v22;
if ( v26 >= 0x17 )
{
v31 = 26;
if ( (v26 | 7) != 0x17 )
v31 = (v26 | 7) + 1;
v27 = (char *)operator new(v31);
__p = v27;
__dst = v31 + 1;
v51 = v26;
}
else
{
LOBYTE(__dst) = 2 * v26;
v27 = (char *)&__dst + 1;
if ( !v26 )
{
BYTE1(__dst) = 0;
v28 = (unsigned __int8)__dst;
if ( (__dst & 1) != 0 )
goto LABEL_46;
LABEL_51:
v29 = (char *)&__dst + 1;
v30 = v28 >> 1;
goto LABEL_52;
}
}
memmove(v27, &v5[v49], v26);
v27[v26] = 0;
v28 = (unsigned __int8)__dst;
if ( (__dst & 1) == 0 )
goto LABEL_51;
LABEL_46:
v29 = (char *)__p;
v30 = v51;
LABEL_52:
v32 = sub_1001630E0(v47, (__int64)v29, v30);
sub_1001630E0(v32, (__int64)"\n", 1);
if ( (__dst & 1) != 0 )
operator delete(__p);
v33 = sub_1001630E0(&std::cout, (__int64)"Str2: ", 6);
v34 = *a2;
if ( (v34 & 1) != 0 )
{
v35 = *((_QWORD *)a2 + 1);
v36 = v49;
if ( v35 < v49 )
goto LABEL_74;
v37 = *((unsigned __int8 **)a2 + 2);
}
else
{
v35 = v34 >> 1;
v36 = v49;
v37 = a2 + 1;
if ( v35 < v49 )
LABEL_74:
sub_100056810();
}
v38 = v35 - v36;
if ( v38 >= (int)(v48 - v49) )
v38 = (int)(v48 - v49);
if ( v38 >= 0xFFFFFFFFFFFFFFF8LL )
LABEL_75:
sub_100003630();
if ( v38 >= 0x17 )
{
v43 = v36;
v44 = 26;
if ( (v38 | 7) != 0x17 )
v44 = (v38 | 7) + 1;
v45 = (char *)operator new(v44);
v36 = v43;
v39 = v45;
__p = v45;
__dst = v44 + 1;
v51 = v38;
LABEL_69:
memmove(v39, &v37[v36], v38);
v39[v38] = 0;
v40 = (unsigned __int8)__dst;
if ( (__dst & 1) != 0 )
goto LABEL_65;
goto LABEL_70;
}
LOBYTE(__dst) = 2 * v38;
v39 = (char *)&__dst + 1;
if ( v38 )
goto LABEL_69;
BYTE1(__dst) = 0;
v40 = (unsigned __int8)__dst;
if ( (__dst & 1) != 0 )
{
LABEL_65:
v41 = (char *)__p;
v42 = v51;
goto LABEL_71;
}
LABEL_70:
v42 = v40 >> 1;
v41 = (char *)&__dst + 1;
LABEL_71:
v46 = sub_1001630E0(v33, (__int64)v41, v42);
sub_1001630E0(v46, (__int64)"\n", 1);
if ( (__dst & 1) != 0 )
operator delete(__p);
}