PspJobIoRateVolumeEntryInsert

VOID __stdcall PspJobIoRateVolumeEntryInsert(_EJOB *Job, _PS_IO_CONTROL_ENTRY *IoControlEntry){
  INT64 *v2; 
  UINT64 *v4; 
  unsigned __int8 v5; 
  unsigned __int64 VolumeKey; 
  UINT64 v7; 
  unsigned __int64 v8; 
  BOOL v9; 
  int v10; 
  UINT64 v11; 

  v2 = (INT64 *)((char *)Job + 1456);
  v4 = (UINT64 *)((char *)Job + 1464);
  v5 = ExAcquireSpinLockExclusive((INT64 *)Job + 182);
  VolumeKey = IoControlEntry->VolumeKey;
  v7 = *v4;
  v8 = v5;
  if( (v4[1] & 1) != 0 && v7 )
    v7 ^= (unsigned __int64)v4;
  v9 = 0;
  v10 = v4[1] & 1;
  if( v7 )
  {
    while( 1 )
    {
      if( MiLockTrackerCompare(VolumeKey, v7) < 0 )
      {
        v11 = *(_QWORD *)v7;
        if( v10 )
        {
          if( !v11 )
            goto LABEL_16;
          v11 ^= v7;
        }
        if( !v11 )
        {
LABEL_16:
          v9 = 0;
          break;
        }
      }
      else
      {
        v11 = *(_QWORD *)(v7 + 8);
        if( v10 )
        {
          if( !v11 )
            goto LABEL_10;
          v11 ^= v7;
        }
        if( !v11 )
        {
LABEL_10:
          v9 = 1;
          break;
        }
      }
      v7 = v11;
    }
  }
  RtlRbInsertNodeEx(v4, v7, v9, (UINT64)IoControlEntry);
  ExReleaseSpinLockExclusiveFromDpcLevel(v2);
  __writecr8(v8);
}

Referenced by:

PspSetJobIoRateControlForVolume