Finding domains of invertibility for smooth functions by means of attraction basins