Function at 0x40d300
Capabilities:
Check for time delay via gettickcount
Create pipe
Read .ini file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41959b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x248
mov dword [ebp - 0x1f4], ecx
mov dword [ebp - 0xbc], 0xffffffff
push 0x420c90
push 0
push 0x420c9c
push 0x420ca0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
test eax, eax
je 0x40dd74
call fcn.00406350
cmp dword [eax + 0xc8], 3
je 0x40d36d
call fcn.00406350
cmp dword [eax + 0xc8], 0
jne 0x40dd74
push 0x420ca8
push 0
push 0x420cb4
push 0x420cb8
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [ebp - 0x144], eax
mov dword [ebp - 0x140], 0x10
push 1
push str.Initialising_C1...
push 0
call fcn.00402610
mov ecx, eax
add ecx, 0xd0
call sub.MFC42.DLL_CStatusBar::SetPaneText
cmp dword [ebp - 0x140], 0
je 0x40d409
push 0
lea eax, [ebp - 0xbc]
push eax
push 0
call dword [sym.imp.CpuDriverInterface.dll_public:_static_class_CCncMemI____cdecl_CCncMemI::Instance_void_]
mov dword [ebp - 0x1f8], eax
mov ecx, dword [ebp - 0x1f8]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x1f8]
call dword [edx + 4]
cmp dword [ebp - 0xbc], 0xffffffff
jne 0x40d405
mov eax, dword [ebp - 0x140]
sub eax, 1
mov dword [ebp - 0x140], eax
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40d407
jmp 0x40d409
jmp 0x40d3af
cmp dword [ebp - 0xbc], 0xffffffff
je 0x40dd07
mov ecx, dword [ebp - 0xbc]
push ecx
call dword [sym.imp.CpuDriverInterface.dll_public:_static_class_CCncMemI____cdecl_CCncMemI::Instance_void_]
mov dword [ebp - 0x1fc], eax
mov edx, dword [ebp - 0x1fc]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1fc]
call dword [eax + 0x3c]
mov byte [ebp - 0x148], al
mov ecx, dword [ebp - 0x148]
and ecx, 0xff
test ecx, ecx
jne 0x40d4b8
lea edx, [ebp - 0xbc]
push edx
call dword [sym.imp.CpuDriverInterface.dll_public:_static_class_CCncMemI____cdecl_CCncMemI::Instance_void_]
mov dword [ebp - 0x200], eax
mov eax, dword [ebp - 0x200]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x200]
call dword [edx + 8]
push 1
push str.CNC_already_in_use
push 0
call fcn.00402610
mov ecx, eax
add ecx, 0xd0
call sub.MFC42.DLL_CStatusBar::SetPaneText
push 0
push 0x34
push str.Internal_error__CPU_DRIVER_Not_Locking___continue_anyway__
call sub.MFC42.DLL_AfxMessageBox
cmp eax, 6
je 0x40d4b8
call fcn.00402610
mov dword [eax + 0x154], 1
xor eax, eax
jmp 0x40e416
push 0x420d24
push 0
push 0x420d30
push 0x420d3c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [ebp - 0x10], al
mov eax, dword [ebp - 0x10]
and eax, 0xff
neg eax
sbb eax, eax
neg eax
mov dword [ebp - 0x154], eax
push 1
push str.Resetting_CNC_...
push 0
call fcn.00402610
mov ecx, eax
add ecx, 0xd0
call sub.MFC42.DLL_CStatusBar::SetPaneText
mov ecx, dword [ebp - 0x154]
push ecx
mov edx, dword [ebp - 0xbc]
push edx
call dword [sym.imp.CpuDriverInterface.dll_public:_static_class_CCncMemI____cdecl_CCncMemI::Instance_void_]
mov dword [ebp - 0x204], eax
mov eax, dword [ebp - 0x204]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x204]
call dword [edx + 0x18]
push 0x420d58
push 0
push 0x420d64
push str.Fapi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
cmp eax, 5
jb 0x40d944
call fcn.004096b9
xor ecx, ecx
mov cx, word [eax + 0x2e]
mov dword [ebp - 0x158], ecx
cmp dword [ebp - 0x158], 8
jb 0x40d944
lea ecx, [ebp - 0x180]
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x158]
push edx
push str.C:FidiaLoadersSid_d____.BIN
lea eax, [ebp - 0x180]
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [ebp - 0x15c]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x17c]
call sub.MFC42.DLL_CFileFind::CFileFind
mov byte [ebp - 4], 2
push 0
lea ecx, [ebp - 0x180]
call fcn.00402650
push eax
lea ecx, [ebp - 0x17c]
call sub.MFC42.DLL_CFileFind::FindFile
mov dword [ebp - 0x160], eax
cmp dword [ebp - 0x160], 1
jne 0x40d639
lea ecx, [ebp - 0x17c]
call sub.MFC42.DLL_CFileFind::FindNextFileA
mov dword [ebp - 0x160], eax
lea ecx, [ebp - 0x1c8]
push ecx
lea ecx, [ebp - 0x17c]
call sub.MFC42.DLL_CFileFind::GetFilePath
mov dword [ebp - 0x208], eax
mov edx, dword [ebp - 0x208]
mov dword [ebp - 0x20c], edx
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x15c]
call fcn.004183da
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1c8]
call fcn.004183d4
jmp 0x40d5d4
lea ecx, [ebp - 0x15c]
push ecx
push 0x42ded0
call fcn.0040e550
and eax, 0xff
test eax, eax
je 0x40d6f9
lea ecx, [ebp - 0x188]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x158]
push edx
push str.Unable_to_find_any_sid_image_for_this_cpu__cpu__d_
lea eax, [ebp - 0x188]
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
push 0
push 0
lea ecx, [ebp - 0x188]
call fcn.00402650
push eax
call sub.MFC42.DLL_AfxMessageBox
call fcn.00402610
mov dword [eax + 0x154], 1
mov dword [ebp - 0x1cc], 0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x188]
call fcn.004183d4
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x17c]
call fcn.004187b8
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x15c]
call fcn.004183d4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x180]
call fcn.004183d4
mov eax, dword [ebp - 0x1cc]
jmp 0x40e416
push 0x420dc4
lea ecx, [ebp - 0x15c]
call fcn.00402650
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [ebp - 0x184], eax
cmp dword [ebp - 0x184], 0
je 0x40d86e
mov dword [ebp - 0x18c], 0x1000000
jmp 0x40d744
mov ecx, dword [ebp - 0x18c]
add ecx, 0x10000
mov dword [ebp - 0x18c], ecx
mov edx, dword [ebp - 0x184]
mov eax, dword [edx + 0xc]
and eax, 0x10
test eax, eax
jne 0x40d859
mov dword [ebp - 0x190], 0
push 0x10000
lea ecx, [ebp - 0x190]
push ecx
mov edx, dword [ebp - 0x18c]
push edx
mov eax, dword [ebp - 0xbc]
push eax
call dword [sym.imp.CpuDriverInterface.dll_public:_static_class_CCncMemI____cdecl_CCncMemI::Instance_void_]
mov dword [ebp - 0x210], eax
mov ecx, dword [ebp - 0x210]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x210]
call dword [edx + 0x10]
mov byte [ebp - 0x194], al
mov eax, dword [ebp - 0x194]
and eax, 0xff
test eax, eax
jne 0x40d812
push str.Driver_Map_Command_failed__
mov ecx, dword [ebp - 0x1f4]
call sub.MFC42.DLL_CWnd::SetWindowTextA
call fcn.00402610
mov dword [eax + 0x154], 1
mov dword [ebp - 0x1d0], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x17c]
call fcn.004187b8
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x15c]
call fcn.004183d4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x180]
call fcn.004183d4
mov eax, dword [ebp - 0x1d0]
jmp 0x40e416
mov ecx, dword [ebp - 0x184]
push ecx
push 0x10000
push 1
mov edx, dword [ebp - 0x190]
push edx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
mov eax, dword [ebp - 0xbc]
push eax
call dword [sym.imp.CpuDriverInterface.dll_public:_static_class_CCncMemI____cdecl_CCncMemI::Instance_void_]
mov dword [ebp - 0x214], eax
mov ecx, dword [ebp - 0x214]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x214]
call dword [edx + 0x14]
jmp 0x40d732
mov eax, dword [ebp - 0x184]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
jmp 0x40d914
push 0
push 0
lea ecx, [ebp - 0x15c]
push ecx
push str.Unable_to_open_sid
lea edx, [ebp - 0x1d4]
push edx
call sub.MFC42.DLL_operator_2
mov dword [ebp - 0x218], eax
mov eax, dword [ebp - 0x218]
mov dword [ebp - 0x21c], eax
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x21c]
call fcn.00402650
push eax
call sub.MFC42.DLL_AfxMessageBox
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1d4]
call fcn.004183d4
call fcn.00402610
mov dword [eax + 0x154], 1
mov dword [ebp - 0x1d8], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x17c]
call fcn.004187b8
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x15c]
call fcn.004183d4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x180]
call fcn.004183d4
mov eax, dword [ebp - 0x1d8]
jmp 0x40e416
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x17c]
call fcn.004187b8
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x15c]
call fcn.004183d4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x180]
call fcn.004183d4
mov dword [ebp - 0x14c], 0
push 0x10000
lea ecx, [ebp - 0x14c]
push ecx
call dword [sym.imp.CpuDriverInterface.dll_public:_static_class_F2MemoryAddress____cdecl_F2MemoryAddress::Instance_void_]
mov dword [ebp - 0x220], eax
mov edx, dword [ebp - 0x220]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x220]
call dword [eax + 0x50]
push eax
mov ecx, dword [ebp - 0xbc]
push ecx
call dword [sym.imp.CpuDriverInterface.dll_public:_static_class_CCncMemI____cdecl_CCncMemI::Instance_void_]
mov dword [ebp - 0x224], eax
mov edx, dword [ebp - 0x224]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x224]
call dword [eax + 0x10]
mov byte [ebp - 0x150], al
mov ecx, dword [ebp - 0x150]
and ecx, 0xff
test ecx, ecx
jne 0x40da15
lea edx, [ebp - 0xbc]
push edx
call dword [sym.imp.CpuDriverInterface.dll_public:_static_class_CCncMemI____cdecl_CCncMemI::Instance_void_]
mov dword [ebp - 0x228], eax
mov eax, dword [ebp - 0x228]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x228]
call dword [edx + 8]
push 1
push str.Cpu5_6_7_Mapping_memory_Failed
push 0
call fcn.00402610
mov ecx, eax
add ecx, 0xd0
call sub.MFC42.DLL_CStatusBar::SetPaneText
push 0
push 0
push str.Internal_error__CncDriver_Not_Mapping
call sub.MFC42.DLL_AfxMessageBox
call fcn.00402610
mov dword [eax + 0x154], 1
xor eax, eax
jmp 0x40e416
mov eax, dword [ebp - 0xbc]
push eax
call dword [sym.imp.CpuDriverInterface.dll_public:_static_class_CCncMemI____cdecl_CCncMemI::Instance_void_]
mov dword [ebp - 0x22c], eax
mov ecx, dword [ebp - 0x22c]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x22c]
call dword [edx + 0x14]
call fcn.00406350
mov dword [eax + 0xc8], 3
push 1
push str.Starting_CNC_...
push 0
call fcn.00402610
mov ecx, eax
add ecx, 0xd0
call sub.MFC42.DLL_CStatusBar::SetPaneText
push 1
mov eax, dword [ebp - 0xbc]
push eax
call dword [sym.imp.CpuDriverInterface.dll_public:_static_class_CCncMemI____cdecl_CCncMemI::Instance_void_]
mov dword [ebp - 0x230], eax
mov ecx, dword [ebp - 0x230]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x230]
call dword [edx + 0x1c]
mov byte [ebp - 0x198], al
mov eax, dword [ebp - 0x198]
and eax, 0xff
test eax, eax
jne 0x40daac
push 0
push 0
push str.CPU5_6_7_start_manager_is_not_running
call sub.MFC42.DLL_AfxMessageBox
push 0x3e8
call fcn.0040ce21
add esp, 4
push 1
push str.Wait_ok_from_CNC...
push 0
call fcn.00402610
mov ecx, eax
add ecx, 0xd0
call sub.MFC42.DLL_CStatusBar::SetPaneText
mov byte [ebp - 0x10], 1
mov dword [ebp - 0x1a0], 0
mov dword [ebp - 0x19c], 2
lea ecx, [ebp - 0x19c]
push ecx
mov edx, dword [ebp - 0xbc]
push edx
call dword [sym.imp.CpuDriverInterface.dll_public:_static_class_CCncMemI____cdecl_CCncMemI::Instance_void_]
mov dword [ebp - 0x234], eax
mov eax, dword [ebp - 0x234]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x234]
call dword [edx + 0x20]
cmp dword [ebp - 0x19c], 0
je 0x40db39
mov eax, dword [ebp - 0x1a0]
add eax, 1
mov dword [ebp - 0x1a0], eax
push 0x64
call fcn.0040ce21
add esp, 4
cmp dword [ebp - 0x19c], 0
je 0x40db4b
cmp dword [ebp - 0x1a0], 0x14
jl 0x40daec
cmp dword [ebp - 0x144], 5
je 0x40db5d
cmp dword [ebp - 0x144], 0x32
jne 0x40db8b
cmp dword [ebp - 0x19c], 1
jne 0x40db74
push 0
push 0
push str.CPU5_6_7_SID_CHECKSUM_ERROR
call sub.MFC42.DLL_AfxMessageBox
cmp dword [ebp - 0x19c], 2
jne 0x40db8b
push 0
push 0
push str.CPU5_6_7__SID_unknown_start_error.
call sub.MFC42.DLL_AfxMessageBox
push 1
push str.Ok_from_CNC_...
push 0
call fcn.00402610
mov ecx, eax
add ecx, 0xd0
call sub.MFC42.DLL_CStatusBar::SetPaneText
lea ecx, [ebp - 0xbc]
push ecx
call dword [sym.imp.CpuDriverInterface.dll_public:_static_class_CCncMemI____cdecl_CCncMemI::Instance_void_]
mov dword [ebp - 0x238], eax
mov edx, dword [ebp - 0x238]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x238]
call dword [eax + 8]
push 1
push str.Starting_communications...
push 0
call fcn.00402610
mov ecx, eax
add ecx, 0xd0
call sub.MFC42.DLL_CStatusBar::SetPaneText
push 0x2710
push 0
mov ecx, dword [ebp - 0x1f4]
add ecx, 0x64
push ecx
mov edx, dword [ebp - 0x1f4]
add edx, 0x60
push edx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
push 0x1a24
call fcn.00402550
mov dword [ebp - 0x1e0], eax
mov dword [ebp - 4], 6
cmp dword [ebp - 0x1e0], 0
je 0x40dc92
cmp dword [ebp - 0x1f4], 0
je 0x40dc40
mov eax, dword [ebp - 0x1f4]
add eax, 0x40
mov dword [ebp - 0x23c], eax
jmp 0x40dc4a
mov dword [ebp - 0x23c], 0
push 0
push 1
mov ecx, dword [0x42e3c4]
push ecx
call dword [sym.imp.CpuDriverInterface.dll_public:_static_class_F2MemoryAddress____cdecl_F2MemoryAddress::Instance_void_]
mov dword [ebp - 0x240], eax
mov edx, dword [ebp - 0x240]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x240]
call dword [eax + 8]
push eax
push 0x420efc
mov ecx, dword [ebp - 0x23c]
push ecx
mov ecx, dword [ebp - 0x1e0]
call fcn.00412370
mov dword [ebp - 0x244], eax
jmp 0x40dc9c
mov dword [ebp - 0x244], 0
mov edx, dword [ebp - 0x244]
mov dword [ebp - 0x1dc], edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [ebp - 0x1dc]
mov dword [eax + 0x5c], ecx
mov edx, dword [ebp - 0x1f4]
mov dword [edx + 0x50], 0
mov eax, dword [ebp - 0x1f4]
mov dword [eax + 0x54], 0
mov ecx, dword [ebp - 0x1f4]
mov dword [ecx + 0x4c], 0
push 1
push str.Connected.
push 0
call fcn.00402610
mov ecx, eax
add ecx, 0xd0
call sub.MFC42.DLL_CStatusBar::SetPaneText
xor eax, eax
jmp 0x40e416
mov edx, dword [ebp - 0x1f4]
mov eax, dword [edx + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x1f4]
mov edx, dword [ecx + 0x64]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00406350
cmp dword [eax + 0xc8], 0
je 0x40dd74
push 1
push str.C1_not_found
push 0
call fcn.00402610
mov ecx, eax
add ecx, 0xd0
call sub.MFC42.DLL_CStatusBar::SetPaneText
push 0
push 0
push str.Internal_error__F2Driver.sys_is_not_properly_installed
call sub.MFC42.DLL_AfxMessageBox
call fcn.00402610
mov dword [eax + 0x154], 1
xor eax, eax
jmp 0x40e416
call fcn.00406350
cmp dword [eax + 0xc8], 2
je 0x40dd94
call fcn.00406350
cmp dword [eax + 0xc8], 0
jne 0x40e087
push 1
push str.Starting_Ethernet_communications...
push 0
call fcn.00402610
mov ecx, eax
add ecx, 0xd0
call sub.MFC42.DLL_CStatusBar::SetPaneText
push 0x2710
push 0
mov eax, dword [ebp - 0x1f4]
add eax, 0x64
push eax
mov ecx, dword [ebp - 0x1f4]
add ecx, 0x60
push ecx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
push 0x19f8
call fcn.00402550
mov dword [ebp - 0x1e8], eax
mov dword [ebp - 4], 7
cmp dword [ebp - 0x1e8], 0
je 0x40de5b
cmp dword [ebp - 0x1f4], 0
je 0x40de0a
mov edx, dword [ebp - 0x1f4]
add edx, 0x40
mov dword [ebp - 0x248], edx
jmp 0x40de14
mov dword [ebp - 0x248], 0
push 0
push 1
mov eax, dword [0x42e3c4]
push eax
call dword [sym.imp.CpuDriverInterface.dll_public:_static_class_F2MemoryAddress____cdecl_F2MemoryAddress::Instance_void_]
mov dword [ebp - 0x24c], eax
mov ecx, dword [ebp - 0x24c]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x24c]
call dword [edx + 8]
push eax
push str.C1Maint
mov eax, dword [ebp - 0x248]
push eax
mov ecx, dword [ebp - 0x1e8]
call fcn.0040759c
mov dword [ebp - 0x250], eax
jmp 0x40de65
mov dword [ebp - 0x250], 0
mov ecx, dword [ebp - 0x250]
mov dword [ebp - 0x1e4], ecx
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x1f4]
mov eax, dword [ebp - 0x1e4]
mov dword [edx + 0x5c], eax
mov ecx, dword [ebp - 0x1f4]
mov dword [ecx + 0x50], 0
mov edx, dword [ebp - 0x1f4]
mov dword [edx + 0x54], 0
mov eax, dword [ebp - 0x1f4]
mov dword [eax + 0x4c], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x1a4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x1a8], eax
cmp dword [0x424c88], 0
je 0x40dfa6
push 1
push 0
push 0
push 0
lea ecx, [ebp - 0x1c4]
push ecx
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x40df67
cmp dword [ebp - 0x1c0], 0x12
jne 0x40df04
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
xor eax, eax
jmp 0x40e416
cmp dword [ebp - 0x1c0], 0x112
jne 0x40df4d
mov edx, dword [ebp - 0x1bc]
and edx, 0xfff0
cmp edx, 0xf060
jne 0x40df4d
mov eax, dword [ebp - 0x1b8]
push eax
mov ecx, dword [ebp - 0x1bc]
push ecx
mov edx, dword [ebp - 0x1c0]
push edx
mov eax, dword [ebp - 0x1c4]
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
xor eax, eax
jmp 0x40e416
lea ecx, [ebp - 0x1c4]
push ecx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea edx, [ebp - 0x1c4]
push edx
call dword [sym.imp.USER32.dll_DispatchMessageA]
call fcn.00408028
test eax, eax
je 0x40df72
jmp 0x40dfa6
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x1a8], eax
mov eax, dword [ebp - 0x1a8]
sub eax, dword [ebp - 0x1a4]
cmp eax, 0x2710
jbe 0x40dfa1
push 0
push 0
push str.Connection_failed:_timeout
call sub.MFC42.DLL_AfxMessageBox
jmp 0x40dfa6
jmp 0x40dec6
call fcn.00408028
test eax, eax
je 0x40dfc3
call fcn.00406350
mov dword [eax + 0xc8], 2
jmp 0x40e087
mov ecx, dword [ebp - 0x1f4]
mov edx, dword [ecx + 0x60]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [eax + 0x64]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x1f4]
mov ecx, dword [edx + 0x5c]
call fcn.00407824
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [eax + 0x5c]
mov dword [ebp - 0x1f0], ecx
mov edx, dword [ebp - 0x1f0]
mov dword [ebp - 0x1ec], edx
cmp dword [ebp - 0x1ec], 0
je 0x40e030
push 1
mov eax, dword [ebp - 0x1ec]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x1ec]
call dword [edx + 4]
mov dword [ebp - 0x254], eax
jmp 0x40e03a
mov dword [ebp - 0x254], 0
call fcn.00406350
cmp dword [eax + 0xc8], 0
je 0x40e087
push 1
push str.M1_on_ethernet_not_found
push 0
call fcn.00402610
mov ecx, eax
add ecx, 0xd0
call sub.MFC42.DLL_CStatusBar::SetPaneText
push 0
push 0
push str.Ethernet_connection_not_working__retry_with_serial_connection
call sub.MFC42.DLL_AfxMessageBox
call fcn.00402610
mov dword [eax + 0x154], 1
xor eax, eax
jmp 0x40e416
call fcn.00406350
cmp dword [eax + 0xc8], 1
je 0x40e0a7
call fcn.00406350
cmp dword [eax + 0xc8], 0
jne 0x40e414
call fcn.00406350
mov dword [eax + 0xc8], 1
push 1
push str.Starting_Serial_communications...
push 0
call fcn.00402610
mov ecx, eax
add ecx, 0xd0
call sub.MFC42.DLL_CStatusBar::SetPaneText
push 0x421020
push 0x80
lea eax, [ebp - 0x90]
push eax
push 0x42102c
push str.Port
push 0x421038
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea ecx, [ebp - 0x90]
push ecx
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
push eax
push str.COM_d
lea edx, [ebp - 0x13c]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
push 0
push 0x40000000
push 3
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x13c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [ebp - 0x1f4]
mov dword [ecx + 0x48], eax
mov edx, dword [ebp - 0x1f4]
cmp dword [edx + 0x48], 0
jae 0x40e178
push 0
push 0
push str.Error_opening_COM_port
call sub.MFC42.DLL_AfxMessageBox
call fcn.00402610
mov dword [eax + 0x154], 1
mov eax, 1
jmp 0x40e416
lea eax, [ebp - 0xac]
push eax
mov ecx, dword [ebp - 0x1f4]
mov edx, dword [ecx + 0x48]
push edx
call dword [sym.imp.KERNEL32.dll_GetCommState]
push str.Fidia.Ini
push 0x80
lea eax, [ebp - 0x90]
push eax
push str.38400
push str.BaudRate
push str.Loader
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov dword [ebp - 0xac], 0x1c
lea ecx, [ebp - 0x90]
push ecx
call dword [sym.imp.MSVCRT.dll_atol]
add esp, 4
mov dword [ebp - 0xa8], eax
mov edx, dword [ebp - 0xa4]
or edx, 1
mov dword [ebp - 0xa4], edx
mov eax, dword [ebp - 0xa4]
and al, 0xfd
mov dword [ebp - 0xa4], eax
mov ecx, dword [ebp - 0xa4]
and ecx, 0xfffffffb
mov dword [ebp - 0xa4], ecx
mov edx, dword [ebp - 0xa4]
and edx, 0xfffffff7
mov dword [ebp - 0xa4], edx
mov eax, dword [ebp - 0xa4]
and al, 0xcf
mov dword [ebp - 0xa4], eax
mov ecx, dword [ebp - 0xa4]
and ecx, 0xffffffbf
mov dword [ebp - 0xa4], ecx
mov edx, dword [ebp - 0xa4]
and dl, 0x7f
mov dword [ebp - 0xa4], edx
mov eax, dword [ebp - 0xa4]
and ah, 0xfe
mov dword [ebp - 0xa4], eax
mov ecx, dword [ebp - 0xa4]
and ch, 0xfd
mov dword [ebp - 0xa4], ecx
mov edx, dword [ebp - 0xa4]
and dh, 0xfb
mov dword [ebp - 0xa4], edx
mov eax, dword [ebp - 0xa4]
and ah, 0xf7
mov dword [ebp - 0xa4], eax
mov ecx, dword [ebp - 0xa4]
and ch, 0xcf
mov dword [ebp - 0xa4], ecx
mov edx, dword [ebp - 0xa4]
and dh, 0xbf
mov dword [ebp - 0xa4], edx
mov byte [ebp - 0x9a], 8
mov byte [ebp - 0x99], 0
mov byte [ebp - 0x98], 0
lea eax, [ebp - 0xac]
push eax
mov ecx, dword [ebp - 0x1f4]
mov edx, dword [ecx + 0x48]
push edx
call dword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
jne 0x40e2ea
push 0
push 0
push str.Error_setting_COM_parameters
call sub.MFC42.DLL_AfxMessageBox
call fcn.00402610
mov dword [eax + 0x154], 1
xor eax, eax
jmp 0x40e416
mov eax, dword [ebp - 0x1f4]
mov dword [eax + 0x50], 0
mov ecx, dword [ebp - 0x1f4]
mov dword [ecx + 0x54], 0
mov edx, dword [ebp - 0x1f4]
mov dword [edx + 0x4c], 0
mov dword [ebp - 0xb8], 0xc
mov dword [ebp - 0xb4], 0
mov dword [ebp - 0xb0], 1
push 0x9c40
lea eax, [ebp - 0xb8]
push eax
mov ecx, dword [ebp - 0x1f4]
add ecx, 0x6c
push ecx
mov edx, dword [ebp - 0x1f4]
add edx, 0x68
push edx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x40e37d
push 0
push 0
push 0x4210a8
call sub.MFC42.DLL_AfxMessageBox
call fcn.00402610
mov dword [eax + 0x154], 1
xor eax, eax
jmp 0x40e416
push 0x2710
lea eax, [ebp - 0xb8]
push eax
mov ecx, dword [ebp - 0x1f4]
add ecx, 0x74
push ecx
mov edx, dword [ebp - 0x1f4]
add edx, 0x70
push edx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x40e3c8
push 0
push 0
push str.Internal_error:_cannot_create_pipe
call sub.MFC42.DLL_AfxMessageBox
call fcn.00402610
mov dword [eax + 0x154], 1
xor eax, eax
jmp 0x40e416
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [eax + 0x74]
push ecx
mov edx, dword [ebp - 0x1f4]
mov eax, dword [edx + 0x68]
push eax
push 0x400
mov ecx, dword [ebp - 0x1f4]
mov edx, dword [ecx + 0x20]
push edx
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [eax + 0x48]
push ecx
call fcn.00404424
add esp, 0x14
push 0
push 0x2710
push 0x303b
mov ecx, dword [ebp - 0x1f4]
call fcn.00406360
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8