PnpGenerateDeviceIdsHash

NTSTATUS __stdcall PnpGenerateDeviceIdsHash(PWCHAR HardwareIds, PWCHAR CompatibleIds, UINT64 *DeviceIdsHash){
  NTSTATUS result; 
  int v4; 
  unsigned int v5; 
  WCHAR **v6; 
  WCHAR *v8; 
  __int64 v9; 
  _QWORD v10[2]; 
  struct _UNICODE_STRING DestinationString; 
  UINT64 HashValue; 
  v10[0] = HardwareIds;
  LODWORD(HashValue) = 0;
  result = 0;
  *(_DWORD *)DeviceIdsHash = 0;
  DestinationString = 0i64;
  v4 = 0;
  v10[1] = CompatibleIds;
  v5 = 0;
  v6 = (WCHAR **)v10;
  do
  {
    v8 = *v6;
    if( *v6 )
    {
      while( *v8 )
      {
        result = RtlInitUnicodeStringEx(&DestinationString, v8);
        if( result < 0 )
          return result;
        result = RtlHashUnicodeString(&DestinationString, 1u, 0i64, &HashValue);
        if( result < 0 )
          return result;
        v4 += HashValue;
        v9 = -1i64;
        do
          ++v9;
        while( v8[v9] );
        v8 += v9 + 1;
        if( !v8 )
          break;
      }
    }
    ++v5;
    ++v6;
  }
  while( v5 < 2 );
  *(_DWORD *)DeviceIdsHash = v4;
  return result;
}

Referenced by:

PiCreateDriverSwDeviceCallback
PiProcessNewDeviceNode
PipProcessStartPhase3