Hi Lem, welcome to the forum.
I think what you meant is you want to identify the pins of the stepper, isn't it? Usually a stepper motor has a common terminal which allows you to see the right sequence to control it. So to reverse the pinouts, you'll just have to apply a voltage on one pin for GND, and run through the other pins with Vcc. If it turns clockwise or counter-clockwise, you have your pins identified already. If it doesn't turn, make another pin as "common", repeat the steps, and so on until you get it.