I try to be more specific.
I have a binary file which has some portions of text inside. I want to search for some byte sequence in the binary file, if the sequences are found take the byte arrays and build a text file with them.
So the step has to be repeated till the end of the binary file. I used BinaryReader to search for a byte sequence, in order to validate the binary file, but now I am stuck on how to proceed with this combination.
My other issue is that I have to skip certain portions of the binary file until the next sequence is found.
So for example, I find the first sequence at 0x10 and it lasts for 10 bytes. Then I have to skip 32 bytes where another byte sequence then starts for x bytes till a tail byte that marks the end of the sequence.
Each time a byte sequence is found I have to save it in a text file, finally writing it to disk.
Any help?