Windows VC++ 2010 code before my main() function executes.
I've been compiling simple Hello World applications in Visual Studio 2010 with the C++ compiler (Win32 is the target) to see what the product looks like under the microscope when I run it with the Immunity debugger.  What I've noticed, however, is that there is some code (quite a bit of code, actually) that gets run before my main function is reached.  A lot of this stuff looks security related or maybe prepping the system to manage processes or what not, but there's just a TON of it there.  Morever, the EntryPoint part of the PE file header seems to point into the interior of my .text segment, while it appears that my main() function is resting at the very beginning of the .text segment.  My question is this:  is there some good documentation regarding this prelude that is getting slapped onto the front of my code AND/OR is the main() function typically placed at the very beginning of the .text segment by the VC++ compiler?  Thanks for any insight you have!
Windows VC++ 2010 code before my main() function executes.
===

I've been compiling simple Hello World applications in Visual Studio 2010 with the C++ compiler (Win32 is the target) to see what the product looks like under the microscope when I run it with the Immunity debugger.  What I've noticed, however, is that there is some code (quite a bit of code, actually) that gets run before my main function is reached.  A lot of this stuff looks security related or maybe prepping the system to manage processes or what not, but there's just a TON of it there.  Morever, the EntryPoint part of the PE file header seems to point into the interior of my .text segment, while it appears that my main() function is resting at the very beginning of the .text segment.  My question is this:  is there some good documentation regarding this prelude that is getting slapped onto the front of my code AND/OR is the main() function typically placed at the very beginning of the .text segment by the VC++ compiler?  Thanks for any insight you have!