All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
If you wrongfully took some financial rights (i.e. private property) of some person, then it is your duty to return such rights to his heirs in the most suitable way you can. But, if you cannot because you do not know the heirs, then you pay such money as charity on behalf of that wronged person and you have to supplicate to Allah to forgive you and him.
Moreover, you are not allowed to give such money as a charity except after making all possible efforts. Then, if you find the heirs, you have to pay the money to them again if they do not sanction your action; i.e., paying as a charity on their behalf.
If you had committed some misdeed against some person (e.g. a dead one) such as defamation, cursing, and so on, then it is your duty to mention his best qualities and to praise him in front of the same people who listened to your bad words about him before.
We ask Allah to forgive all of us.
Allah knows best.