Pakistan will need to beat Afghanistan to keep their hopes of reaching semifinals alive.