PnpValidateMultiSz

NTSTATUS __stdcall PnpValidateMultiSz(PWCHAR InString, UINT64 MaxLength){
  unsigned __int64 v2; 
  PWCHAR v4; 
  NTSTATUS result; 
  size_t v6; 
  unsigned __int64 v7; 
  size_t pcchLength; 
  v2 = 0i64;
  pcchLength = 0i64;
  v4 = InString;
  for( result = -1073741811; InString; result = 0 )
  {
    result = RtlStringCchLengthW(&v4[v2], MaxLength - v2, &pcchLength);
    if( result < 0 )
      break;
    InString = (PWCHAR)pcchLength;
    v7 = pcchLength + v6;
    if( pcchLength + v6 >= v6 )
    {
      v2 = v7 + 1;
      if( v7 + 1 >= v7 )
        continue;
    }
    return -1073741675;
  }
  return result;
}

Referenced by:

PiDqQueryValidateQueryData
PiSwValidateCreateData