Inspection did not catch doomed chimney

Hello all,

First of all - thank you in advance for any input.

We bought a house in January and are in the process of fixing some stucco. During that, our stucco guy pointed out that our chimney (which is substantially big) is leaning and noticed a crack in the at the base of near the roof.

It’s not super obvious but once pointed out it’s clear. It’s not leaning tower of Pisa but it’s noticeable. There’s also a lot of damage near the roof where the chimney is, as though it’s weighing down the roof.

We are now looking at a significant cost to repair/replace it. I’m shocked the inspection did not flag this. Is this something we should contact an attorney over? Any general advice? I can find a way to upload photos if helpful. Thanks again.