Hello Hackforums.
I'm coding in C++ a manual DLL mapper with a custom GetProcAddress.
I tried to load a DLL I created, and all works fine. I can resolve an exported function, and call it.
But when I try with user32.dll to call MessageBoxW, it crashes.
To manual map, I follow these steps :
Reading file and putting in memory
Find and check headers
Allocate memory for mapping DLL (virtual alloc)
Copy headers and sections
Fix relocations
Fix imports
Call entry point
Even on user32, everything works fine, and I'm able to get a handle that looks valid, i can even find a valid address for my function from GetProcAddress, but when I call it, I get a crash.
Is there something to do in addition on Windows DLL ? It works perfectly on my owns dlls.
Thank you very much :)
I'm coding in C++ a manual DLL mapper with a custom GetProcAddress.
I tried to load a DLL I created, and all works fine. I can resolve an exported function, and call it.
But when I try with user32.dll to call MessageBoxW, it crashes.
To manual map, I follow these steps :
Reading file and putting in memory
Find and check headers
Allocate memory for mapping DLL (virtual alloc)
Copy headers and sections
Fix relocations
Fix imports
Call entry point
Even on user32, everything works fine, and I'm able to get a handle that looks valid, i can even find a valid address for my function from GetProcAddress, but when I call it, I get a crash.
Is there something to do in addition on Windows DLL ? It works perfectly on my owns dlls.
Thank you very much :)


![[Image: Annotation-2020-01-14-124512.png]](https://i.ibb.co/BCScYTK/Annotation-2020-01-14-124512.png)
![[Image: Annotation-2020-01-15-105647.png]](https://i.ibb.co/q11wkHm/Annotation-2020-01-15-105647.png)