MdlInvariantInsertMdlInfo

INT64 __fastcall MdlInvariantInsertMdlInfo(INT64 a1, _OWORD *a2){
  _QWORD *v2; 
  _QWORD *PoolWithTag; 
  unsigned int v6; 
  __int64 v7; 
  INT64 result; 
  __int64 v9; 
  __int128 v10; 
  v2 = *(_QWORD **)(a1 + 224);
  if( !v2 )
  {
    PoolWithTag = ExAllocatePoolWithTag(NonPagedPoolNx, 0x58ui64, 0x6D646C56ui64);
    v2 = PoolWithTag;
    if( !PoolWithTag )
      return 0i64;
    memset((INT64)PoolWithTag, 0i64);
    *(_DWORD *)v2 = 2;
    v2[1] = v2 + 3;
    *(_QWORD *)(a1 + 224) = v2;
  }
  v6 = 0;
  if( !*(_DWORD *)v2 )
    return 0i64;
  v7 = v2[1];
  while( *(_QWORD *)(32i64 * v6 + v7) )
  {
    if( ++v6 >= *(_DWORD *)v2 )
      return 0i64;
  }
  v9 = 32i64 * v6;
  result = 1i64;
  v10 = a2[1];
  *(_OWORD *)(v9 + v7) = *a2;
  *(_OWORD *)(v9 + v7 + 16) = v10;
  return result;
}

Referenced by:

MdlInvariantPreProcessing1