是从pastbin.com上看到的, 但是不知道作者是谁.
Code
1#include <stdio.h>
2
3int getenv(char* ptr[]){
4 while(*ptr) printf("%s\n", *ptr++);
5 return 0;
6}
7
8int __declspec(naked) __cdecl main(){
9 _asm{
10 add esp, 0xc
11 mov edi, [esp]
12 add esp, -0xc
13 push edi
14 call getenv
15 pop edi
16 retn
17 }
18}
1#include <stdio.h>
2
3int getenv(char* ptr[]){
4 while(*ptr) printf("%s\n", *ptr++);
5 return 0;
6}
7
8int __declspec(naked) __cdecl main(){
9 _asm{
10 add esp, 0xc
11 mov edi, [esp]
12 add esp, -0xc
13 push edi
14 call getenv
15 pop edi
16 retn
17 }
18}
转载于:https://www.cnblogs.com/Stephen/archive/2009/05/06/1450343.html