OK, Before we were so rudely interrupted, this is what I'm seeing in the pictures and what I'm understanding from you. You've got two plugs, a silver plug and one that I'm going to call grey. The silver plug is the female plug and is currently in 2 parts. A grey cable is attached to one part of the silver plug, while the other part is still attached to the grey plug. The grey plug is the male plug, and has a black cable attached to it.
You have a grey 4 conductor cable that is connected to your stepper motor, and a black cable that connects to your controller. I don't know if a color code even exists for rebuilding the connections through those plugs - but we can figure it out. The first thing we'll need to do is a little surgery on the existing connectors. We need to find out if the color code for the conductors of the grey cable is the same as the color code for the black cable connected to the other plug. Even if they aren't the same color code, this in no big deal, we will be able to figure this out. To do this we need to trace out the connections between the stepper motor and the controller. We may wind up opening every plug between the stepper and the controller, but when we are done we will know what wire connects to what pin in each connector - at least for this stepper. This is what I've done for a living for the last 40 years, ain't it fun? On Monday I'll CAD up a simple sketch of the connections between the controller and the stepper motor. There will be some of blanks that we'll need to fill in before you can actually put things back together, but that's just a matter of following wires.
The plugs themselves consist of several parts that screw together. The male plug consists of a strain relief assembly, the main body shell, and the pin assembly. The female plug consists of a strain relief assembly, the main body shell, and the socket assembly with locking ring. This socket assembly and locking ring are the silver parts that are still attached to the grey plug. We need to open these plugs up to look at the color code for the cables and see if the match. If they match, we're golden, if not - well we'll burn that bridge when we get to it.
The male and female connectors screw together, so we need to start taking them apart. Time to disassemble Johnny 5:
1) Loosen and remove the silver ring from the grey plug. That silver ring is actually the locking ring that holds the female plug into the male plug.
2) Pull the socket assembly for the silver plug out of the grey plug. This has to be done anyway to repair the plug so let's just get it over with.
3) Loosen or remove the screws in the cable clamp for the strain relief assembly on both the silver and grey plugs.
4) Once you have the cable clamps loose or off, unscrew the remainder of the strain relief assembly from the main body of the plug. Do this for both the silver and the grey plug.
5) You should now be able to push some more of the grey cable into/through the main body of the silver plug. You should now be able to get a good look at the wires in the grey cable.
6) In its' simplest form a stepper motor consists of 2 separate sets of coils, hence the 4 conductors which are sometimes called A+, A-, B+ and B-. Using your multi-meter you should be able find which wires are A coil wires, and which wires are the B coil wires.
7) The pin assembly in the grey male plug is held into the main body by one or more screws. Remove the screw/s and you will be able to push the black cable into the grey plug. This will in turn push the pin assembly out of the main body. There might be some resistance to this as the pin assembly is keyed into the main body to keep it from twisting.
Once you have the pin assembly out of the main body of the of the grey plug that will tell us a couple of things:
A - If the color code for the black cable is the same as the grey cable color code. If they are the same, it's probably safe to assume that we can hook things back up pin to pin and we'll be good to go, By pin to pin, I mean that whatever color is any pin particular number on the male side, BETTER be connected to the same pin number on the female side.
B - If they aren't the same, well then we'll have more information than we do now. We figure out the next step, and we move on to it.
Don