If you're on Windows, download this:
http://www.wingrep.com/ (it's free).
What it does is allows you to search any folder/location on your PC for any string, and it tells you what files contain that string.
For example, if your wordpress site is linking to:
http://SomeSite.com
You would use wingrep to search the following folder (and subfolders) on your PC:
C:\user\documents\wordpress themes\your download theme
(in other words, the location of your downloaded them)
and you would enter the following string to search that folder for:
SomeSite.com
When it completes, it will show you all the files within your downloaded theme that contain that string and what lines of each of the files that it appears on. This allows you to quickly edit each file to remove that string.
If the person who modified the theme to include these malicious links is smart, they'll have obfuscated the the code to make it more difficult to find. So if the above method yields no results, it more than likely means it's going to take some additional effort on your part to get rid of it.
The fact that there are malicious links means that you should really just buy the theme, because there is probably a lot more going on within that downloaded theme than malicious links.