Is seen from the pastbin.com, but I do not know who the author yes.
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}
Reproduced in: https: //www.cnblogs.com/Stephen/archive/2009/05/06/1450343.html