PiProcessQueryRemoveNoFdo

INT64 __fastcall PiProcessQueryRemoveNoFdo(INT64 a1){
  _DWORD *TargetDeviceNode; 
  unsigned int v3; 
  int v4; 
  const WCHAR *v5; 
  INT64 v6; 
  INT64 v7; 
  int v8; 
  TargetDeviceNode = (_DWORD *)PiGetTargetDeviceNode(a1);
  v3 = 0;
  if( ((TargetDeviceNode[75] - 770) & 0xFFFFFFEF) == 0 )
  {
    v4 = TargetDeviceNode[99];
    if( (v4 & 0x6000) != 0 && !(unsigned int)PipIsProblemReadonly((__int64)TargetDeviceNode, TargetDeviceNode[101]) )
    {
      PipClearDevNodeProblem(v6, v5, v7);
      v4 = TargetDeviceNode[99];
    }
    v8 = *(_DWORD *)(a1 + 144) & 2;
    if( (v4 & 0x6000) != 0 )
    {
      if( !v8 )
        return(unsigned int)-1073741811;
    }
    else if( v8 )
    {
      PipSetDevNodeProblem((__int64)TargetDeviceNode, *(_DWORD *)(a1 + 16), 0);
    }
    else
    {
      PnpRestartDeviceNode((__int64)TargetDeviceNode);
    }
  }
  return v3;
}

Referenced by:

PnpProcessQueryRemoveAndEject