RtlCopyUnicodeString

VOID *__stdcall RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PCUNICODE_STRING SourceString){
  size_t Length; 
  size_t MaximumLength; 
  wchar_t *Buffer; 
  wchar_t *v6; 
  unsigned __int64 v7; 
  VOID *result; 

  if( SourceString )
  {
    Length = SourceString->Length;
    MaximumLength = DestinationString->MaximumLength;
    Buffer = SourceString->Buffer;
    if( (unsigned __int16)Length <= (unsigned __int16)MaximumLength )
      MaximumLength = Length;
    v6 = DestinationString->Buffer;
    v7 = MaximumLength;
    DestinationString->Length = MaximumLength;
    memmove(v6, Buffer, MaximumLength);
    result = (VOID *)DestinationString->MaximumLength;
    if( (unsigned __int64)DestinationString->Length + 2 <= (unsigned __int64)result )
    {
      result = 0i64;
      v6[v7 >> 1] = 0;
    }
  }
  else
  {
    result = 0i64;
    DestinationString->Length = 0;
  }
  return result;
}

Referenced by:

AdtpObjsInitialize
AhcCacheQueryHwId
AuthzBasepCopyoutInternalSecurityAttributeValues
AuthzBasepCopyoutInternalSecurityAttributes
AuthzBasepDuplicateSecurityAttributes
CmpGetVirtualizationID
CmpLoadHiveVolatile
EtwpGetLoggerInfoFromContext
ExRaiseHardError
ExtEnvRegisterIommu
FsRtlFindInTunnelCacheEx
HalpInterruptRegisterController
HalpRegisterDmaController
HalpTimerRegister
IoQueryFullDriverPath
IoReportRootDevice
IopBootLog
IopCheckTopDeviceHint
IopFileUtilWalkDirectoryTreeBottomUp
IopFileUtilWalkDirectoryTreeHelper
IopParseDevice
IopQueryRegistryKeySystemPath
IopSafebootDriverLoad
IopSymlinkUpdateECP
MiAllocateSecureImageActivePatch
MiFillActivePatchesQueryBuffer
MiQueryLoadedPatches
ObCreateObjectTypeEx
ObGetSiloRootDirectoryPath
OpenGlobalizationUserSettingsKey_ForSingleUserModel
PiDeferSetInterfaceState
PiUEventHandleVetoEvent
PipProcessDevNodeTree
PipRecordOpenHandleVeto
PipSendTargetDeviceQueryRemoveNotification
PnpConcatenateUnicodeStrings
PnpCopyDeviceInstancePath
PnpFinalizeVetoedRemove
PnpNotifyHwProfileChange
PnpProcessQueryRemoveAndEject
PnpProcessRelation
PnpQueryRemoveLockedDeviceNode
PopFxRegisterComponentPerfStates
PopGenerateDeviceFriendlyName
PopProcessWakeSourceWork
PsRegisterSiloMonitor
PspSiloInitializeSystemRootBuffer
PspSiloInitializeSystemRootSymlink
RtlConvertSidToUnicodeString
RtlPcToFileName
RtlPcToFilePath
SdbMakeIndexKeyFromStringEx
SeOpenObjectAuditAlarmWithTransaction
SeOpenObjectForDeleteAuditAlarmWithTransaction
SepAddTokenOriginClaim
SepAllocateAndInitializeCachedHandleEntry
StartFirstUserProcess
VrpBuildKeyPath