I can only comment based of drawings, however I dug up my pieces of 5177 and found the motor drive.
My motor has two leads, (no ground per say). Thus to go one way the Male is connected to +12VDC and the Female to ground through the DPDT Relay. to go the other way, the Relay changes the polarity to the leads.
I can see where someone would change the wiring to remove the headlight motor of the key switch for two reasons
1) remove that high current load
2) headlights can be turned on without the key and thus should open (could damage paint if they don't)
if you have connect your volt meter to the wire side of the motor connectors, with the buckets at mid stroke, you should see 12VDC across the wires, turning the head lights on should then reverse the 12VDC's polarity
with the lights off, seeing 12VDC across the wires (Yellow wire +), finger the limit switch for buckets closed should remove the 12VDC
with the lights on, seeing 12VDC across the wires (Brown wire +), finger the limit switch for opened should remove the 12VDC.
If you can provide which color wire goes to which motor terminal, would be apprecaited