About all you can do is a visual inspection. Look at the mounting bolt holes for stripped threads, out of round, cracks, etc.
Look at the housings where the spool sides are. Sometimes if someone is not paying attention, the cable can fill up on one side and either damage the housings, or even get pulled between the spool and housing.
If it is just loose, that is about all you can do except maybe put power to it briefly to see if the motor runs.
If its in a frame, wiggle the spool to see if its tight. There are bushings that will wear egg shaped under long use, or overload and the spool will have some slop.
Look for broken parts, make sure the shifter moves freely if in a frame, and make sure you are getting all the parts.
In addition to the winch, you need the control box, control cable, and a fairlead.
The actual cable its self, is problematic.
Unless it is in really nice shape with no rust or kinks, you are better off getting a new one.