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

Current Steam binary seems to not match any SHAs of known NA binaries #13

Open
Wesmania opened this issue Apr 17, 2023 · 6 comments
Open

Comments

@Wesmania
Copy link

The binary I downloaded in my Steam has this sha256sum:

042e9fef839eb1c7722cee971d5f50c132b018ec02aa0d4ae38dbc62d5a9daa8  NieRAutomata.exe

This does not match any sums in Utils.h. Moreover, I can't seem to find at least one of the patterns in FindSteamOffsets, for g_pGraphics. I opened the binary in Cutter and didn't find 48 85 db 0f 84 anywhere in the exe. Same goes for patterns in FindDenuvoSteamOffsets.

This is very confusing since steamdb claims that the binary has not changed in 2 years. I am on Linux, but the game runs via Proton so I'd expect the executable to be the same as in Windows. I have no idea where the issue lies, but maybe this report will be useful.

Also a note on symptoms:

  • At first the game crashes in bcrypt functions, that's because Proton has them stubbed out and always dereferences the handle as a pointer. After rebuilding the dll with the hash check removed, the crash happens near the end of FindSteamOffsets. Presumably because g_pGraphics search returns nullptr, which is then dereferenced.
@Wesmania
Copy link
Author

Even weirder: downloading a depot manually via Steam console gives me a binary with a known SHA256:

download_depot 524220 524221 4633942970953135000
5171bed09e6fec7b21bf0ea479dbd2e1b228695c67d1f0b478549a9be2f5726a  NieRAutomata.exe

It's indeed not the issue with 2BHook then, but still weird.

@Wesmania
Copy link
Author

Steam is replacing the binary on startup. Odd.

@Wesmania
Copy link
Author

Doing chown root:root and chmod -w is a workaround, and the dll does load without crashing.

@Martymoose98
Copy link
Owner

Martymoose98 commented Jun 14, 2023

nvm i actually do have a definition for the steam packed w/ steam drm. So it crashes if it doesn't know the sha? Actually that makes a bit of sense cause the offsets & sigs might change.

@Wesmania
Copy link
Author

Wesmania commented Jun 14, 2023

Crashing is linux-specific behaviour, Proton doesn't support windows bcrypt API fully and always tries to dereference one of the arguments that can be either a pointer or a special constant. It only crashes later because I removed the check altogether. I assume on Windows it just doesn't load further if the sha check fails.

@Martymoose98
Copy link
Owner

If you mean my SHA256 thing i still let you load it all that changes is it would say NieR:Automata (Unknown Version) in the debug console but if a critical sig isn't found it would probably crash for that i just warn %s is null! This may have fatal consequences! I have never ran this on linux tbh.

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

No branches or pull requests

2 participants