Memory validation and runtime module dump#122
Conversation
js6pak
left a comment
There was a problem hiding this comment.
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_writebefore 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.dllandglobal-metadata.dat.This will fail if the game is packed and if
global-metadata.datis embedded inGameAssembly.dll.This pull request implemented runtime module dump.
global-metadata.datis extracted using pattern matching.global-metadata.dat, so the output product can be used inil2cppdumper.ILoggeris a required parameter for the considerations that this method may be used before interop generation. That is beforeCreate.