You could jailbreak it and try restoring it.
I am unsure if that will work though.
You could always take ti to the apple store and they will do it for you.
1. Go to the following website:
http://www.felixbruns.de/iPod/firmware/
2. Under the iPhone / iPod touch / iPad / Apple TV drop down, select iPhone (3.1.2/7D11) and save it to your desktop.
3. When it has finished downloading, plug in your iPhone. Where it says restore, do the following:
Hold Shift and click Restore.
4. Navigate and select the firmware you downloaded on your desktop.
5. Click OK and see if it restores accordingly.