static int __cdecl pre_c_init (void) { managedapp = check_managed_app (); if (mingw_app_type) __set_app_type(_GUI_APP); else __set_app_type (_CONSOLE_APP); __onexitbegin = __onexitend = (_PVFV *) _encode_pointer ((_PVFV *)(-1)); * __MINGW_IMP_SYMBOL(_fmode) = _fmode; * __MINGW_IMP_SYMBOL(_commode) = _commode; #ifdef WPRFLAG _wsetargv(); #else _setargv(); #endif if (_MINGW_INSTALL_DEBUG_MATHERR) { if (! __defaultmatherr) { __setusermatherr (_matherr); __defaultmatherr = 1; } } if (__globallocalestatus == -1) { } return 0; }
extern "C" _MRTIMP void __cdecl __setusermatherr_m( _HANDLE_MATH_ERROR_M pf) { pusermatherr = (_HANDLE_MATH_ERROR_M) EncodePointer(pf); if (pf != 0) { __setusermatherr(_matherr); } _matherr_flag = 0; }
void fn004019E0(word32 ebp, Eq_3 * fs) { word32 * eax_14 = fs->ptr0000; fs->ptr0000 = fp - 0x00000014; __set_app_type(); globals->dw40312C = 0xFFFFFFFF; globals->dw403130 = 0xFFFFFFFF; __p__fmode(); *eax_14 = globals->dw403120; __p__commode(); *eax_14 = globals->dw40311C; Mem46[0x00403128:word32] = Mem43[_adjust_fdiv:word32]; fn00401BE0(); word32 esp_193 = fp + 0xFFFFFF6C; if (globals->dw403040 == 0x00000000) { __setusermatherr(); esp_193 = fp + 0xFFFFFF68; } fn00401BB0(); Eq_51 * esp_54 = esp_193 - 0x00000004; esp_54->dw0000 = 0x00403014; esp_54->dw0000 = 0x00403010; _initterm(); esp_54->dw0000 = fp - 0x00000070; esp_54->dw0000 = globals->dw403114; esp_54->dw0000 = fp - 0x00000068; Mem74[esp_54 - 0x00000010:word32] = fp - 0x00000074; esp_54->dw0000 = fp - 0x00000064; __getmainargs(); esp_54->dwFFFFFFF8 = 0x0040300C; esp_54->dwFFFFFFF4 = 0x00403000; _initterm(); __p__acmdln(); Eq_85 * esi_161 = dwLoc74; if (dwLoc74->b0000 == 0x22) { do { esi_161 = esi_161 + 1; bcu8 al_169 = esi_161->b0000; } while (al_169 == 0x00 || al_169 == 0x22); if (esi_161->b0000 == 0x22) { esi_161 = esi_161 + 1; goto l00401AEE; } } while (esi_161->b0000 >u 0x20) esi_161 = esi_161 + 1; l00401AEE: bcu8 al_99 = esi_161->b0000; while (al_99 != 0x00 && al_99 <=u 0x20) { esi_161 = esi_161 + 1; al_99 = esi_161->b0000; } Eq_80 eax_117; esp_54->tFFFFFFF0 = fp - 0x00000060; GetStartupInfoA(esp_54->tFFFFFFF0); if (0x00 != 0x00) eax_117 = dwLoc30 & 0x0000FFFF; else eax_117.u0 = 0x0000000A; esp_54->tFFFFFFF0 = eax_117; esp_54->ptrFFFFFFEC = esi_161; esp_54->dwFFFFFFE8 = 0x00000000; esp_54->tFFFFFFE4.u0 = 0x00000000; Eq_80 eax_127 = GetModuleHandleA(esp_54->tFFFFFFE4); esp_54->tFFFFFFE4 = eax_127; fn00401BFC(ebp, dwArg00, dwArg04, dwArg08); esp_54->tFFFFFFF0 = eax_127; exit(esp_54->tFFFFFFF0); fp->dwFFFFFFF8 = 0xFFFFFFFF; fs->ptr0000 = eax_14; return; }
static int __cdecl pre_c_init(void) { /* * Determine if this is a managed application */ managedapp = check_managed_app(); /* * Set __app_type properly */ #ifdef _WINMAIN_ __set_app_type(_GUI_APP); #else /* _WINMAIN_ */ __set_app_type(_CONSOLE_APP); #endif /* _WINMAIN_ */ /* * Mark this module as an EXE file so that atexit/_onexit * will do the right thing when called, including for C++ * d-tors. */ __onexitbegin = __onexitend = (_PVFV*)_encode_pointer((_PVFV*)(-1)); /* * Propogate the _fmode and _commode variables to the DLL */ *_IMP___FMODE = _fmode; *_IMP___COMMODE = _commode; #ifdef _M_IX86 /* * Set the local copy of the Pentium FDIV adjustment flag */ _adjust_fdiv = * _imp___adjust_fdiv; #endif /* _M_IX86 */ /* * Run the RTC initialization code for this DLL */ #ifdef _RTC _RTC_Initialize(); #endif /* _RTC */ /* * Call _setargv(), which will trigger a call to __setargv() if * SETARGV.OBJ is linked with the EXE. If SETARGV.OBJ is not * linked with the EXE, a dummy _setargv() will be called. */ #ifdef WPRFLAG _wsetargv(); #else /* WPRFLAG */ _setargv(); #endif /* WPRFLAG */ /* * If the user has supplied a _matherr routine then set * __pusermatherr to point to it. */ if (!__defaultmatherr) { __setusermatherr(_matherr); } #ifdef _M_IX86 _setdefaultprecision(); #endif /* _M_IX86 */ /* Enable per-thread locale if user asked for it */ if (__globallocalestatus == -1) { _configthreadlocale(-1); } return 0; }
void fn1310E4E5(Eq_281 * fs) { word32 * eax_14 = fs->ptr0000; fs->ptr0000 = fp - 0x00000014; __set_app_type(); __p__fmode(); *eax_14 = 0x00000000; __p__commode(); *eax_14 = 0x00000000; word32 eax_51 = Mem49[_adjust_fdiv:word32]; fn1310E63E(); word32 esp_193 = fp + 0xFFFFFF68; if (eax_51 == 0x00000000) { __setusermatherr(); esp_193 = fp + 0xFFFFFF64; } fn1310E629(); Eq_318 * esp_59 = esp_193 - 0x00000004; esp_59->dw0000 = fp - 0x00000080; esp_59->dw0000 = fp - 0x00000080; _initterm(); esp_59->tFFFFFFF4 = fp - 0x00000070; esp_59->dwFFFFFFF0 = eax_51; esp_59->dwFFFFFFEC = fp - 0x00000068; esp_59->dwFFFFFFE8 = fp - 0x00000074; esp_59->dwFFFFFFE4 = fp - 0x00000064; __getmainargs(); esp_59->dwFFFFFFDC = fp - 0x00000080; esp_59->dwFFFFFFD8 = fp - 0x00000080; _initterm(); word32 esi_161 = Mem85[_acmdln:word32]; if (esi_161->b0000 == 0x22) { l1310E597: do { esi_161 = esi_161 + 1; bcu8 al_171 = esi_161->b0000; } while (al_171 == 0x00 || al_171 == 0x22); if (esi_161->b0000 == 0x22) { l1310E5AA: esi_161 = esi_161 + 1; l1310E5AE: bcu8 al_98 = esi_161->b0000; if (al_98 != 0x00 && al_98 <=u 0x20) goto l1310E5AA; } else goto l1310E5AE; } else while (esi_161->b0000 >u 0x20) esi_161 = esi_161 + 1; Eq_57 eax_113; esp_59->tFFFFFFF4 = fp - 0x00000060; GetStartupInfoA(esp_59->tFFFFFFF4); word32 esp_109 = &esp_59->tFFFFFFF4; if (0x00 != 0x00) eax_113 = (word32) wLoc30; else { esp_59->tFFFFFFF4.u0 = 0x0000000A; eax_113 = esp_59->tFFFFFFF4; esp_109 = &esp_59->tFFFFFFF4; } Eq_439 * esp_115 = esp_109 - 0x00000004; esp_115->t0000 = eax_113; Mem118[esp_115 - 0x00000004:word32] = esi_161; esp_115->t0000.u0 = 0x00000000; esp_115->t0000.u0 = 0x00000000; Mem126[esp_115 - 0x0000000C:word32] = GetModuleHandleA(esp_115->t0000); esp_115->dw0016 = fn1310E09B(); exit(esp_115->dw0016); word32 ecx_137 = **dwLoc18; esp_115->ptr0012 = dwLoc18; esp_115->dw000E = ecx_137; _XcptFilter(); return; }
void __mingw_setusermatherr (int (__cdecl *f)(struct _exception *)) { stUserMathErr = f; __setusermatherr (f); }