SleepstudyHelperSetBlockerFriendlyName
INT64 __fastcall SleepstudyHelperSetBlockerFriendlyName(UNICODE_STRING *a1, const UNICODE_STRING *a2){
SIZE_T Length;
NTSTATUS v5;
wchar_t *Buffer;
struct _UNICODE_STRING DestinationString;
DestinationString = 0i64;
if( a1 && a2 && (Length = a2->Length, (_WORD)Length) )
{
DestinationString.Buffer = (wchar_t *)SSHSupportAllocatePaged(Length, *(_DWORD *)(*(_QWORD *)&a1->Length + 24i64));
if( !DestinationString.Buffer )
return(unsigned int)-1073741670;
DestinationString.MaximumLength = a2->Length;
DestinationString.Length = 0;
v5 = RtlUnicodeStringCopy(&DestinationString, (UNICODE_STRING *)a2);
if( v5 >= 0 )
{
Buffer = a1[3].Buffer;
if( Buffer )
ExFreePoolWithTag(Buffer, *(_DWORD *)(*(_QWORD *)&a1->Length + 24i64));
v5 = 0;
a1[3] = DestinationString;
DestinationString = 0i64;
}
}
else
{
v5 = -1073741811;
}
if( DestinationString.Buffer )
ExFreePoolWithTag(DestinationString.Buffer, *(_DWORD *)(*(_QWORD *)&a1->Length + 24i64));
return(unsigned int)v5;
}Referenced by:
SleepstudyHelperCreateBlockerFromGuid