Search code examples
windowsassembly32-bit

how to write assembly command in olydbg which load "user32.dll"?


I am using olydbg 1.10 and i would like to load the "user32.dll" dynamic library.

when I write the command push "user32.dll" it doesn't work.

I have to push it to the stack before i call kernel32.LoadLibraryA but the command

push 'user32.dll'
call kernel32.LoadLibraryA

this is the code I want to insert in the olyDbg:

push ebp ; 
mov ebp,esp
sub esp,4; 
push dword user32dll
call _LoadLibraryA@4

why does this not work, I can't figure it out.


Solution

  • As I understand, you need a space in memory to store string "user32.dll", and the push to stack pointer to this string.