IF it is possible for you to re-connect the wires in the cable to the pins in the connector, you could use these pinout guides. I fully expect you have the 6-pin male connector to deal with. The first includes in its table the colour codes commonly used for the wires, so you can connect those to the correct pins.
https://pinouts.ru/Slots/ieee1394_pinout.shtml
This next gives similar info but without the colour codes.
http://www.interfacebus.com/Design_Connector_Firewire.html
On the other hand, if you cannot access the connector's pins to solder wires back on, your path might be to replace the entire cable. You could get a standard cable like this
https://www.amazon.com/Cmple-IEEE-1394-FireWire-iLink-Cable/dp/B004045G38/ref=sr_1_31?dchild=1&keywords=Firewire+connector&qid=1616507983&sr=8-31&th=1
and snip the connector off one end. Then solder the wires from there (by matching colour codes) to the connection points inside the scanner on a circuit board. In doing so, IF the board connection points have labels on the individual lines soldered on, check them against the pinout diagrams to be sure.
As long as all makers conform to the same wire colour code uses (I do NOT know thus to be true!), that should work.
Third option.
Get one of those cables (above). Now, if I understand the info linked, it is possible that the connectors on the two ends MAY have a could of lines reversed between the two ends. So, snip that new cable in the middle and bare wire ends on both. Use a resistance meter to determine exactly which wire goes to which connector pin on BOTH ends. IF they are different, use the one that matches the pinout listed first above. IF the old torn-off connector has any wire its hanging on to give you colour clues how it was done, use that into also. Now select the new cable half that has the right connections and splice all six wires to the old broken cable, matching colours. This is not as good as a whole new cable because the spliced cable has some flaws in shielding and maybe impedance discontinuities, but it avoids having to get inside the scanner to solder there.