Unplug the lamp and remove the socket.
Set a multitester to RX1, and clip one probe to one wire end. Place the other probe against one plug prong and then the other. The meter should indicate continuity on one prong only.
Repeat this step for the other wire end. If the cord and plug fail either test, rewire the lamp.
Strip the ends of the new cord, and twist the strands clockwise.
At the top of the lamp, hook the ends of the old and new cords together.
Wrap electrical tape around the connection. If it won't fit through the lamp, unhook one pair of wires and retape them alongside the remaining hooked pair.
With a paring knife, carefully peel back the base's felt cover far enough to uncover the cord in the lamp base.
Feed the connection into the center pipe at the top of the lamp. From the base, pull on the old cord until the connection appears. Then pull on the old cord at the edge of the lamp base to bring the new cord through the channel.
Untape the connection, and discard the old cord. Install a new socket and plug.
Unplug the lamp and remove the shade. Remove the sockets. Test the wires for each socket.
Pull the socket wires out of the socket caps with long-nose pliers.
Note that one wire to each socket is connected to each of the lamp-cord wires. Remove any electrical tape, twist off the old wire caps and disconnect the wires. Cut and fish the new cord.
For each socket, cut a piece of lamp cord the same length as the old socket wires, then part and strip both ends of the socket wires, as well as the upper end of a new lamp cord.
Connect the neutral wire -- the one with the ridge in its insulation -- to the silver socket terminal and the other wire to the brass socket terminal. Place the socket in the lamp, feeding the wire through the socket cap.
Reinstall the socket's insulating sleeve and shell, pushing on the shell until it snaps in place.
Twist the cord's neutral wire together with the neutral wires from each socket, and the cord's unridged wire with the unridged wires from each socket.
Secure each connection with a wire cap and electrical tape.
Fold the wires back into the top of the lamp and replace the cover.