I have the same problem on my sister's phone. It started when the old battery died. We put it in recovery mode, because we weren't sure if it's a software or hardware issue. After we figured out it was the battery we replaced it. After that we tried to restore the phone and it doesn't work. It starts the update and then when the phone's supposed to be updating the red screen shows and it restarts thus failing the update/restore and then the 4013 error pops up on itunes. We tried disconnecting and reconnecting every cable in the motherboard, even the battery but it still doesn't work. Does anyone have any further suggestions?