Use an Ohm meter to figure out what wire is ground on the trailer. Then, knowing that, apply 12 volts to each of the other wires and see what lights up. If nothing lights up, see if you can hear the brakes activating. Doing this will take time, but you should be able to narrow it all down.
__________________
|