The Mishna states that if one stole a large beam and used it as the structure for a house, if we asked people to tear down the whole house to return the beam, no one would ever repent from theft. Instead, we say pay the original owners for the value.
If someone stole cash and used it to buy a ... let's say toaster; again, we allow the thief to use the toaster, just pay back its value. (Now some may feel better not staring at the toaster and having guilt trips everyday, that's your call. But the Gemara tells the story of the gangster who had thought about making amends when his wife said "even your clothes are ill-gotten gains!" -- that made him decide it was too hard, and he went back to being a gangster.)
If one can reasonably ascertain who the victim of theft/cheating was, the money should be paid back to them. If not, the goal is to give the money so that it's likely a victim could get some benefit from it. In Talmudic times you could work on a public water system that everyone -- not just the poor -- would benefit from. (Unless you were certain you only robbed the poor ...) A modern-day equivalent might be a public library or a volunteer fire department, though Rabbi Moshe Feinstein suggested mikvahs.