atom0s / Steamless

Steamless is a DRM remover of the SteamStub variants. The goal of Steamless is to make a single solution for unpacking all Steam DRM-packed files. Steamless aims to support as many games as possible.
Other
3.12k stars 195 forks source link

SizeOfImage is incorrectly calculated #27

Closed OdinVex closed 2 years ago

OdinVex commented 4 years ago

Some PE32s feature Sections out of order. A loop in RebuildSections adding together VirtualAddress and VirtualSize aligned to SectionAlignment (according to PE32 Specification) should be used to determine the 'biggest that will be mapped' into memory and accurately, the SizeOfImage.

atom0s commented 4 years ago

This is already a planned addition/fix; related to this issue as well: https://github.com/atom0s/Steamless/issues/17

OdinVex commented 4 years ago

Yeah I fixed the calculations on my fork but I didn't think you'd agree with the way I did it. Also added the optional CRC options (but not pushed to my branch yet).

atom0s commented 2 years ago

This is fixed in latest source/repo now. Will be in the next release.