It may depend on the particular country, and jurisdictions on the internet are gray areas... That said, in the US if you are paid with stolen money and then informed of that fact then you are knowingly in possession of stolen money and would have to return it. If you no longer had the money (used it to pay bills, live your life, etc) then it probably gets more complicated.