For Q Sound boar suicide free mod, it requires to remove a resistor and a capacitor SMD on the area between the Kabuki and the Battery. You should figure out the values or those components and put them back (let me know if you find the values I want to undo the mod too haha). Also many time, the Kabuki is replaced by a regular Z80 processor, if that is the case, you can find a Kabuki on some CPS2 A board of old revision (I was lucky and I could find one socked). Seems like Capcom had Kabukis from old boards and wanted to save some Z80 by reusing the Kabukis on stock, putting them on non encrypted mode.
For the C Board suicide free mod, it requires to cut 2 traces from the custom chip, and put them to +5V. So you will need to desolder the added wire and restore the traces or take the same wire and put it to ground instead of +5V.
I forget to mention that on the Kabuki mod some guys also cut a trace. But if it was a good mod, it don't cut the trace and let a leg of the EPROM out of the socket and solder a wire to the kabuki (this is more easy to undo).
After you revert back all those hardware modifications, you have to solder back both batteries and use an ardruino UNO to reprogram the Kabuki and the C Board custom using the Arcade Hacker method.
Finally you have to erase the Main CPU and Sound CPU EPROMs and write back the original encrypted code from Mame ROM. Please keep the original labels