If it is shifting well enough I would suggest leaving it alone. Never Fix A Running Piece.
If you insist on fixing it the correct approach would be to use a gauge to measure/adjust the hanger alignment and then mount the derailleur and evaluate its straightness. As it stands you have no way to determine if it is the hanger or derailleur (or both) which is (are) bent.