If you have done something similar, it is fairly easy.
If you haven’t, your eyes will glaze over when you open the case.
You can get a replacement at Radio Shack. Cut the wires and splice them to the same color. That is easier than trying to take them off the connector and putting new ones on.
A mere fan probably connects via a small plug.