For what it's worth to people who still have an iPhone 4 like myself...
This is what I did to resolve the error 4013 / 4014 problem after endless attempts.
Open iTunes, unlock the app, change the permissions, dump it.
Reinstall iTunes, hold in the home button on the phone and plug it in. When it shows in iTunes, eject it.
Unplug phone from USB cord on the phone side.
Hold in home button and plug it in again. Hit the restore button.
Doesn't work... Error 4013 this time. Last time it was 4014.
So, I do the above all over again. For the 20th time. However, this time, my intuition tells me that instead of disconnecting my hub and everything else plugged into the USB slots as Apple and other forums advise you to do in this predicament, I keep my hub plugged in and plug the USB cord for my phone into the hub.
So I do just what Apple and other advice forums advise you NOT to do with the USB set up.
And... It worked... The restore process got past the hiccup / error stage and my iPhone is working again.
However, at the very end, a message window came up in iTunes and says the restore failed and I need to take my phone to Apple. Yet, I look at the screen of the phone and it's working.
The phone is backing up from the cloud as I write...
Like I said, for what it's worth... I hope it works for anyone else who has this problem.