1. enter等价于:

push ebp

mov ebp,  esp

在函数的入口时常用。

 

2. leave等价于:

mov esp,  ebp

pop ebp

 

 

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 

一段常见的代码格式如下:

.text:00401450 push    ebp
.text:00401451 mov     ebp, esp
.text:00401453 sub     esp, 18h
。。。。。。。。。。。。。。。。。。。。。。。。。(此处省略代码20行O(∩_∩)O哈哈~) 

.text:0040146E call    sub_401B10

.text:00401473 mov     eax, 1
.text:00401478 mov   esp,   ebp

 pop  ebp

xor eax,  eax 

.text:00401479 retn    0Ch 

 

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

用enter和leave替代了以后,就可以变成这个样子。

.text:00401450 enter

.text:00401453 sub     esp, 18h
。。。。。。。。。。。。。。。。。。。。。。。。。(此处省略代码20行O(∩_∩)O哈哈~) 

.text:0040146E call    sub_401B10

.text:00401473 mov     eax, 1
.text:00401478 leave

xor eax, eax 

.text:00401479 retn    0Ch 

相关文章:

  • 2021-07-23
  • 2022-12-23
  • 2021-08-17
  • 2021-11-13
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-06
  • 2021-07-19
  • 2021-09-11
  • 2021-06-29
  • 2021-09-02
相关资源
相似解决方案