Function at 0x404237
Capabilities:
Resume thread

Disassembly:
mov eax, 0x4246e0
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x10
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [ebp - 0x10]
call fcn.00423918
xor edi, edi
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], edi
call fcn.00423918
cmp dword [esi + 0x310], edi
mov byte [ebp - 4], 1
jne 0x40428c
and byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::CString
mov eax, 0xc1030302
jmp 0x4045b7
cmp dword [esi + 0x314], 1
je 0x40459d
mov eax, dword [esi + 0x308]
cmp eax, dword [esi + 0x300]
jne 0x404352
mov ecx, dword [esi + 0x14]
lea eax, [esi + 0x14]
cmp dword [ecx - 8], edi
je 0x40435d
lea ebx, [esi + 0xc]
push eax
mov ecx, ebx
call sub.MFC42.DLL_CString::operator_2
movzx eax, word [esi + 0x28]
lea eax, [eax*4 + 0x42d9e0]
push eax
movzx eax, word [esi + 0x2c]
lea eax, [eax*4 + 0x42d9e0]
push eax
movzx eax, word [esi + 0x2a]
lea eax, [eax*4 + 0x42d9e0]
push eax
movzx eax, word [esi + 0x2e]
lea eax, [eax*4 + 0x42d9e0]
push eax
lea eax, [ebp - 0x10]
push str.odsr_s_octs_s_dtr_s_rts_s
push eax
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esi + 0x24]
add esp, 0x18
lea eax, [esi + 0x10]
push dword [ebp - 0x10]
movsx ecx, byte [ecx]
push dword [esi + 0x20]
push dword [esi + 0x1c]
push ecx
push dword [esi + 0x18]
push str.baud_s_parity_c_data_s_stop_s__s
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x1c
cmp word [esi + 0x30], 2
jne 0x40433a
mov dword [esi + 0x54], 1
jmp 0x40433d
mov dword [esi + 0x54], edi
mov eax, dword [esi + 0x58]
mov dword [esi + 0x60], eax
mov eax, dword [esi + 0x64]
mov dword [esi + 0x6c], eax
mov ax, word [esi + 0x70]
jmp 0x404412
mov ecx, dword [esi + 0x34]
lea eax, [esi + 0x34]
cmp dword [ecx - 8], edi
jne 0x40437f
and byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::CString
mov eax, 0xc1030303
jmp 0x4045b7
lea ebx, [esi + 0xc]
push eax
mov ecx, ebx
call sub.MFC42.DLL_CString::operator_2
movzx eax, word [esi + 0x48]
lea eax, [eax*4 + 0x42d9e0]
push eax
movzx eax, word [esi + 0x4c]
lea eax, [eax*4 + 0x42d9e0]
push eax
movzx eax, word [esi + 0x4a]
lea eax, [eax*4 + 0x42d9e0]
push eax
movzx eax, word [esi + 0x4e]
lea eax, [eax*4 + 0x42d9e0]
push eax
lea eax, [ebp - 0x10]
push str.odsr_s_octs_s_dtr_s_rts_s
push eax
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esi + 0x44]
add esp, 0x18
lea eax, [esi + 0x10]
push dword [ebp - 0x10]
movsx ecx, byte [ecx]
push dword [esi + 0x40]
push dword [esi + 0x3c]
push ecx
push dword [esi + 0x38]
push str.baud_s_parity_c_data_s_stop_s__s
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x1c
cmp word [esi + 0x50], 2
jne 0x4043ff
mov dword [esi + 0x54], 1
jmp 0x404402
mov dword [esi + 0x54], edi
mov eax, dword [esi + 0x5c]
mov dword [esi + 0x60], eax
mov eax, dword [esi + 0x68]
mov dword [esi + 0x6c], eax
mov ax, word [esi + 0x72]
mov edi, dword [sym.imp.KERNEL32.dll_ResumeThread]
mov word [esi + 0x74], ax
mov eax, dword [esi + 0xe8]
push dword [eax + 0x2c]
call edi
mov eax, dword [esi + 0xf0]
push dword [eax + 0x2c]
call edi
mov eax, dword [esi + 0xec]
push dword [eax + 0x2c]
call edi
push 1
pop eax
cmp dword [ebp + 8], eax
mov dword [esi + 0x314], eax
jne 0x4044b5
mov eax, dword [0x430144]
xor edi, edi
mov eax, dword [eax + 0x18]
cmp dword [eax + 0x60], edi
jne 0x4044b7
push dword [esi + 4]
lea eax, [ebp - 0x14]
push str.Channel__s_Enabled
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
push dword [0x430220]
push dword [ebp - 0x14]
call fcn.0041ded0
pop ecx
pop ecx
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push 0x42fd28
call sub.MFC42.DLL_CString::CString_1
push edi
push edi
push ecx
lea eax, [ebp - 0x14]
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString_3
mov ecx, dword [0x430234]
push edi
mov byte [ebp - 4], 1
call fcn.0041c8d7
jmp 0x4044b7
xor edi, edi
cmp dword [esi + 0x378], edi
jne 0x40459d
push dword [esi + 0xfc]
mov dword [esi + 0x318], edi
call dword [sym.imp.KERNEL32.dll_SetEvent]
cmp dword [esi + 0x30c], edi
jne 0x40459d
push edi
push 1
push dword [esi + 0x54]
mov ecx, dword [esi + 0x308]
push dword [esi + 0x104]
push dword [esi + 0x10]
push dword [ebx]
call sub.Serial.dll_public:_unsigned_long_int___thiscall_CSerial::Open_char_const___char_const___void___int__int__int_
cmp eax, 0x10101ff
jne 0x404526
mov ecx, dword [esi + 0x308]
call sub.Serial.dll_public:_unsigned_long_int___thiscall_CSerial::TransmitClear_void_
mov ecx, dword [esi + 0x308]
call sub.Serial.dll_public:_unsigned_long_int___thiscall_CSerial::ReceiveClear_void_
mov dword [esi + 0x30c], 1
jmp 0x40459d
cmp eax, 0xc1010110
jne 0x40459d
lea ecx, [ebp + 8]
call fcn.00423918
push dword [ebx]
lea eax, [ebp + 8]
mov byte [ebp - 4], 3
push str.Invalid_Port_name__s
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
push dword [0x430220]
push dword [ebp + 8]
call fcn.0041ded0
pop ecx
pop ecx
push ecx
mov ecx, esp
mov dword [ebp - 0x18], esp
push 0x42fd28
call sub.MFC42.DLL_CString::CString_1
push edi
push edi
push ecx
lea eax, [ebp + 8]
mov ecx, esp
mov dword [ebp - 0x1c], esp
push eax
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString_3
mov ecx, dword [0x430234]
push edi
mov byte [ebp - 4], 3
call fcn.0041c8d7
lea ecx, [ebp + 8]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
and byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::CString
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 4