-
Notifications
You must be signed in to change notification settings - Fork 35
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
System.BadImageFormatException: Invalid DOS signature #45
Comments
I guess it fails to load one of the Game Assemblies from the Managed Directory (which I copied into the libs folder) |
Perhaps I was a little hasty with the bug label, but, looks like the module that you're trying to protect has a dead DOS signature and dnlib doesn't like it, if you are able to do that you can pin your module as a file unless it harms your safety or send it to my mail ([email protected]) then I will check what's wrong with that. As I can see in dnlib sources it checks the first 2 bytes of the loading module it is MZ, which means your module doesn't even have it - if correct PE metadata is not caring you I can update dnlib sources and ignore verifying the metadata correctly. Probably Unity Game (Beat Saber) have their custom protection which removes MZ and I think this is not the only thing that they're removing. |
What would be good though to see which DLL causes the throw of that Exception |
I will add what DLL was resolved or not at the moment the problem goes by [REDACTED] Module, but I could be wrong. Can you send this file, please? |
It's actually not the DLL I want to obfuscate, it's one of the Managed game files, just deleted a bunch of unnecessary and it worked |
Great that problem is solved, I will bump to the new version soon also, probably the file you tried to obfuscate was an ELF file for Linux OS and not a PE. |
New version v0.4.2-alpha.11 has been pre-released, you could try to do the same things that you tried to do you will get more info about that, also protections much improved there =) If there are no plans to continue this issue you can close it. |
Idk why but I'm started getting the same issue after much obfuscating.
|
Looks like a memory bug idk, something is not disposed yet, I'm also disabled most of the dnlib checks for the DOS header and NT Header (PE). The problem is not in protections. |
Also though that. I think it is cause too many assemblies are loaded or too many references to them. |
Very strange, after moving all files to another directory and deleting the same libraries in the working directory it works! |
So, I made big changes in the new version of BitMono, probably this problem will never happen again, so let this issue be alive for a while |
Happens on every DLL for a Unity Game (Beat Saber) with either .NET Framework 4.7.2 or .NET Framework 4.8
The text was updated successfully, but these errors were encountered: