1

我第一次使用 ASM,在我继续之前,我需要知道我在写这篇文章时是否理解了所有内容。当前代码如下所示:

push 0xDEADBEEF      ; address of library name
mov eax, 0xDEADBEEF  ; address of LoadLibraryA

call eax        ; call LoadLibraryA

mov esi, eax    ; store returned address

push 0xDEADBEEF      ; address of function name
push esi        
mov eax, 0xDEADBEEF   ; address of GetProcAddress

call eax             ; call GetProcAddress
mov esi, eax         ; store returned address

push 0
push 0
push 0
call esi  ; call the function returned by GetProcAddress

0xDEADBEEF 只是我稍后会修补的虚拟地址。有什么问题吗?=)

4

1 回答 1

0

你通常不会GetProcAddress直接打电话。这是因为它是从 DLL 导出的。在这种情况下,链接器将做的是合成一个对符号GetProcAddress进行间接远调用的函数。__imp__GetProcAddress请参阅http://blogs.msdn.com/b/oldnewthing/archive/2006/07/24/676669.aspxhttp://blogs.msdn.com/b/oldnewthing/archive/2010/03/18/9980802 .aspx

于 2011-07-06T23:10:36.063 回答