Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hash truncation for MWII (and MWIII technically) #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Nico-Posada
Copy link

@Nico-Posada Nico-Posada commented Jan 3, 2024

Hashes in MWII and MWIII aren't truncated to 60 bits
image

There are many examples I could give as proof, but this is a snippet of the assembly that registers the lua C functions. The args are (luaVM, hash, func address). You can see with rdx being set to many different hash values, some (highlighted) are values that are higher than 0xFFFFFFFFFFFFFFF. Updating the decompiler so that it doesn't truncate the hashes for MWII and MWIII would make it much better to avoid confusion.

Edit: I was making this comment with the regular 0x7FFFFFFFFFFFFFFF truncation in mind, slight brain fart. Point still stands though, but now every single hash in that screenshot is proof except for the second one.

 - hashes in MWII and MWIII are not truncated to 60 bits, fix accordingly
 - string formatting fix so hashes are fully 0-padded to 16 chars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant