Closed rofenix2 closed 3 years ago
The library intends to be a general purpose solution and doesn't aim to cover custom scenarios such as modifying the mapped code. If you need that functionality then it is expected you do what you have already done and fork/edit your own copy to fit your needs.
The library works great but there are a few functionalities that should be public and not internal, for example the method GetExportedFunction in the class ExportDirectory is really helpful if after mapping you need to modify some exported global variable or need to retrieve any exported symbol.
For now i just added a method in LibraryMapper.cs that calls the GetExportedFunction with the own DllBaseAddress and works fine. Also i believe the immediate execution after mapping should be split into two methods, one for mapping and one for executing, the reason is some one might want to modify the mapped code (virtualize, encrypt, etc) or write into shared memory before DLLMain gets called.
Thanks for your time.