Ransomware resides within & encrypt files from the infected system,there is no infected file like in case of virus.In case of ransomware there are only 2 types of files:encrypted & non-encrypted.So if a file backup is taken before encryption of files then they are the same files before ransomware infected the system.