IopPowerDispatch

NTSTATUS __stdcall IopPowerDispatch(_DEVICE_OBJECT *DeviceObject, _IRP *Irp){
  __int64 v2; 
  NTSTATUS v3; 
  int v6; 
  _DWORD *v8; 
  int v9; 
  v2 = *((_QWORD *)Irp + 23);
  v3 = 0;
  if( *(_BYTE *)(v2 + 1) )
  {
    switch( *(_BYTE *)(v2 + 1) )
    {
      case 1:
        v8 = *(_DWORD **)(v2 + 8);
        v9 = PoPowerSequence;
        *v8 = PoPowerSequence;
        v8[1] = v9;
        v8[2] = v9;
        goto LABEL_6;
      case 2:
        v6 = *(_DWORD *)(v2 + 16);
        if( !v6 )
          goto LABEL_5;
        if( v6 == 1 )
        {
          PoSetPowerState((INT64)DeviceObject, 1i64, *(unsigned int *)(v2 + 24));
          goto LABEL_6;
        }
        break;
      case 3:
        goto LABEL_6;
    }
  }
  v3 = -1073741637;
LABEL_5:
  if( v3 == -1073741637 )
  {
    v3 = *((_DWORD *)Irp + 12);
    goto LABEL_7;
  }
LABEL_6:
  *((_DWORD *)Irp + 12) = v3;
LABEL_7:
  IofCompleteRequest(Irp, 0);
  return v3;
}

Referenced by:

No references.