Dialogue does not provide legitimacy to illegal activities: Pervaiz