Closed asivery closed 3 months ago
This did send me down quite a rabbit hole. It turns out that, for all I can see, Windows ignores the header's FIleAlignment
value. The Windows loader aligns the PointerToRawData
to 512 bytes (the "sector" size) when mapping the sections (512 often turns to be the default value of FileAlignment
).
But that's the only alignment that seems to be applied. I would be curious if anyone can find a working counter-example.
I will revert the patch.
@erocarrera I understand what you mean. If you wish, I can provide you a copy of the file in question.
Hi @asivery , yes please, that'd be great!
@erocarrera Sorry for the delay, here you go: salwrap.zip
Hello, Please let me know if this isn't a bug, but the library definitely doesn't align PE files aligned to 0x1000 correctly, and this did fix that.
Best regards.