MiCreateProcessDefaultAweInfo

INT64 __fastcall MiCreateProcessDefaultAweInfo(INT64 a1, _QWORD *a2){
  _ETHREAD *CurrentThread; 
  __int64 v4; 
  __int64 v5; 
  _QWORD *v6; 
  INT64 result; 
  int v8; 
  INT64 v9; 
  *a2 = 0i64;
  CurrentThread = (_ETHREAD *)KeGetCurrentThread();
  v4 = *((_QWORD *)CurrentThread + 23);
  v5 = *(_QWORD *)(v4 + 1680);
  v6 = *(_QWORD **)(v5 + 392);
  if( !v6 )
  {
    result = MiAllocateAweInfo();
    if( (int)result < 0 )
      return result;
    v8 = 0;
    MiLockAweVadsExclusive((INT64)CurrentThread);
    if( !*(_QWORD *)(*(_QWORD *)(v4 + 1680) + 392i64) )
    {
      *(_QWORD *)(v5 + 392) = v6;
      v8 = 1;
    }
    MiUnlockAweVadsExclusive((__int64)CurrentThread);
    if( !v8 )
    {
      MiDeleteAweInfo(*((_QWORD *)KeGetCurrentThread() + 23), v6, v9);
      v6 = *(_QWORD **)(*(_QWORD *)(v4 + 1680) + 392i64);
    }
  }
  *a2 = v6;
  return 0i64;
}

Referenced by:

MiAllocateUserPhysicalPages
MiCreateUserPhysicalView