RtlAreNamesEqual
INT64 __fastcall RtlAreNamesEqual(
const _UNICODE_STRING *ConstantNameA,
const _UNICODE_STRING *ConstantNameB,
INT64 IgnoreCase,
const wchar_t *UpcaseTable){
INT64 result;
char v5;
UNICODE_STRING *p_DestinationString;
unsigned int v7;
int v8;
NTSTATUS v9;
NTSTATUS v10;
bool v11;
struct _UNICODE_STRING UnicodeString;
UNICODE_STRING DestinationString;
result = ConstantNameA->Length;
v5 = 0;
p_DestinationString = (UNICODE_STRING *)ConstantNameB;
UnicodeString = 0i64;
DestinationString = 0i64;
if( (_WORD)result != ConstantNameB->Length )
{
LABEL_8:
LOBYTE(result) = 0;
return result;
}
v7 = (unsigned int)result >> 1;
if( (_BYTE)IgnoreCase )
{
if( UpcaseTable )
{
result = 0i64;
if( !v7 )
{
LABEL_7:
LOBYTE(result) = 1;
return result;
}
while( UpcaseTable[ConstantNameA->Buffer[result]] == UpcaseTable[ConstantNameB->Buffer[result]] )
{
result = (unsigned int)(result + 1);
if( (unsigned int)result >= v7 )
goto LABEL_7;
}
goto LABEL_8;
}
v8 = RtlpUpcaseUnicodeStringPrivate(&UnicodeString, (UNICODE_STRING *)ConstantNameA);
if( v8 < 0 )
RtlRaiseStatus(v8);
v9 = RtlpUpcaseUnicodeStringPrivate(&DestinationString, p_DestinationString);
ConstantNameA = &UnicodeString;
v10 = v9;
if( v9 < 0 )
{
RtlFreeAnsiString(&UnicodeString);
RtlRaiseStatus(v10);
}
LOWORD(result) = UnicodeString.Length;
p_DestinationString = &DestinationString;
v5 = 1;
}
v11 = memcmp(ConstantNameA->Buffer, p_DestinationString->Buffer, (unsigned __int16)result) == 0;
if( v5 )
{
RtlFreeAnsiString(&UnicodeString);
RtlFreeAnsiString(&DestinationString);
}
return v11;
}Referenced by:
No references.