This question has been asked quite a lot especially on stackoverflow, but the solutions/replies are not clear or extensive.
What I`m looking for is to build what Strings does from Sysinternals. My goal is to read any windows binary files and extract all the strings ASCII/UNICODE in a fast and efficient way.
At the moment I`m opening the file from disk, reading into a buffer, and then assigning that buffer into a vector and using booyer_moore search. This operation is pretty CPU expensive, especially when the file is big (a few mb) and because the code searches through "everything".
I've found this https://github.com/glmcdona/strings2 but it does not support x64 due to the approach taken, and I cannot seem to find any source code for the Sysinternals tool.
Would it be possible to show me (even some pseudo code) on how to approach this matter?