Sheikh alsalam alaikum, sheikh if someone bought books by haram contracts or haram money then repented , what is the correct procedure through this issue. Sell the books , make sadaqah etc... And until donating the money if needed , is reading the books and benifiting till being able to pay ,haram?

Ustadh AbdulAziz al-Haqqan
If the money was taken without the owners' consent, such as stolen money, return it to them, and if you cannot reach them give it in charity on their behalf. If it came from forbidden money, give the value to charity after repenting sincerely, and you can benefit from your purchases.