Pore-blocking and pore-assisting factors during capillary condensation and evaporation