I need byte size, IMAGE_OPTIONAL_HEADER.SizeOfImage appears to be rounded up to (unsure) boundary and is greater than real file size.
I need byte size, IMAGE_OPTIONAL_HEADER.SizeOfImage appears to be rounded up to (unsure) boundary and
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
IMAGE_OPTIONAL_HEADER.SizeOfImageis the size of the loaded executable/dll in virtual memory.It is not the same as the size on disk.
You can calculate it with
VirtualAddress + VirtualSizeof the last section.IMAGE_OPTIONAL_HEADER.SizeOfImageis that value rounded up to the value ofIMAGE_OPTIONAL_HEADER.SectionAlignment(usually the same as the page size).