Damaged Chimney in Attic

This is not really a great picture and it's a little out of focus, but you can see there is some sort of damage to this brick chimney in the attic.

The streaks of white running vertically down the chimney could be from previous roof leaks and it looks like some of the bricks and mortar are damaged.

This brick chimney could probably be repaired instead of replaced.