I expect that the 4th wire goes to your pickup selector switch.
The main thing you need to identify is the wiring coming from the pickup you want to change. Unscrew the pickup ring and pickup, then wiggle the wire from it, you'll soon see which one in your control cavity comes from that particular pickup.
You can then note down exactly how it is connected. Onceyou've done that, de-solder it, and replace with the Warpig. You will need to know how the wires coming out of your Warpig correspond to the wiring coming out of the current pickup (which I can't help you with). I'm also sure a good photo of your guitar's wiring would be better than a 1000 words at describing how it's laid out. Some of the other guys will be able to give you further advice I'm sure.
Oh, a tip for helping to feed wires through cavities is to stuff the wire up a drinking straw and then feed the straw through. Once the straw tip arrives at the other end, you can just pull it all through.