第三章第93页的汇编代码
push 0x1e380a6a ;hash of MessageBoxA
push 0x4fd18963 ;hash of ExitProcess
push 0x0c917432 ;hash of LoadLibraryA
mov esi,esp ; esi = addr of first function hash
lea edi,[esi-0xc] ; edi = addr to start writing function ①
........
lodsd
cmp eax, 0x1e380a6a
; LoadLibrary("user32")
jne find_functions
xchg eax, ebp
call [edi - 0x8] ; LoadLibraryA ②
xchg eax, ebp ; restore current
①处的地址是怎么得到的,指代什么?
②处,怎么判断出loadlibraryA的入口在[edi-0x8]?
堆栈是从高地址向低地址增长的
假如 现在栈顶地址为0x0010000C ESP=0x0010001C
push 0x1e380a6a ;hash of MessageBoxA 压入4个字节 ESP=0x00100018
push 0x4fd18963 ;hash of ExitProcess 压入4个字节 ESP=0x00100014
push 0x0c917432 ;hash of LoadLibraryA 压入4个字节 ESP=0x00100010
mov esi,esp ; esi = addr of first function hash
lea edi,[esi-0xc] ; edi = addr to start writing function ① 那这里的edi = [0x00100008] 这个地址完全是未使用的堆栈地址啊 下图是我在OD中调试的结果,本想解答的我 也晕了 求大神继续解答!