As for signal wires (see the sticker on the esc pack, s refers to signal)
Motor 1 (a1, b1, c1) is white.
Motor 2 (a2, b2, c2) yellow.
Motor 3 (a3 ..,) blue.
Motor 4 (a4 ...) brown.
But esc orientation matters.
The above order is correct if you mount the esc with battery pads to the front and the 6pin signal/bec plug in the back.
Since you changed esc orientation, means rotated esc 180 degrees, you have a different order of signal wires.
Motor 1 (rear right) is now a4,b4,c4 on esc, so it's the brown signal wire.
Motor 2 (front right) is a3,b3,c3, so blue signal wire.
Motor 3 (rear left) is a2,b2,c2, yellow signal wire.
Motor 4 (front left) is a1,b1,c1, white signal wire.
Hope I didn't made a mistake, so double check yourself.
All you have to do is solder the signal wires to the corresponding pads on the FC and solder the red (5v) and gnd to power pads.
Have a look in FC documentation to locate the correct pads.