how to modify file contents

Good morning everybody ,
I have a problem in filemon(filter)
that is if I have one file that its contents are xor with one byte for each byte
but I want to read its contents back to its original data
ex.
original file data –> 1234567890
after xor –> x1 x2 x3 x4 x5 x6 x7 x8 x9 x0
and I want to read them back to original file data(1234567890)
How can I do?
if I modify the code in IRP_MJ_READ
how can I do to find that output buffer and modify its contents?

Any information would be helpful.
Thanx in advance.