Thanks everyone who has replied, I really appreciate it!
So the full story is that I was given a brand new 10 speed cassette. This is what made me think about fixing up my bike in the first place.
I currently have:
Deore CS-M4100-10 cassette
Deore 10 speed chain
Deore SL-M4100 shifters
The hanger is visibly bent on my bike so just wondered if I replace it will all this work on such an old frame (and hanger). I'm thinking this would be the right derailleur to get:
Deore RD-M5120 long
Thanks for helping!