SMKM_STORE_MGR::SmCompressCtxBalancerThread

void __fastcall SMKM_STORE_MGR::SmCompressCtxBalancerThread(PVOID P){
  __int64 v1; 
  unsigned __int64 v3; 
  UINT64 v4; 
  UINT8 v5; 
  UINT8 v6; 
  unsigned int v7; 
  unsigned __int64 v8; 
  IRP *v9; 
  v1 = *(_QWORD *)P;
  KeSetActualBasePriorityThread((__int64)KeGetCurrentThread(), 25);
  while( 1 )
  {
    KeWaitForSingleObject((PVOID)(v1 + 48), WrKernel, 0, 0, 0i64);
    v3 = ExAcquireSpinLockExclusive((PEX_SPIN_LOCK)v1);
    KeResetEvent((VOID *)(v1 + 48), v4, v5, v6, v9);
    v7 = *(_DWORD *)(v1 + 88);
    if( !v7 )
      break;
    v8 = *(unsigned int *)(v1 + 92);
    if( v7 <= (unsigned int)v8 || **(_QWORD **)(v1 + 16) >> 1 <= v8 )
    {
      ExReleaseSpinLockExclusiveFromDpcLevel((INT64 *)v1);
      __writecr8(v3);
    }
    else
    {
      ExReleaseSpinLockExclusiveFromDpcLevel((INT64 *)v1);
      __writecr8(v3);
      SMKM_STORE_MGR::SmCompressCtxCreateThread(v1, *((_QWORD *)P + 1), 1);
    }
  }
  ExReleaseSpinLockExclusiveFromDpcLevel((INT64 *)v1);
  __writecr8(v3);
  SMKM_STORE_MGR::SmCompressContextDeleteThreadParams(P);
}

Referenced by:

No references.