Entrance binary security procedures _

1, the real entrance procedures 

 

(1) main or WinMain is "user specified grammar entry", instead of "application entry." Application entry usually start function.

VC6 stack by calling view

(2) mainCRTStartup and wmainCRTStartup start function is multi-byte encoding and Unicode encoding console environment.
And WinMainCRTStartup and wWinMainCRTStartup windows environment is multi-byte encoding and Unicode encoding start function.

(3) Modify entry function: project right -> Setting

 

2, main functions of identification:


Function main function is called before the first call is as follows:

GetVersion () // get operating system version
_heap_init () // initialize the stack space
GetCommandLineA () // get command line arguments
_crtGetEnvironmentStringsA ()
_setargv ()
_setenvp ()
_cinit ()

 

These function calls will be called after the main function, the main function according to the characteristics of the call, press the 3 parameters onto the stack as a function of the parameters.

 

push three parameters, add esp, 0C

 

Guess you like

Origin www.cnblogs.com/klmyoil/p/10980874.html