MiSetSubsectionBase

__int64 __fastcall MiSetSubsectionBase(ULONG_PTR BugCheckParameter2, __int64 a2, unsigned int a3){
  __int64 v3; 
  ULONG_PTR v7; 
  volatile LONG *v8; 
  unsigned __int64 v9; 
  int v10; 
  int v11; 
  __int64 result; 
  unsigned int v13; 
  v3 = *(_QWORD *)BugCheckParameter2;
  v7 = 0i64;
  v8 = (volatile LONG *)(*(_QWORD *)BugCheckParameter2 + 72i64);
  v9 = ExAcquireSpinLockExclusive(v8);
  if( (*(_DWORD *)(v3 + 56) & 0x20) == 0 )
  {
    v7 = BugCheckParameter2;
    MiIncrementSubsectionViewCount((INT64 *)BugCheckParameter2, 0);
  }
  v10 = *(_DWORD *)(BugCheckParameter2 + 48);
  *(_WORD *)(BugCheckParameter2 + 32) |= 1u;
  v11 = v10 & 0x3FFFFFFF;
  *(_QWORD *)(BugCheckParameter2 + 8) = a2;
  *(_DWORD *)(BugCheckParameter2 + 48) = v11;
  if( v7 && a3 <= 1 )
  {
    if( a3 == 1 )
      v13 = v11 | 0x40000000;
    else
      v13 = v11 | 0x80000000;
    *(_DWORD *)(BugCheckParameter2 + 48) = v13;
  }
  ExReleaseSpinLockExclusiveFromDpcLevel((INT64 *)v8);
  result = (unsigned int)KiIrqlFlags;
  __writecr8(v9);
  return result;
}

Referenced by:

MiAllocateFileExtents
MiExtendSection