RtlEqualUnicodeString

BOOL *__stdcall RtlEqualUnicodeString(PCUNICODE_STRING String1, PCUNICODE_STRING String2, BOOL CaseInSensitive){
  __int64 Length; 
  BOOL *result; 
  wchar_t *Buffer; 
  BOOL *i; 
  signed __int64 v7; 
  unsigned __int64 v8; 
  unsigned __int64 v9; 

  Length = String1->Length;
  result = (BOOL *)String2->Length;
  if( (_DWORD)Length != (_DWORD)result )
  {
LABEL_2:
    LOBYTE(result) = 0;
    return result;
  }
  result = (BOOL *)String1->Buffer;
  Buffer = String2->Buffer;
  for( i = &result[Length]; (unsigned int)Length >= 8; Buffer += 4 )
  {
    if( *(_QWORD *)result != *(_QWORD *)Buffer )
      break;
    LODWORD(Length) = Length - 8;
    if( !(_DWORD)Length )
      goto LABEL_17;
    result += 8;
  }
  if( result < i )
  {
    if( CaseInSensitive )
    {
      v7 = (char *)Buffer - (char *)result;
      while( 1 )
      {
        v8 = *(unsigned __int16 *)result;
        v9 = *(unsigned __int16 *)&result[v7];
        if( (_WORD)v8 != (_WORD)v9 )
        {
          if( (unsigned int)v8 >= 0x61 )
          {
            if( (unsigned int)v8 > 0x7A )
            {
              if( Nls844UnicodeUpcaseTable && (unsigned __int16)v8 >= 0xC0u )
                LOWORD(v8) = *(_WORD *)(Nls844UnicodeUpcaseTable
                                      + 2
                                      * ((v8 & 0xF)
                                       + *(unsigned __int16 *)(Nls844UnicodeUpcaseTable
                                                             + 2i64
                                                             * (((unsigned __int8)v8 >> 4)
                                                              + (unsigned int)*(unsigned __int16 *)(Nls844UnicodeUpcaseTable
                                                                                                  + 2 * (v8 >> 8))))))
                           + v8;
            }
            else
            {
              LOWORD(v8) = v8 - 32;
            }
          }
          if( (unsigned int)v9 >= 0x61 )
          {
            if( (unsigned int)v9 > 0x7A )
            {
              if( Nls844UnicodeUpcaseTable )
              {
                if( (unsigned __int16)v9 >= 0xC0u )
                  LOWORD(v9) = *(_WORD *)(Nls844UnicodeUpcaseTable
                                        + 2
                                        * ((v9 & 0xF)
                                         + *(unsigned __int16 *)(Nls844UnicodeUpcaseTable
                                                               + 2i64
                                                               * (((unsigned __int8)v9 >> 4)
                                                                + (unsigned int)*(unsigned __int16 *)(Nls844UnicodeUpcaseTable + 2 * (v9 >> 8))))))
                             + v9;
              }
            }
            else
            {
              LOWORD(v9) = v9 - 32;
            }
          }
          if( (_WORD)v8 != (_WORD)v9 )
            break;
        }
        result += 2;
        if( result >= i )
          goto LABEL_17;
      }
    }
    else
    {
      while( *(_WORD *)result == *Buffer )
      {
        result += 2;
        ++Buffer;
        if( result >= i )
          goto LABEL_17;
      }
    }
    goto LABEL_2;
  }
LABEL_17:
  LOBYTE(result) = 1;
  return result;
}

Referenced by:

AdtpBuildAccessesString
AdtpLookupDriveLetter
AuthzBasepCompareUnicodeStringOperands
AuthzBasepEqualUnicodeString
AuthzBasepFindSecurityAttribute
CmClassFilterCallback
CmDeviceClassesSubkeyCallback
CmGetSystemDriverList
CmIsRootDevice
CmLoadAppKey
CmServiceFilterCallback
CmSetValueKey
CmpCreateHardwareProfiles
CmpDoSort
CmpFindHiveSubKey
CmpFindMachineHiveByMountPoint
CmpGetKnownHivePathNode
DrvDbFindDatabaseNode
EtwpAcquireLoggerContextByLoggerName
EtwpGetLoggerInfoFromContext
EtwpLookupLoggerIdByName
ExpFindArcName
IopCreateSecureDeviceClassSettings
IopDeviceInterfaceFilterCallback
IopGetDeviceInterfaces
IopIsReportedAlready
IopParseDevice
IopQueryRegistryKeySystemPath
KseHookQueryValueKey
KsepCacheDeviceQueryData
MiObtainSectionForDriver
MiResolveImageReferences
MiUseLargeDriverPage
ObpLookupDirectoryUsingHash
PiDevCfgCheckDeviceNeedsUpdate
PiDevCfgConfigureDevice
PiDevCfgFindDeviceDriver
PiDevCfgLogDeviceConfigured
PiDevCfgQueryIncludedDriverConfigurations
PiDevCfgResolveMultiSzValue
PiDevCfgResolveVariable
PiDrvDbFindNode
PiDrvDbResolveFilePathKeyValues
PiDrvDbResolveSystemFilePath
PiFindDevInstMatch
PiPnpRtlServiceFilterCallback
PiRemoveDeferredSetInterfaceState
PiUEventQueueBroadcastEventEntry
PipAddRequestToEdge
PipDeleteBindingId
PipFindDeviceOverrideEntry
PipLookupGroupName
PipQueryBindingResolution
PnpCtxFindNode
PnpLoadBootFilterDriver
PnpMultiSzContainsString
PopBatteryDeviceState
PopEmModuleAddressMatchCallback
PopEmUpdateDeviceConstraintCallback
PopPlLookupDevicePowerProfile
PpInitGetGroupOrderIndex
RtlDeriveCapabilitySidsFromName
RtlpGetNtProductTypeFromRegistry
SLQueryLicenseValueInternal
SepFindMatchingCachedHandlesEntry
SepIsImageInMinTcbList
SepIsNgenImage
SepValidateReferencedCachedHandles
VfAddVerifierEntry
VfCheckUserHandle
VfDriverEnableVerifier
VfFilterAttach
VfSuspectDriversLoadCallback
VfSuspectDriversUnloadCallback
VfUtilIsProtectedDriver
ViDriverReApplyVerifierForAll
ViInitSystemPhase0
ViIsDriverSuspectForVerifier
ViLogAndLoadXdv
ViSuspectDriversLookupEntry
VrpCreateNamespaceNode
VrpFindDiffHiveEntryForMountPointWithLock
VrpHandleIoctlUnloadDifferencingHiveForHost
VrpPreLoadKey