Yes, TestDisk, more specifically its PhotoRec component.
What it can recover will depend on what, exactly, the malware did as far as the disc drive. If it actually erased, as in cleared data blocks, as opposed to deleted (marking data blocks as unused and ready for reuse) it completely changes whether there's something to reconstruct files from or not.
If you use PhotoRec be aware that by default it will try to recover a lot more than photos. Take a look at his "how to use" page and be certain to unselect any of the file types you have no interest in getting back as part of the recovery. Also know that you may get multiple copies of the same photos if they've been copied to different folders over time and deleted from their original locations. Photorec will reconstruct any file it can find sufficient information to reconstruct, including deleted files, as it is a disaster recovery program.
Brian AKA Bri the Tech Guy (website in my user profile) - Windows 10 Home, 64-Bit, Version 1809, Build 17763
Travel is fatal to prejudice, bigotry, and narrow-mindedness, and many of our people need it sorely on these accounts. Broad, wholesome, charitable views of men and things cannot be acquired by vegetating in one little corner of the earth all one's lifetime.
~ Mark Twain