One of the reasons why your iTunes library should be included with your computer's backup along with all other important data such as documents, contacts, and photos.
This won't be the last time this happens with a Windows PC, so use this for reference with including your iTunes library with your computer's backup or you will be going through this again.
iTunes includes an option to transfer iTunes content that was purchased/downloaded from the iTunes store from an iPod or iOS device, but this is for iTunes content that was purchased/downloaded from the iTunes store only.
First you need to re-authorize your computer with your iTunes account with iTunes if you haven't already done so. With your iPhone connected and without syncing, at the iTunes menu bar go to File and select Transfer Purchases From - the name of your iPhone.
This will not prevent your iPhone from being erased of all iTunes content with the first sync after doing so. If your iTunes library was included with your computer's backup per the instructions included with the link provided an restored from your backup, this wouldn't be a problem.
When transferring new photos from your computer via the iTunes sync process, all photos on your iPhone that wre transferred from your computer before it crashed will be erased first and lost. These photos should be included with your computer's backup as well.