The Rambam (mamrim 6:11) says that a mamzer is chayev in kibud av, because one is chayev in kibud av even if their father is a rasha who does aveiros. Although he isn't chayev for hitting and cursing the father, אפילו היה אביו רשע ובעל עבירות מכבדו ומתיירא ממנו.
The Tur (end of 240 in Y.D.) argues. His proof is from our gemara that clearly says one is not obligated to return goods that their father stole since their is only a chiyuv of kibud av when the father is עושה מעשה עמך, not when the father is a thief.
The Beis Yosef justifies the position of the Rambam that the braisa and gemara are only speaking about goods that were taken as ribbis, but not about stolen goods. Therefore, the Rambam would hold that m'ikar hadin the torah doesn demand that the inheritors return ribbis that was taken by their father - אל תקח מאתו נשך, לדידיה אזהר רחמנא, לבריה לא אזהר רחמנא (unlike stolen goods that the children have an obligation to return). The mitzvah of kibud av will require them to return anything that they have not "inherited" from their father and still remains in their fathers possesion, but once they inherit it and it has become theirs, the mitzvah of kibud av doesn't require them to return it (becasue we pasken kibud av is only משל אב, not משל בן). So, when their father did teshuva and intended to return it but didn't get a chance to, it is as if it is still in the father's reshus since it was never meant to be inherited by them, and they are obligaed to fulfill kibud av and return it. But, when the father didn't do teshuva, although they are fully obligated in kibud av of their rasha father, they don't have to return it since they inherit the ribbis and it becomes theirs.
Based on the Beis Yosef's answer, when the gemara says that they don't have to return it because ונשיא בעמך לא תאור בעושה מעשה עמך, the gemara doesn't mean to say that they have no mitzvah of kibud since their father is a rasha. Rather, the gemara means to say that when the father is a rasha, they inherit the item, and therefore have no obligation to fulfill kibud by returning it since it becomes theirs. Rashi clearly doesn't learn like this because rashi writes: בעושה מעשה עמך - וזה לא עשה מעשה עמו ואינן חייבין בכבודו
The approach of the beis yosef only works if the braisa about davar m'suyam is speaking only about ribbis, not about gezel. Rashi (d.h. misuyam) who writes that it is speaking about gezel as well, will be forced to learn like the Tur that there is no mitzvah of kibud av for a father who is a rasha (וזה לשיטתו כדביארנו שהוא סובר כשיטת הטור). Shulchan Aruch (240:18) paskens like rambam, but rama paskens like tur. Taz also asks on the answer of the beis yosef why should we diffrentiate between a davar misuyam and not, since the son never inherits he should be required to return even something which isn't misuyam because it isn't his, even without kibud av - based on this he agrees with tur and rama.
A major question on the Tur and Rama is that if one is exempt from honoring their father who is a rasha, why do we need a special pasuk (kiddushin 32, shulchan aruch 240:15) exempting a son from kibud when the father tells him to do an aveira, since the father is telling him to do an aveira he is a rasha, so the mitzvah of kibud doesn't apply? The pischei teshuva (240:15) explains that one only assumes a status of אינו עושה מעשה עמך when he repeats the aveira multiple times, but just asking the son to do an aveira won't render the father a rasha. Perhaps another answer is that one only is considered אינו עושה מעשה עמך for violating a d'oraysa, not a d'rabonon. Therefore, we need the pasuk of אני ה' - כולכם חייבים בכבודי to teach that even if the father tells the son to violate a d'rabonon, he should listen (as the shulchan aruch 240:15) paskens.