Four of those wires go to the motor (Y) there, and the other go to the end stop. It's fairly easy to find replacement wires for each. Makerbot has a good video on how to replace the wires. Replacing the end stop wire is a similar process.

https://www.google.com/search?q=repl...tf-8#kpvalbx=1