How to determine the header size of PE file
To reach the IMAGE_FILE_HEADER structure, please confirm the DOS-header "MZ" (the first 2 bytes), then find out the members of DOS-root header "E _ LFANEW" and skip so many bytes from the beginning of the file. After verifying the signature you found there, the file header of the IMAGE_FILE_HEADER structure starts immediately after it.