MiLogReserveVaFailed

INT64 __stdcall MiLogReserveVaFailed(INT64 SizeOfRange, INT64 Alignment, INT64 ZeroBits, INT64 a4){
  INT64 result; 
  __int64 v9; 
  int v10; 
  __int64 v11; 
  INT64 v12; 
  __int64 v13; 
  __int64 v14; 
  __int64 v15; 
  INT64 v16; 
  INT64 v17; 
  INT64 v18; 
  int v19; 
  __int16 ProcessSessionId; 
  __int16 BootId; 
  INT64 v22; 
  __int64 v23[5]; 
  int v24; 
  int v25; 
  INT64 *v26; 
  int v27; 
  int v28; 
  __int64 *v29; 
  int v30; 
  int v31; 
  __int64 *v32; 
  int v33; 
  int v34; 
  __int64 *v35; 
  int v36; 
  int v37; 
  INT64 *v38; 
  int v39; 
  int v40; 
  INT64 *v41; 
  int v42; 
  int v43; 
  INT64 *v44; 
  int v45; 
  int v46; 
  void *retaddr; 
  result = (INT64)&retaddr;
  if( *(_QWORD *)&qword_140C4EC20 )
  {
    v9 = *((_QWORD *)KeGetCurrentThread() + 23);
    _m_prefetchw((const void *)(v9 + 2172));
    LODWORD(result) = *(_DWORD *)(v9 + 2172);
    do
    {
      v10 = result;
      result = (unsigned int)_InterlockedCompareExchange((volatile signed __int32 *)(v9 + 2172), result | 0x800, result);
    }
    while( v10 != (_DWORD)result );
    if( (result & 0x800) == 0 )
    {
      v19 = *(_DWORD *)(v9 + 1088);
      ProcessSessionId = PsGetProcessSessionId(v9);
      BootId = KUSER_SHARED_DATA.BootId;
      result = *(_QWORD *)(v9 + 1128);
      v22 = result;
      if( **(_DWORD **)&qword_140C4EC20 > 5u )
      {
        LOBYTE(result) = tlgKeywordOn(*(__int64 *)&qword_140C4EC20, 0x400000000000i64);
        if( (_BYTE)result )
        {
          v25 = 0;
          v28 = 0;
          v31 = 0;
          v34 = 0;
          v37 = 0;
          v40 = 0;
          v43 = 0;
          v46 = 0;
          v23[4] = (__int64)&v19;
          v26 = &v12;
          v13 = *(_QWORD *)(v9 + 1176);
          v29 = &v13;
          v14 = *(_QWORD *)(v9 + 1168);
          v32 = &v14;
          v15 = *(_QWORD *)(v9 + 1496);
          v35 = &v15;
          v38 = &v16;
          v41 = &v17;
          v44 = &v18;
          v27 = 8;
          v30 = 8;
          v33 = 8;
          v36 = 8;
          v39 = 8;
          v42 = 8;
          v45 = 8;
          v24 = 16;
          v12 = SizeOfRange;
          v16 = Alignment;
          v17 = ZeroBits;
          v18 = a4;
          LODWORD(result) = tlgWriteEx_EtwWriteEx(
                              v11,
                              (unsigned __int8 *)&word_140024BD6,
                              0i64,
                              1u,
                              0,
                              0,
                              0xAu,
                              (__int64)v23);
        }
      }
    }
  }
  return result;
}

Referenced by:

MiReserveUserMemory