I implemented a (hacky) tool to do the conversion:
http://code.ebrahim.ir/iransystemComments, testing, bug reports, etc. are all welcome.
Saddest part of the story was reverse order of RTL characters. For example to write سلام many old DOS application used to write byte of م first, and then ا, then ل, and finally س! Now add some LTR character sequences (like digits) to the mixture! (O_O)
The tool is put into public domain.