PopRequestCompletion

INT64 __stdcall PopRequestCompletion(DEVICE_OBJECT *DeviceObject, IRP *Irp, VOID *Context){
  __int64 v3; 
  char v5; 
  IRP *v6; 
  char v7; 
  void(__fastcall *v8)(_QWORD, IRP *, _QWORD, _QWORD, char *); 
  INT64 v9; 
  UINT64 v11; 
  CHAR v12; 
  UINT64 *v13; 
  int v14; 
  __int64 v15; 
  __int64 v16; 
  v3 = *((_QWORD *)Context + 25);
  v5 = *((_BYTE *)Context + 209);
  v6 = Irp;
  v7 = *((_BYTE *)Context + 184);
  if( v3 && v7 == 2 )
    PopFxNotifyPreDIrpCompletion((PVOID)v3, (INT64)Irp, *((unsigned int *)Irp + 12));
  v8 = (void(__fastcall *)(_QWORD, IRP *, _QWORD, _QWORD, char *))*((_QWORD *)Context + 27);
  if( v8 )
  {
    LOBYTE(Irp) = v7;
    v8(*((_QWORD *)Context + 29), Irp, *((unsigned int *)Context + 48), *((_QWORD *)Context + 28), (char *)v6 + 48);
  }
  if( v7 )
  {
    PopDequeueQuerySetIrp(v6);
    if( v3 && *((_BYTE *)Context + 184) == 2 && *((_DWORD *)Context + 47) == 1 && v5 )
    {
      if( *((_DWORD *)Context + 48) == 1 )
      {
        _m_prefetchw((const void *)(v3 + 32));
        if( (_InterlockedAnd((volatile signed __int32 *)(v3 + 32), 0xFFFFFFFD) & 2) != 0 )
        {
LABEL_16:
          LOBYTE(v9) = 1;
          PopPepDeviceDState(
            *(PEPHANDLE__ **)(v3 + 56),
            *((_DEVICE_POWER_STATE *)Context + 48),
            v9,
            *((unsigned int *)Context + 62));
          PopDiagTraceFxDevicePowerState(*(PVOID *)(v3 + 48), *((_DEVICE_POWER_STATE *)Context + 48));
          goto LABEL_6;
        }
        v5 = 0;
      }
      if( v5 )
        goto LABEL_16;
    }
  }
  else
  {
    PopDiagTraceIrpFinish(v6);
    v14 = *((_DWORD *)v6 + 12);
    if( v14 >= 0 )
    {
      if( *((_BYTE *)Context + 240) )
      {
        PopUpdateWakeSource(*((DEVICE_OBJECT **)Context + 3));
        v14 = *((_DWORD *)v6 + 12);
      }
      if( v14 >= 0 )
      {
        v15 = *((_QWORD *)Context + 3);
        v16 = v15 ? *(_QWORD *)(*(_QWORD *)(v15 + 312) + 40i64) : 0i64;
        if( v16 && (*(_DWORD *)(v16 + 760) & 0x30000) != 0 )
          PopDirectedDripsStartDisengageTimer(0i64);
      }
    }
    if( v3 )
    {
      LOBYTE(v11) = 1;
      PopPepDeviceWaitWake(*(_QWORD *)(v3 + 56), v11, v12, v13);
      if( _InterlockedExchangeAdd((volatile signed __int32 *)(v3 + 244), 0xFFFFFFFF) == 1 )
        KeSetEvent((PRKEVENT)(v3 + 248), 0);
    }
  }
LABEL_6:
  PopFreeIrp(v6);
  return 3221225494i64;
}

Referenced by:

No references.