pefixup: Add timestamps to PE fixup step

Needed for some anti cheats to be happy.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Link: https://github.com/ValveSoftware/Proton/pull/4880
This commit is contained in:
Joshua Ashton 2021-06-02 15:25:31 +01:00 committed by Arkadiusz Hiler
parent 066f2dccd8
commit 74a40b17aa

View file

@ -13,6 +13,8 @@ for path in sys.argv[1:]:
section.Characteristics &= ~pefile.SECTION_CHARACTERISTICS['IMAGE_SCN_CNT_INITIALIZED_DATA']
section.Characteristics &= ~pefile.SECTION_CHARACTERISTICS['IMAGE_SCN_ALIGN_MASK']
pe.FILE_HEADER.TimeDateStamp = 1622588288
pe.OPTIONAL_HEADER.CheckSum = pe.generate_checksum()
perm = stat.S_IMODE(os.stat(path).st_mode)