PopGetConsoleDisplayRequestCount

INT64 __fastcall PopGetConsoleDisplayRequestCount(){
  unsigned int v0; 
  UINT64 v1; 
  int v2; 
  unsigned int v3; 
  int v5; 
  char v6; 
  __int16 v7; 
  char v8; 
  __int64 v9; 
  int *v10; 
  __int64 v11; 
  unsigned int *v12; 
  unsigned int v13; 
  int v14; 
  UINT64 v15; 
  v0 = 0;
  v7 = 0;
  v8 = 0;
  HIDWORD(v9) = 0;
  HIDWORD(v11) = 0;
  v13 = 0;
  if( PsWin32CalloutsEstablished )
  {
    LODWORD(v15) = RtlGetActiveConsoleId();
    if( (_DWORD)v15 == -1 )
    {
      return v13;
    }
    else if( TtmIsEnabled() )
    {
      return(unsigned int)TtmGetSessionDisplayRequiredCount(v1);
    }
    else
    {
      v7 = 0;
      v10 = &v14;
      v8 = 0;
      v12 = &v13;
      v9 = 4i64;
      v11 = 4i64;
      v14 = 0;
      v5 = 2;
      v6 = 0;
      v2 = PopInvokeWin32Callout(5i64, &v5, 1i64, &v15);
      v3 = v13;
      if( v2 < 0 )
        return 0;
      return v3;
    }
  }
  return v0;
}

Referenced by:

PopPolicySystemIdle