Wow...lots of guessing required...forgive me for the guesswork.
1. Let's say your limit switches are messed up, and that allowed your winch to keep running beyond where it should have stopped, and as it kept running, it overshot and wound the cable on the drum backwards. This goes along with MohicanJeff's comment that your cable seems to be wound backwards. No idea if this is the case or not. Something to consider.
2. Now to the limit switches. I had a 2014 HW-277. The limit switch system, in my view, is a Rube Goldberg nighmare.
Here's the manual. It's the cylindrical, plastic gear driven mechanism in front of the motor. It's about 1 1/2" to 2" in diameter and about 6" long. There are any number of reasons why it would be messed up, but most likely is that the plastic gear teeth on the limit switch have been stripped clean off, leaving you with a non-functioning switch.
The good news is that you can bypass the limit switch...with
jumper wires straight from the up/down switch to the terminals on the relay(s) where the limit switch connects. If I recall, the wires are color coded from the up/down switch, into the limit switch, and out of the limit switch to the relay connections. I believe they are red and black. Couldn't be easier. If in doubt, get a multi-meter and learn how to do a continuity (ohms) test to trace the circuits while the winch is in the middle of it's functioning travel (not stopped).
When the limit switches are "closed" the switch is just like a straight piece of wire. When they open, they essentially cut the wire in half...disconnecting it. Very simple. A straight jumper wire between the up/down switch and the relay bypasses the limit switch.
Of course, without the limit switches, you must be observant to stop the winch when you have the roof fully raised. There should be a red cable on the driver's side front corner between the roof and the tub to tell you when to stop. When lowering, stop when the roof is solidly able to contact the tub when clamped.
The limit switch is an idiot proof device, but common sense and basic attention are all that are needed to operate the roof without it.
If you test with jumper wires and it works, replace the jumper wires with a more permanent solution. You can use crimp connectors on the ends of plain wire to make permanent jumper cables. This is light duty wire, because it only operates the relays...the real switch...heavy wires are attached to the output side of the relays.
CAVEAT: if you have young kids who might mess with the up/down switch, that's the real purpose of the limit switch. You can buy a replacement limit switch, and it will instruct you on installation and adjustment, or you can cover the up/down switch.
I did not replace my limit swich. The plastic gear is DUMB, and that's just the start of it. I disassembled mine to look it over, and it's a nightmare of worm gears and plunger switches and tabs on the worm gears. Insanely complex, but it's not terribly expensive if you feel you need it.
3. As for the wind on the winch drum, look at the manual to ensure yours is right. I can't tell the POV from your photo, but the manual shows how the cable is wound on the drum.
Good luck.