RtlUnicodeStringCatString
NTSTATUS __stdcall RtlUnicodeStringCatString(_UNICODE_STRING *DestinationString){
_WORD *v1;
unsigned __int64 Length;
wchar_t *Buffer;
unsigned __int64 v5;
unsigned __int64 v6;
NTSTATUS v7;
unsigned __int64 MaximumLength;
__int64 v9;
__int16 v10;
unsigned __int64 v11;
char *v12;
Length = DestinationString->Length;
Buffer = 0i64;
v5 = 0i64;
v6 = 0i64;
v7 = 0;
if( (Length & 1) != 0 )
return -1073741811;
MaximumLength = DestinationString->MaximumLength;
if( (MaximumLength & 1) != 0
|| (unsigned __int16)Length > (unsigned __int16)MaximumLength
|| (_WORD)MaximumLength == 0xFFFF )
{
return -1073741811;
}
if( !DestinationString->Buffer && ((_WORD)Length || (_WORD)MaximumLength) )
{
v7 = -1073741811;
}
else
{
v5 = MaximumLength >> 1;
Buffer = DestinationString->Buffer;
v6 = Length >> 1;
}
if( v7 >= 0 )
{
v9 = 0x7FFFi64;
v7 = 0;
v10 = 0;
v11 = v5 - v6;
if( !v11 )
goto LABEL_26;
v12 = (char *)Buffer + 2 * v6 - (_QWORD)v1;
do
{
if( !v9 )
break;
if( !*v1 )
break;
*(_WORD *)((char *)v1 + (_QWORD)v12) = *v1;
--v9;
++v1;
++v10;
--v11;
}
while( v11 );
if( !v11 && v9 )
{
LABEL_26:
if( *v1 )
v7 = -2147483643;
}
DestinationString->Length = 2 * (v10 + v6);
}
return v7;
}Referenced by:
AslpPathWildcardAllocMatchNode
CmpLogTransactionAbortedWithChildName
PopGenerateDeviceFriendlyName
SshpGenerateDeviceFriendlyName