how do I see if that string is that is malware
If you are reading executable files like .exe you will not be reading Strings. It will be a sequence of bytes.
As I understand AV software, they have large dictionaries of sequences of bytes that are in malware.
The AV software understands the structure of the executable files and knows where to look in them to find the sequence of bytes that that have been found in previously detected malware.
There are several read methods that you can use to read enough bytes to fill a large array where you can search for the malware byte sequence.
Once you have read the bytes from the file you compare them byte by byte for a match.
There could be classes and methods to help you do that, I'm not sure. Otherwise its loops and arrays.