I want to make a project for identifying malicious software. so is it possible to read .exe file to look for the malicious part? if yes how.
Until an exe runs its just a binary file, so yes you can read it. However a binary file doesn't have lines, its just a constant stream.
Most virus checkers use some form of pattern recognition where they are looking for a pattern of bytes, that might be either instructions or messages, within the file. If you find enough of these to match a known virus then you flag the file as problematic.