iTunes error 40 while connected to PC

Hello, this is regarding the same 5S i have here, i was trying to put to recovery mode on a hand-me-down 5S i have and when i tried to restore it back to it’s running OS, via iTunes USB, it couldn’t finish restoring it as it popped up an error code (40) on iTunes. I see nothing wrong with the phone itself, it’ll boot to the apple logo, but it there is a black backlight when it’s turned on . How can i fix this phone back to running condition? I even popped the screen to see if it’s a battery thing but the battery looks good to me

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0

crwdns2942205:01crwdne2942205:0:

You may be out of luck. I have always heard that was a hardware issue. Apply will only fix it if under warranty. Won't hurt to call support and ask though.

crwdns2934271:0crwdnd2934271:0crwdne2934271:0

crwdns2934285:0crwdne2934285:0