//
// sub_D1B110 from 0xd1b110 to 0xd1b1d8 (200 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
//
__int64 __fastcall sub_D1B110(__int64 *a1, unsigned __int64 a2, size_t a3, __int64 *a4, unsigned __int64 a5, size_t a6)
{
__int64 v7; // x0
unsigned __int64 v8; // x19
__int64 v9; // x1
unsigned __int64 v10; // x3
size_t v11; // x19
size_t v12; // x3
const wchar_t *v13; // x0
size_t v14; // x20
const wchar_t *v15; // x1
size_t v16; // x2
__int64 result; // x0
__int64 v18; // x19
v7 = *a1;
v8 = *(_QWORD *)(v7 - 24);
if ( a2 > v8 )
sub_D13C5C("%s: __pos (which is %zu) > this->size() (which is %zu)", "basic_string::compare", a2, v8);
v9 = *a4;
v10 = *(_QWORD *)(*a4 - 24);
if ( a5 > v10 )
sub_D13C5C("%s: __pos (which is %zu) > this->size() (which is %zu)", "basic_string::compare", a5, v10);
v11 = v8 - a2;
v12 = v10 - a5;
v13 = (const wchar_t *)(v7 + 4 * a2);
if ( v11 > a3 )
v11 = a3;
if ( v12 > a6 )
v14 = a6;
else
v14 = v12;
v15 = (const wchar_t *)(v9 + 4 * a5);
if ( v11 > v14 )
v16 = v14;
else
v16 = v11;
result = wmemcmp(v13, v15, v16);
if ( !(_DWORD)result )
{
result = 0x7FFFFFFF;
v18 = v11 - v14;
if ( v18 <= 0x7FFFFFFF )
{
if ( v18 >= (__int64)0xFFFFFFFF80000000LL )
return (unsigned int)v18;
else
return 0x80000000LL;
}
}
return result;
}