Function at 0x40806a
Capabilities:
Terminate process

Disassembly:
push ebp
sub esp, 0x410
lea ebp, [esp - 4]
mov eax, dword [0x41208c]
xor eax, ebp
mov dword [ebp + 0x410], eax
push 0x48
mov eax, 0x40a0dc
call fcn.0040943e
lea eax, [edi + 0xac]
push eax
mov ecx, edi
call sub.MFC80U.DLL_Ordinal_977
lea eax, [edi + 0x138]
push eax
mov ecx, edi
call sub.MFC80U.DLL_Ordinal_977
lea eax, [edi + 0x1c8]
push eax
mov ecx, edi
call sub.MFC80U.DLL_Ordinal_977
lea eax, [edi + 0x258]
push eax
mov ecx, edi
call sub.MFC80U.DLL_Ordinal_977
lea eax, [edi + 0x308]
push eax
mov ecx, edi
call sub.MFC80U.DLL_Ordinal_977
lea eax, [edi + 0x4b8]
push eax
mov ecx, edi
call sub.MFC80U.DLL_Ordinal_977
lea eax, [edi + 0x56c]
push eax
mov ecx, edi
call sub.MFC80U.DLL_Ordinal_977
or dword [edi + 0x58], 0x20
mov dword [edi + 0x134], edi
mov dword [edi + 0x1c0], edi
mov dword [edi + 0x250], edi
mov dword [edi + 0x2e0], edi
mov dword [edi + 0x390], edi
mov dword [edi + 0x540], edi
mov dword [edi + 0x5f4], edi
mov byte [edi + 0x620], 0
call sub.MFC80U.DLL_Ordinal_1079
mov eax, dword [eax + 8]
push 0x104
lea ecx, [ebp]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor esi, esi
push esi
push esi
lea eax, [ebp + 0x208]
push eax
lea eax, [ebp + 0x408]
push eax
lea eax, [ebp]
push eax
call dword [sym.imp.MSVCR80.dll__wsplitpath]
add esp, 0x14
lea eax, [ebp + 0x408]
push eax
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MFC80U.DLL_Ordinal_283]
lea eax, [ebp + 0x208]
push eax
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], esi
call dword [sym.imp.MFC80U.DLL_Ordinal_283]
lea ecx, [ebp - 0x14]
call dword [sym.imp.MFC80U.DLL_Ordinal_293]
mov byte [ebp - 4], 2
cmp word [ebp + 0x208], si
je 0x4081f2
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00403692
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call dword [sym.imp.MFC80U.DLL_Ordinal_774]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax - 0xc]
dec eax
push eax
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
call dword [sym.imp.MFC80U.DLL_Ordinal_3990]
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call dword [sym.imp.MFC80U.DLL_Ordinal_774]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
call sub.apperr.dll_HD_Create_App_Error_Handler
lea ebx, [edi + 0x628]
mov esi, ebx
mov dword [ebp - 0x10], eax
call fcn.00405003
mov esi, dword [ebp - 0x10]
push ebx
call fcn.00403a48
mov eax, dword [ebx]
test eax, eax
je 0x40821e
push eax
call dword [sym.imp.hcreg9.dll_hcreg_SetErrorHandler]
pop ecx
lea ecx, [ebp - 0x18]
call dword [sym.imp.MFC80U.DLL_Ordinal_293]
mov byte [ebp - 4], 5
push dword [ebp - 0x14]
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.hcreg9.dll_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t______cdecl_GetAppKey_wchar_t_const__]
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 6
call dword [sym.imp.MFC80U.DLL_Ordinal_774]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 5
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
push 0x40ce74
lea ecx, [ebp - 0x18]
call dword [sym.imp.MFC80U.DLL_Ordinal_1472]
test eax, eax
je 0x408484
lea eax, [ebp - 0x34]
push eax
mov byte [edi + 0x620], 1
call dword [sym.imp.hcreg9.dll_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t______cdecl_GetDriverDirectory_void_]
pop ecx
mov byte [ebp - 4], 7
push dword [eax]
mov esi, dword [sym.imp.heidi9.dll_public:_void___thiscall_HT_String::constructor_wchar_t_const__]
lea ecx, [ebp - 0x30]
call esi
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 9
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov eax, dword [ebp - 0x28]
test eax, eax
jg 0x4082b0
xor eax, eax
test eax, eax
jne 0x4082b0
push 0
call dword [sym.imp.MSVCR80.dll_exit]
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.hcreg9.dll_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t______cdecl_GetPMPDirectory_void_]
pop ecx
mov byte [ebp - 4], 0xa
push dword [eax]
lea ecx, [ebp - 0x50]
call esi
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 0xc
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov eax, dword [ebp - 0x28]
test eax, eax
jg 0x4082e0
xor eax, eax
test eax, eax
je 0x4082a8
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.hcreg9.dll_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t______cdecl_GetPlotStylesDirectory_void_]
pop ecx
mov byte [ebp - 4], 0xd
push dword [eax]
lea ecx, [ebp - 0x44]
call esi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0xf
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov eax, dword [ebp - 0x28]
test eax, eax
jg 0x408310
xor eax, eax
test eax, eax
je 0x4082a8
mov esi, dword [ebx]
test esi, esi
je 0x40839c
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.hcreg9.dll_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t______cdecl_GetProductName_void_]
pop ecx
mov byte [ebp - 4], 0x10
mov eax, dword [eax]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 0x5c]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0xf
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov esi, dword [ebx]
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.hcreg9.dll_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t______cdecl_GetProgramName_void_]
pop ecx
mov byte [ebp - 4], 0x11
mov eax, dword [eax]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 0x60]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0xf
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov esi, dword [ebx]
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.hcreg9.dll_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t______cdecl_GetCompanyName_void_]
pop ecx
mov byte [ebp - 4], 0x12
mov eax, dword [eax]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 0x64]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0xf
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov ecx, dword [ebx]
mov eax, dword [ecx]
push 0x40de88
call dword [eax + 0x24]
cmp dword [edi + 0x624], 0
jne 0x408408
push 0xa4
call dword [sym.imp.heidi9.dll_public:_static_void____cdecl_HT_Object::operator_new_unsigned_int_]
pop ecx
mov dword [ebp - 0x10], eax
test eax, eax
mov byte [ebp - 4], 0x13
je 0x4083e6
mov esi, dword [ebx]
push 0
push ecx
mov eax, esp
mov dword [ebp - 0x54], esp
push eax
call fcn.00403a48
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.plcfmgr.dll_public:_void___thiscall_HT_Plot_Config_Manager::constructor_class_HT_String___class_HT_String___class_HT_String___class_HT_Smart_Pointer_class_HT_Error_Handler___unsigned_long_int_]
mov dword [ebp - 0x10], eax
jmp 0x4083ea
and dword [ebp - 0x10], 0
lea esi, [edi + 0x624]
mov byte [ebp - 4], 0xf
call fcn.00405003
mov esi, dword [ebp - 0x10]
lea eax, [edi + 0x624]
push eax
call fcn.00403a48
mov esi, dword [edi + 0x624]
lea eax, [ebp - 0x10]
push eax
call fcn.00403a48
lea eax, [ebp - 0x10]
push eax
lea eax, [edi + 0x624]
push eax
mov byte [ebp - 4], 0x14
call fcn.00405246
lea esi, [ebp - 0x10]
mov byte [ebp - 4], 0xf
call fcn.00405003
mov esi, dword [ebx]
lea eax, [ebp - 0x10]
push eax
call fcn.00403a48
lea eax, [ebp - 0x10]
push eax
push ebx
mov byte [ebp - 4], 0x15
call fcn.00405246
lea esi, [ebp - 0x10]
mov byte [ebp - 4], 0xf
call fcn.00405003
mov byte [ebp - 4], 0xc
mov esi, dword [sym.imp.heidi9.dll_public_virtual:_void___thiscall_HT_String::destructor_void_]
lea ecx, [ebp - 0x44]
mov byte [edi + 0x642], 1
call esi
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 9
call esi
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 5
call esi
lea ecx, [ebp - 0x18]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
lea ecx, [ebp - 0x14]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
lea ecx, [ebp - 0x20]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x410]
xor ecx, ebp
call fcn.00409267
add ebp, 0x414
leave
ret