something seems to have screwed up with the value of your mainver (should be 1.31.405.4) - this should be stored somewhere on the phone's misc partition. i don't know if it's possible to alter that value in an easy way...
however you can try to open the rom.zip file from htc's bootloader unlocker with 7-zip, edit android-info.txt and changing mainver in there to 31.405.4, that your device is currently showing (however the normal format of mainver would be with three dots, so i don't know if this can/will work). then save the txt file, rename rom.zip to LEGEIMG.zip, put it on the sdcard and try applying the update in bootloader again.