PopThermalReadCounters

INT64 __fastcall PopThermalReadCounters(INT64 a1, CHAR a2, UINT64 *a3){
  unsigned int v3; 
  UINT64 v6; 
  UINT64 v7; 
  UINT8 v8; 
  UINT8 v9; 
  KDPC *v10; 
  PVOID v11; 
  PVOID v12; 
  PVOID v13; 
  int v14; 
  IRP *WaitMode; 
  PVOID Object[3]; 
  v3 = 0;
  if( *(_BYTE *)(a1 + 228) )
    goto LABEL_5;
  if( (a2 & 9) == 0 )
    goto LABEL_5;
  v6 = a1 + 432;
  PopAcquireRwLockExclusive((_POP_RW_LOCK *)(a1 + 432));
  KeResetEvent((VOID *)(a1 + 472), v7, v8, v9, WaitMode);
  v10 = *(KDPC **)(a1 + 56);
  *(_DWORD *)(a1 + 112) = 0;
  IoCancelIrp(v10, v11, v12, v13);
  PopReleaseRwLock(v6);
  Object[1] = (PVOID)(a1 + 448);
  Object[0] = (PVOID)(a1 + 472);
  KeWaitForMultipleObjects((_BYTE *)2, Object, WaitAny, Executive, 0, 0, 0i64, 0i64);
  if( v14 )
  {
    return(unsigned int)-1073741823;
  }
  else
  {
LABEL_5:
    PopAcquireRwLockExclusive((_POP_RW_LOCK *)(a1 + 432));
    *(_DWORD *)a3 = *(_DWORD *)(a1 + 128) / 0xAu;
    *((_DWORD *)a3 + 3) = *(_DWORD *)(a1 + 128);
    *((_DWORD *)a3 + 1) = *(_DWORD *)(a1 + 80);
    *((_DWORD *)a3 + 2) = *(_DWORD *)(a1 + 212);
    PopReleaseRwLock(a1 + 432);
  }
  return v3;
}

Referenced by:

PoThermalCounterSetCallback