SmStoreSetProcessVaRanges

INT64 __fastcall SmStoreSetProcessVaRanges(VOID *Src, INT64 a2){
  UINT8 *v2; 
  __int64 v4; 
  UINT64 v5; 
  UINT8 *NonPaged; 
  int v7; 
  v2 = 0i64;
  v4 = *((_QWORD *)KeGetCurrentThread() + 23);
  if( a2 )
  {
    v5 = 16 * a2;
    NonPaged = (UINT8 *)SSHSupportAllocateNonPaged(16 * a2, 0x52566D73u);
    v2 = NonPaged;
    if( !NonPaged )
      return(unsigned int)-1073741670;
    memmove(NonPaged, (UINT8 *)Src, v5);
  }
  v7 = SmpKeyedStoreSetVaRanges((ULONG_PTR)&qword_140D23188, v4);
  if( v7 >= 0 )
  {
    v2 = 0i64;
    v7 = 0;
  }
  if( v2 )
    ExFreePoolWithTag(v2, 0);
  return(unsigned int)v7;
}

Referenced by:

MmInSwapWorkingSet
MmOutSwapWorkingSet