Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

spyin on c++ app hiden startup

29 views
Skip to first unread message

Prroffessorr Fir Kenobi

unread,
Oct 4, 2015, 5:55:06 AM10/4/15
to
If I compile small (like empty) win32 c++ WinMain app to exe and disasembly it i see
some stubs of code there, containing such functions (i will post it as it my be helpfull and i would like to understand it most fully as possible)

00401000 <___mingw_CRTStartup>:
00401110 <__gnu_exception_handler@4>:
00401280 <_mainCRTStartup>:
004012a0 <_WinMainCRTStartup>:
004012c0 <_atexit>:
004012d0 <__onexit>:
004012e0 <___gcc_register_frame>:
0040132c <___gcc_deregister_frame>:
00401334 <_WinMain@16>:
00401340 <___dyn_tls_dtor@12>:
00401390 <___dyn_tls_init@12>:
00401420 <___tlregdtor>:
00401430 <___cpu_features_init>:
00401510 <__fpreset>:
00401520 <___report_error>:
00401580 <___write_memory.part.0>:
00401690 <__pei386_runtime_relocator>:
00401870 <___do_global_dtors>:
004018a0 <___do_global_ctors>:
004018f0 <___main>:
00401910 <___mingwthr_run_key_dtors.part.0>:
00401970 <____w64_mingwthr_add_key_dtor>:
00401a00 <____w64_mingwthr_remove_key_dtor>:
00401a90 <___mingw_TLScallback>:
00401b30 <___getmainargs>:
00401b38 <__setmode>:
00401b40 <___p__fmode>:
00401b48 <___p__environ>:
00401b50 <__cexit>:
00401b58 <_signal>:
00401b60 <_fwrite>:
00401b68 <_vfprintf>:
00401b70 <_abort>:
00401b78 <_memcpy>:
00401b80 <_calloc>:
00401b88 <_free>:
00401b90 <_SetUnhandledExceptionFilter@4>:
00401b98 <_ExitProcess@4>:
00401ba0 <_GetModuleHandleA@4>:
00401ba8 <_GetProcAddress@8>:
00401bb0 <_VirtualQuery@12>:
00401bb8 <_VirtualProtect@16>:
00401bc0 <_GetCommandLineA@0>:
00401bc8 <_GetStartupInfoA@4>:
00401bd0 <_EnterCriticalSection@4>:
00401bd8 <_TlsGetValue@4>:
00401be0 <_GetLastError@0>:
00401be8 <_LeaveCriticalSection@4>:
00401bf0 <_DeleteCriticalSection@4>:
00401bf8 <_InitializeCriticalSection@4>:
00401c00 <_main>:
00401ce0 <_register_frame_ctor>:
00401cfc <__CTOR_LIST__>:
00401d00 <.ctors.65535>:
00401d08 <__DTOR_LIST__>:

I found thet probably source related to this stub is maybe here

http://sourceforge.net/p/mingw/mingw-org-wsl/ci/21762bb4a1bd0c88c38eead03f59e8d994349e83/tree/src/libcrt/crt/

(could someone acknowledge that?)

But still i cannot track the entry point and full order of operations and see clearly what
is injected and esp the prder of callings,

could someone help in understanding that
writing a couple of words of short comment like tutorial explaining what is called where
and so on?

tnx
0 new messages