title: When a C++ program terminates on Windows what is the last function called by the termination stub?
body: <p>This question is about reverse engineering and the Microsoft Standard C Library.</p>
  
  <p>When a C program terimates gracefully, i.e. does a  <code>return 0;</code> at the end of <code>main()</code>. What all happens (generalize please). <strong>Specifically, what is the <em>last</em> function called by the C library?</strong></p>