-
Notifications
You must be signed in to change notification settings - Fork 70
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
Memory validation and runtime module dump #122
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This implementation is Windows-only so that would have to change.
But this is not something that's needed for vanilla unity and is highly specific to particular games, so maybe we should expose hooks for preloader plugins in BepInEx to handle this instead?
If I am not mistaken, Preloader patches are applied after interop generation. The implementation I applied to BepInEx was before interop generation and after Cecil assembly definitions are generated. |
Memory region protection validation
Current main stream implementation of FindMethodSignature fails when the memory region is protected.
This leads to an access violation error.
This pull request implemented memory validation and set them to
execute_read_write
before signature scanning.Protection right is restore after signature scanning.
Runtime module dump to support obscure game assembly
Current main stream implementation of interop generation uses raw
GameAssembly.dll
andglobal-metadata.dat
.This will fail if the game is packed and if
global-metadata.dat
is embedded inGameAssembly.dll
.This pull request implemented runtime module dump.
global-metadata.dat
is extracted using pattern matching.global-metadata.dat
, so the output product can be used inil2cppdumper
.ILogger
is a required parameter for the considerations that this method may be used before interop generation. That is beforeCreate
.