Closed OdinVex closed 2 years ago
I can add options in the future for these things. DOS stub was never really kept because unpacking the exe will generally invalidate the VLV stub information. A handful of games will fail to launch at all if the stub is left in after unpacking has been performed, so it was opt'd to be removed by default. I'll add an option to restore it though for those interested.
Adding options do zero out or recalculate the CRC can be added as well. Windows generally doesn't care at all about that data in the PE header, and since it's unpacked, Steam won't generally do anything to validate it either. However, I have had someone mention to me a game that they've seen used the crc to validate the file. (Meaning zeroing or recalculating it will fail that validation.) So for that, I'd probably opt for having 3 options:
Again this is something I can add later on. Right now Steamless is on the back burner for me while I focus on other projects. But I do have plans to redo things to make it both command-line friendly as well as importable to other projects that may wish to use it in their own mods.
I don't quite follow the first paragraph. The DOS stub is removed by SteamDRM and in its place, the VLV stub. I was talking about removing all of that VLV stub and restoring it with a commonly-recognized stub. (Zero entire VLV stub, copy bytes from common de facto stub.) It isn't removed by default (at least in any PE32s I've tested Steamless with.
I've come across a few games in my time that did check the CRC, but only to see if it was valid. Leaving the CRC can leak per-user information. Zero for non-critical software is valid (unless game checks CRC and doesn't consider Zero valid).
I put in a Pull Request adding them as optional features. I might can implement a combobox selection to give users the option to Leave, Zero, or Calculate.
The option to zero out the DOS stub is now available in the latest repo. (This is also now the default behavior.) Keeping the stub will leave it as-is from the packed file.
The option to recalculate checksums is now added and available in the latest repo.
The default behavior of Steamless is to now zero the checksum on all files as well rather than copy in the old one. (As Microsoft states, the only time the checksum is required is when loading drivers and specific system modules. This is not the case with game files, so zero as default is ideal.)
Stub Background: I've noticed some executables using per-user unique data in the VLV section. The original DOS stub is destroyed.
I've added an option in my own compile to write the de facto DOS stub. If anyone is curious, will post here.
CRC Background: Executables are recommended to have their CRC checksum values set correctly (or set to Zero).
I've added an option in my own compile to update the CRC checksum after unpack using a Microsoft API (the recommended way of doing this.) If anyone is curious, will post here. I believe it possible that the CRCs, sometimes unique per user because of the VLV header's original contents, could be used to identify the original user's build...
I added these options in my own compile to v2, v3.0, v3.1, both x86 and x64. If anyone is curious, will post here.