Is there a computer program that fixes battery for iPhone?

I have an iPhone 4 and the battery dies really quick and i think its because it was dead for like a month so i was wondering if there's a program that you plug your iphone into the usb and it charges it a certain way like a trickle charge or something. Or one that runs a diagnostic test?

Bro there's a huge difference in Hardware & Software.

If you have been updated your iphone 4 to iOS 7 and you use it so the battery drains is the software issue and it can be solved, via downgrading the iOS 7 to iOS 6 or 5, just download the system firmware, can be reflashed through itunes.

If iOS is not upgraded and then battery drains quickly so its hardware issue. But sometimes also close background apps.