Function at 0x401091
Capabilities:
Read .ini file

Disassembly:
jmp 0x401710
push 0xffffffffffffffff
push 0x431104
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1d8
push ebx
push ebp
push esi
xor ebx, ebx
push edi
push ebx
mov edi, ecx
push 0x40000000
push 3
push ebx
mov eax, dword [edi + 0x58]
push ebx
push 0xc0000000
push eax
mov dword [esp + 0x6c], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [0x43f404], eax
je 0x402b50
lea ecx, [esp + 0x30]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetCommState]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push str.Fidia.ini
push 0x4b00
push str.BAUD
push str.SerialC1
mov dword [esp + 0x40], 0x1c
call esi
push str.Fidia.ini
push 1
push str.BINARY
push str.SerialC1
mov dword [esp + 0x44], eax
call esi
mov ecx, dword [esp + 0x38]
push str.Fidia.ini
xor eax, ecx
push ebx
and eax, 1
push str.PARITYENABLE
xor ecx, eax
push str.SerialC1
mov dword [esp + 0x48], ecx
call esi
mov edx, dword [esp + 0x38]
and eax, 1
shl eax, 1
and edx, 0xfffffffd
push str.Fidia.ini
push ebx
or eax, edx
push str.OUTXCTSFLOW
push str.SerialC1
mov dword [esp + 0x48], eax
call esi
mov ecx, dword [esp + 0x38]
and eax, 1
shl eax, 2
and ecx, 0xfffffffb
push str.Fidia.ini
push ebx
or eax, ecx
push str.OUTXDSRFLOW
push str.SerialC1
mov dword [esp + 0x48], eax
call esi
mov edx, dword [esp + 0x38]
and eax, 1
shl eax, 3
and edx, 0xfffffff7
push str.Fidia.ini
push ebx
or eax, edx
push str.FDTRCONTROL
push str.SerialC1
mov dword [esp + 0x48], eax
call esi
mov ecx, dword [esp + 0x38]
and eax, 3
shl eax, 4
and ecx, 0xffffffcf
push str.Fidia.ini
push ebx
or eax, ecx
push str.DSRSENSITIVITY
push str.SerialC1
mov dword [esp + 0x48], eax
call esi
mov edx, dword [esp + 0x38]
and eax, 1
shl eax, 6
and edx, 0xffffffbf
push str.Fidia.ini
or eax, edx
push ebx
push str.TXCONTINUEONXOFF
mov dword [esp + 0x44], eax
push str.SerialC1
call esi
mov ecx, dword [esp + 0x38]
and eax, 1
shl eax, 7
and cl, 0x7f
push str.Fidia.ini
push ebx
or eax, ecx
push str.OUTX
push str.SerialC1
mov dword [esp + 0x48], eax
call esi
mov edx, dword [esp + 0x38]
and eax, 1
shl eax, 8
and dh, 0xfe
push str.Fidia.ini
push ebx
or eax, edx
push 0x43a654
push str.SerialC1
mov dword [esp + 0x48], eax
call esi
mov ecx, dword [esp + 0x38]
and eax, 1
shl eax, 9
and ch, 0xfd
push str.Fidia.ini
push ebx
or eax, ecx
push str.ERRORCHAR
push str.SerialC1
mov dword [esp + 0x48], eax
call esi
mov edx, dword [esp + 0x38]
and eax, 1
shl eax, 0xa
and dh, 0xfb
push str.Fidia.ini
push ebx
or eax, edx
push str.NULLSTRIP
push str.SerialC1
mov dword [esp + 0x48], eax
call esi
mov ecx, dword [esp + 0x38]
and eax, 1
shl eax, 0xb
and ch, 0xf7
push str.Fidia.ini
push ebx
or eax, ecx
push str.RTSCONTROL
push str.SerialC1
mov dword [esp + 0x48], eax
call esi
mov edx, dword [esp + 0x38]
and eax, 3
shl eax, 0xc
and dh, 0xcf
push str.Fidia.ini
push ebx
or eax, edx
push str.ABORTONERROR
push str.SerialC1
mov dword [esp + 0x48], eax
call esi
mov ecx, dword [esp + 0x38]
and eax, 1
shl eax, 0xe
and ch, 0xbf
push str.Fidia.ini
push 8
or eax, ecx
push str.BYTESIZE
push str.SerialC1
mov dword [esp + 0x48], eax
call esi
push str.Fidia.ini
mov byte [esp + 0x46], al
push ebx
push str.PARITY
push str.SerialC1
call esi
push str.Fidia.ini
push ebx
push str.STOPBITS
push str.SerialC1
mov byte [esp + 0x53], al
call esi
mov byte [esp + 0x44], al
mov eax, dword [0x43f404]
lea edx, [esp + 0x30]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
jne 0x4019e8
push str.SetCommState_function_failed
call fcn.0040102d
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004010af
add esp, 4
jmp 0x402b87
push str.Fidia.ini
push ebx
push str.DUMP_SERIALSETTING
push str.SerialC1
call esi
test eax, eax
je 0x4028d9
push str._n_n_____DUMP_SERIAL_SETTING_START_____
call fcn.0040102d
mov cl, byte [esp + 0x53]
add esp, 4
mov byte [esp + 0x10], cl
lea ecx, [esp + 0x10]
push ebx
call fcn.0040100a
mov edi, 0x43f41c
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x14]
push ebp
call fcn.004010b4
test al, al
je 0x401a65
mov edi, dword [esp + 0x14]
mov ecx, ebp
mov edx, ecx
mov esi, 0x43f41c
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
call fcn.00401028
mov eax, dword [esp + 0x30]
push str.___sizeof_DCB_
push eax
lea ecx, [esp + 0x70]
push str._d__s
push ecx
mov dword [esp + 0x200], ebx
call fcn.004050ac
add esp, 0x10
lea edx, [esp + 0x68]
push edx
call fcn.0040102d
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.0040100f
add esp, 0x10
mov ecx, dword [0x433124]
mov byte [esp + 0x1f0], 1
push ecx
push ebx
push eax
lea ecx, [esp + 0x1c]
call fcn.00401073
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x1f4], bl
call fcn.0040100a
mov edx, dword [esp + 0x34]
push str.___current_baud_rate
push edx
lea eax, [esp + 0x70]
push str._d__s
push eax
call fcn.004050ac
add esp, 0x10
lea ecx, [esp + 0x68]
push ecx
call fcn.0040102d
lea edx, [esp + 0x6c]
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
call fcn.0040100f
add esp, 0x10
mov edx, dword [0x433124]
lea ecx, [esp + 0x10]
push edx
push ebx
push eax
mov byte [esp + 0x1fc], 2
call fcn.00401073
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x1f4], bl
call fcn.0040100a
mov eax, dword [esp + 0x38]
push str.___binary_mode__no_EOF_check
and eax, 1
lea ecx, [esp + 0x6c]
push eax
push str._d__s
push ecx
call fcn.004050ac
add esp, 0x10
lea edx, [esp + 0x68]
push edx
call fcn.0040102d
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x2c]
push edx
call fcn.0040100f
add esp, 0x10
mov ecx, dword [0x433124]
mov byte [esp + 0x1f0], 3
push ecx
push ebx
push eax
lea ecx, [esp + 0x1c]
call fcn.00401073
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x1f4], bl
call fcn.0040100a
mov edx, dword [esp + 0x38]
push str.___enable_parity_checking
shr edx, 1
and edx, 1
lea eax, [esp + 0x6c]
push edx
push str._d__s
push eax
call fcn.004050ac
add esp, 0x10
lea ecx, [esp + 0x68]
push ecx
call fcn.0040102d
lea edx, [esp + 0x6c]
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
call fcn.0040100f
add esp, 0x10
mov edx, dword [0x433124]
lea ecx, [esp + 0x10]
push edx
push ebx
push eax
mov byte [esp + 0x1fc], 4
call fcn.00401073
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x1f4], bl
call fcn.0040100a
mov eax, dword [esp + 0x38]
push str.___CTS_output_flow_control
shr eax, 2
and eax, 1
lea ecx, [esp + 0x6c]
push eax
push str._d__s
push ecx
call fcn.004050ac
add esp, 0x10
lea edx, [esp + 0x68]
push edx
call fcn.0040102d
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.0040100f
add esp, 0x10
mov ecx, dword [0x433124]
mov byte [esp + 0x1f0], 5
push ecx
push ebx
push eax
lea ecx, [esp + 0x1c]
call fcn.00401073
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x1f4], bl
call fcn.0040100a
mov edx, dword [esp + 0x38]
push str.___DSR_output_flow_control
shr edx, 3
and edx, 1
lea eax, [esp + 0x6c]
push edx
push str._d__s
push eax
call fcn.004050ac
add esp, 0x10
lea ecx, [esp + 0x68]
push ecx
call fcn.0040102d
lea edx, [esp + 0x6c]
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
call fcn.0040100f
add esp, 0x10
mov edx, dword [0x433124]
lea ecx, [esp + 0x10]
push edx
push ebx
push eax
mov byte [esp + 0x1fc], 6
call fcn.00401073
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x1f4], bl
call fcn.0040100a
mov eax, dword [esp + 0x38]
push str.___DTR_flow_control_type
shr eax, 4
and eax, 3
lea ecx, [esp + 0x6c]
push eax
push str._d__s
push ecx
call fcn.004050ac
add esp, 0x10
lea edx, [esp + 0x68]
push edx
call fcn.0040102d
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.0040100f
add esp, 0x10
mov ecx, dword [0x433124]
mov byte [esp + 0x1f0], 7
push ecx
push ebx
push eax
lea ecx, [esp + 0x1c]
call fcn.00401073
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x1f4], bl
call fcn.0040100a
mov edx, dword [esp + 0x38]
push str.___DSR_sensitivity
shr edx, 6
and edx, 1
lea eax, [esp + 0x6c]
push edx
push str._d__s
push eax
call fcn.004050ac
add esp, 0x10
lea ecx, [esp + 0x68]
push ecx
call fcn.0040102d
lea edx, [esp + 0x6c]
push edx
lea eax, [esp + 0x18]
lea ecx, [esp + 0x28]
push eax
push ecx
call fcn.0040100f
add esp, 0x10
mov edx, dword [0x433124]
lea ecx, [esp + 0x10]
push edx
push ebx
push eax
mov byte [esp + 0x1fc], 8
call fcn.00401073
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x1f4], bl
call fcn.0040100a
mov eax, dword [esp + 0x38]
push str.___XOFF_continues_Tx
shr eax, 7
and eax, 1
lea ecx, [esp + 0x6c]
push eax
push str._d__s
push ecx
call fcn.004050ac
add esp, 0x10
lea edx, [esp + 0x68]
push edx
call fcn.0040102d
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.0040100f
add esp, 0x10
mov ecx, dword [0x433124]
mov byte [esp + 0x1f0], 9
push ecx
push ebx
push eax
lea ecx, [esp + 0x1c]
call fcn.00401073
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x1f4], bl
call fcn.0040100a
mov edx, dword [esp + 0x38]
push str.___XON_XOFF_out_flow_control
shr edx, 8
and edx, 1
lea eax, [esp + 0x6c]
push edx
push str._d__s
push eax
call fcn.004050ac
add esp, 0x10
lea ecx, [esp + 0x68]
push ecx
call fcn.0040102d
lea edx, [esp + 0x6c]
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
call fcn.0040100f
add esp, 0x10
mov edx, dword [0x433124]
lea ecx, [esp + 0x10]
push edx
push ebx
push eax
mov byte [esp + 0x1fc], 0xa
call fcn.00401073
mov byte [esp + 0x1f0], bl
push 1
lea ecx, [esp + 0x24]
call fcn.0040100a
mov eax, dword [esp + 0x38]
push str.___XON_XOFF_in_flow_control
shr eax, 9
and eax, 1
lea ecx, [esp + 0x6c]
push eax
push str._d__s
push ecx
call fcn.004050ac
add esp, 0x10
lea edx, [esp + 0x68]
push edx
call fcn.0040102d
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.0040100f
add esp, 0x10
mov ecx, dword [0x433124]
mov byte [esp + 0x1f0], 0xb
push ecx
push ebx
push eax
lea ecx, [esp + 0x1c]
call fcn.00401073
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x1f4], bl
call fcn.0040100a
mov edx, dword [esp + 0x38]
push str.___enable_error_replacement
shr edx, 0xa
and edx, 1
lea eax, [esp + 0x6c]
push edx
push str._d__s
push eax
call fcn.004050ac
add esp, 0x10
lea ecx, [esp + 0x68]
push ecx
call fcn.0040102d
lea edx, [esp + 0x6c]
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
call fcn.0040100f
add esp, 0x10
mov edx, dword [0x433124]
lea ecx, [esp + 0x10]
push edx
push ebx
push eax
mov byte [esp + 0x1fc], 0xc
call fcn.00401073
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x1f4], bl
call fcn.0040100a
mov eax, dword [esp + 0x38]
push str.___enable_null_stripping
shr eax, 0xb
and eax, 1
lea ecx, [esp + 0x6c]
push eax
push str._d__s
push ecx
call fcn.004050ac
add esp, 0x10
lea edx, [esp + 0x68]
push edx
call fcn.0040102d
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.0040100f
add esp, 0x10
mov ecx, dword [0x433124]
mov byte [esp + 0x1f0], 0xd
push ecx
push ebx
push eax
lea ecx, [esp + 0x1c]
call fcn.00401073
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x1f4], bl
call fcn.0040100a
mov edx, dword [esp + 0x38]
push str.___RTS_flow_control
shr edx, 0xc
and edx, 3
lea eax, [esp + 0x6c]
push edx
push str._d__s
push eax
call fcn.004050ac
add esp, 0x10
lea ecx, [esp + 0x68]
push ecx
call fcn.0040102d
lea edx, [esp + 0x6c]
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
call fcn.0040100f
add esp, 0x10
mov edx, dword [0x433124]
lea ecx, [esp + 0x10]
push edx
push ebx
push eax
mov byte [esp + 0x1fc], 0xe
call fcn.00401073
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x1f4], bl
call fcn.0040100a
mov eax, dword [esp + 0x38]
push str.___abort_on_error
shr eax, 0xe
and eax, 1
lea ecx, [esp + 0x6c]
push eax
push str._d__s
push ecx
call fcn.004050ac
add esp, 0x10
lea edx, [esp + 0x68]
push edx
call fcn.0040102d
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.0040100f
add esp, 0x10
mov ecx, dword [0x433124]
mov byte [esp + 0x1f0], 0xf
push ecx
push ebx
push eax
lea ecx, [esp + 0x1c]
call fcn.00401073
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x1f4], bl
call fcn.0040100a
mov edx, dword [esp + 0x38]
push str.___reserved
shr edx, 0xf
push edx
lea eax, [esp + 0x70]
push str._d__s
push eax
call fcn.004050ac
add esp, 0x10
lea ecx, [esp + 0x68]
push ecx
call fcn.0040102d
lea edx, [esp + 0x6c]
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
call fcn.0040100f
add esp, 0x10
mov edx, dword [0x433124]
lea ecx, [esp + 0x10]
push edx
push ebx
push eax
mov byte [esp + 0x1fc], 0x10
call fcn.00401073
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x1f4], bl
call fcn.0040100a
mov eax, dword [esp + 0x3c]
push str.___not_currently_used
and eax, 0xffff
lea ecx, [esp + 0x6c]
push eax
push str._d__s
push ecx
call fcn.004050ac
add esp, 0x10
lea edx, [esp + 0x68]
push edx
call fcn.0040102d
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.0040100f
add esp, 0x10
mov ecx, dword [0x433124]
mov byte [esp + 0x1f0], 0x11
push ecx
push ebx
push eax
lea ecx, [esp + 0x1c]
call fcn.00401073
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x1f4], bl
call fcn.0040100a
mov edx, dword [esp + 0x3e]
push str.___transmit_XON_threshold
and edx, 0xffff
lea eax, [esp + 0x6c]
push edx
push str._d__s
push eax
call fcn.004050ac
add esp, 0x10
lea ecx, [esp + 0x68]
push ecx
call fcn.0040102d
lea edx, [esp + 0x6c]
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
call fcn.0040100f
add esp, 0x10
mov edx, dword [0x433124]
lea ecx, [esp + 0x10]
push edx
push ebx
push eax
mov byte [esp + 0x1fc], 0x12
call fcn.00401073
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x1f4], bl
call fcn.0040100a
mov eax, dword [esp + 0x40]
push str.___transmit_XOFF_threshold
and eax, 0xffff
lea ecx, [esp + 0x6c]
push eax
push str._d__s
push ecx
call fcn.004050ac
add esp, 0x10
lea edx, [esp + 0x68]
push edx
call fcn.0040102d
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.0040100f
add esp, 0x10
mov ecx, dword [0x433124]
mov byte [esp + 0x1f0], 0x13
push ecx
push ebx
push eax
lea ecx, [esp + 0x1c]
call fcn.00401073
mov eax, dword [esp + 0x24]
mov byte [esp + 0x1f0], bl
cmp eax, ebx
je 0x4022ad
mov cl, byte [eax - 1]
dec eax
cmp cl, bl
je 0x4022a4
cmp cl, 0xff
je 0x4022a4
dec cl
mov byte [eax], cl
jmp 0x4022ad
push eax
call fcn.004202db
add esp, 4
mov edx, dword [esp + 0x42]
push str.___number_of_bits_byte__4_8
and edx, 0xff
lea eax, [esp + 0x6c]
push edx
push str._d__s
push eax
call fcn.004050ac
add esp, 0x10
lea ecx, [esp + 0x68]
push ecx
call fcn.0040102d
lea edx, [esp + 0x6c]
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
call fcn.0040100f
add esp, 0x10
mov edx, dword [0x433124]
lea ecx, [esp + 0x10]
push edx
push ebx
push eax
mov byte [esp + 0x1fc], 0x14
call fcn.00401073
mov eax, dword [esp + 0x24]
mov byte [esp + 0x1f0], bl
cmp eax, ebx
je 0x402336
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x40232d
cmp al, 0xff
je 0x40232d
dec al
mov byte [ecx], al
jmp 0x402336
push ecx
call fcn.004202db
add esp, 4
mov eax, dword [esp + 0x43]
push str.___0_4no_odd_even_mark_space
and eax, 0xff
lea ecx, [esp + 0x6c]
push eax
push str._d__s
push ecx
call fcn.004050ac
add esp, 0x10
lea edx, [esp + 0x68]
push edx
call fcn.0040102d
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.0040100f
add esp, 0x10
mov ecx, dword [0x433124]
mov byte [esp + 0x1f0], 0x15
push ecx
push ebx
push eax
lea ecx, [esp + 0x1c]
call fcn.00401073
mov eax, dword [esp + 0x24]
mov byte [esp + 0x1f0], bl
cmp eax, ebx
je 0x4023be
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x4023b5
cmp al, 0xff
je 0x4023b5
dec al
mov byte [ecx], al
jmp 0x4023be
push ecx
call fcn.004202db
add esp, 4
mov edx, dword [esp + 0x44]
push str.___0_1_2__1__1.5__2
and edx, 0xff
lea eax, [esp + 0x6c]
push edx
push str._d__s
push eax
call fcn.004050ac
add esp, 0x10
lea ecx, [esp + 0x68]
push ecx
call fcn.0040102d
lea edx, [esp + 0x6c]
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
call fcn.0040100f
add esp, 0x10
mov edx, dword [0x433124]
lea ecx, [esp + 0x10]
push edx
push ebx
push eax
mov byte [esp + 0x1fc], 0x16
call fcn.00401073
mov eax, dword [esp + 0x24]
mov byte [esp + 0x1f0], bl
cmp eax, ebx
je 0x402447
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x40243e
cmp al, 0xff
je 0x40243e
dec al
mov byte [ecx], al
jmp 0x402447
push ecx
call fcn.004202db
add esp, 4
movsx eax, byte [esp + 0x45]
push str.___Tx_and_Rx_XON_character
push eax
lea ecx, [esp + 0x70]
push str._d__s
push ecx
call fcn.004050ac
add esp, 0x10
lea edx, [esp + 0x68]
push edx
call fcn.0040102d
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.0040100f
add esp, 0x10
mov ecx, dword [0x433124]
mov byte [esp + 0x1f0], 0x17
push ecx
push ebx
push eax
lea ecx, [esp + 0x1c]
call fcn.00401073
mov eax, dword [esp + 0x24]
mov byte [esp + 0x1f0], bl
cmp eax, ebx
je 0x4024cb
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x4024c2
cmp al, 0xff
je 0x4024c2
dec al
mov byte [ecx], al
jmp 0x4024cb
push ecx
call fcn.004202db
add esp, 4
movsx edx, byte [esp + 0x46]
push str.___Tx_and_Rx_XOFF_character
push edx
lea eax, [esp + 0x70]
push str._d__s
push eax
call fcn.004050ac
add esp, 0x10
lea ecx, [esp + 0x68]
push ecx
call fcn.0040102d
lea edx, [esp + 0x6c]
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
call fcn.0040100f
add esp, 0x10
mov edx, dword [0x433124]
lea ecx, [esp + 0x10]
push edx
push ebx
push eax
mov byte [esp + 0x1fc], 0x18
call fcn.00401073
mov eax, dword [esp + 0x24]
mov byte [esp + 0x1f0], bl
cmp eax, ebx
je 0x40254f
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x402546
cmp al, 0xff
je 0x402546
dec al
mov byte [ecx], al
jmp 0x40254f
push ecx
call fcn.004202db
add esp, 4
movsx eax, byte [esp + 0x47]
push str.___error_replacement_character
push eax
lea ecx, [esp + 0x70]
push str._d__s
push ecx
call fcn.004050ac
add esp, 0x10
lea edx, [esp + 0x68]
push edx
call fcn.0040102d
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.0040100f
add esp, 0x10
mov ecx, dword [0x433124]
mov byte [esp + 0x1f0], 0x19
push ecx
push ebx
push eax
lea ecx, [esp + 0x1c]
call fcn.00401073
mov eax, dword [esp + 0x24]
mov byte [esp + 0x1f0], bl
cmp eax, ebx
je 0x4025d3
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x4025ca
cmp al, 0xff
je 0x4025ca
dec al
mov byte [ecx], al
jmp 0x4025d3
push ecx
call fcn.004202db
add esp, 4
movsx edx, byte [esp + 0x48]
push str.___end_of_input_character
push edx
lea eax, [esp + 0x70]
push str._d__s
push eax
call fcn.004050ac
add esp, 0x10
lea ecx, [esp + 0x68]
push ecx
call fcn.0040102d
lea edx, [esp + 0x6c]
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
call fcn.0040100f
add esp, 0x10
mov esi, eax
mov ecx, dword [esi + 8]
mov eax, dword [0x433124]
mov ebp, ecx
mov byte [esp + 0x1f0], 0x1a
cmp eax, ebp
jae 0x40262b
mov ebp, eax
lea edx, [esp + 0x10]
cmp edx, esi
jne 0x40264e
push eax
push ebp
lea ecx, [esp + 0x18]
call fcn.00401032
push ebx
push ebx
lea ecx, [esp + 0x18]
call fcn.00401032
jmp 0x4026d6
cmp ebp, ebx
jbe 0x40269b
cmp ebp, ecx
jne 0x40269b
mov eax, dword [esi + 4]
cmp eax, ebx
jne 0x402662
mov eax, 0x433120
cmp byte [eax - 1], 0xfe
jae 0x40269b
push 1
lea ecx, [esp + 0x14]
call fcn.0040100a
mov eax, dword [esi + 4]
cmp eax, ebx
jne 0x40267f
mov eax, 0x433120
mov dword [esp + 0x14], eax
mov ecx, dword [esi + 8]
mov dword [esp + 0x18], ecx
mov esi, dword [esi + 0xc]
mov dword [esp + 0x1c], esi
mov cl, byte [eax - 1]
inc cl
mov byte [eax - 1], cl
jmp 0x4026d6
push 1
push ebp
lea ecx, [esp + 0x18]
call fcn.004010b4
test al, al
je 0x4026d6
mov esi, dword [esi + 4]
cmp esi, ebx
jne 0x4026b7
mov esi, 0x433120
mov edi, dword [esp + 0x14]
mov ecx, ebp
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x18], ebp
mov byte [ecx + ebp], bl
mov eax, dword [esp + 0x24]
mov byte [esp + 0x1f0], bl
cmp eax, ebx
je 0x402702
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x4026f9
cmp al, 0xff
je 0x4026f9
dec al
mov byte [ecx], al
jmp 0x402702
push ecx
call fcn.004202db
add esp, 4
movsx edx, byte [esp + 0x49]
push str.___received_event_character
push edx
lea eax, [esp + 0x70]
push str._d__s
push eax
call fcn.004050ac
add esp, 0x10
lea ecx, [esp + 0x68]
push ecx
call fcn.0040102d
lea edx, [esp + 0x6c]
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
call fcn.0040100f
add esp, 0x10
mov esi, eax
mov ecx, dword [esi + 8]
mov eax, dword [0x433124]
mov ebp, ecx
mov byte [esp + 0x1f0], 0x1b
cmp eax, ebp
jae 0x40275a
mov ebp, eax
lea edx, [esp + 0x10]
cmp edx, esi
jne 0x40277d
push eax
push ebp
lea ecx, [esp + 0x18]
call fcn.00401032
push ebx
push ebx
lea ecx, [esp + 0x18]
call fcn.00401032
jmp 0x402805
cmp ebp, ebx
jbe 0x4027ca
cmp ebp, ecx
jne 0x4027ca
mov eax, dword [esi + 4]
cmp eax, ebx
jne 0x402791
mov eax, 0x433120
cmp byte [eax - 1], 0xfe
jae 0x4027ca
push 1
lea ecx, [esp + 0x14]
call fcn.0040100a
mov eax, dword [esi + 4]
cmp eax, ebx
jne 0x4027ae
mov eax, 0x433120
mov dword [esp + 0x14], eax
mov ecx, dword [esi + 8]
mov dword [esp + 0x18], ecx
mov esi, dword [esi + 0xc]
mov dword [esp + 0x1c], esi
mov cl, byte [eax - 1]
inc cl
mov byte [eax - 1], cl
jmp 0x402805
push 1
push ebp
lea ecx, [esp + 0x18]
call fcn.004010b4
test al, al
je 0x402805
mov esi, dword [esi + 4]
cmp esi, ebx
jne 0x4027e6
mov esi, 0x433120
mov edi, dword [esp + 0x14]
mov ecx, ebp
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x18], ebp
mov byte [ecx + ebp], bl
mov eax, dword [esp + 0x24]
mov byte [esp + 0x1f0], bl
cmp eax, ebx
je 0x402831
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x402828
cmp al, 0xff
je 0x402828
dec al
mov byte [ecx], al
jmp 0x402831
push ecx
call fcn.004202db
add esp, 4
push 0x43a240
push str.c:_fidiaws_serialc1set.log
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
call fcn.0040582c
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40286b
push str.Unable_to_open_c:_fidiaws_serialc1set.log
push str.C1SERIAL
push 4
call fcn.00401087
add esp, 0xc
jmp 0x40288d
mov eax, dword [esp + 0x14]
cmp eax, ebx
jne 0x402878
mov eax, 0x433120
push eax
push 0x43a1d8
push esi
call fcn.004057bf
push esi
call fcn.00405742
add esp, 0x10
push str._n_____DUMP_SERIAL_SETTING_END_______n
call fcn.0040102d
mov ecx, dword [esp + 0x18]
add esp, 4
cmp ecx, ebx
mov dword [esp + 0x1f0], 0xffffffff
je 0x4028c9
mov al, byte [ecx - 1]
cmp al, bl
je 0x4028bf
cmp al, 0xff
je 0x4028bf
dec al
mov byte [ecx - 1], al
jmp 0x4028c9
dec ecx
push ecx
call fcn.004202db
add esp, 4
mov edi, dword [esp + 0x50]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov eax, dword [0x43f404]
lea edx, [esp + 0x54]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetCommTimeouts]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40290c
push str.GetCommTimeouts_function_failed
call fcn.0040102d
add esp, 4
call esi
push eax
call fcn.004010af
add esp, 4
mov edx, dword [0x43f404]
lea ecx, [esp + 0x54]
push ecx
push edx
mov dword [esp + 0x5c], 1
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
test eax, eax
jne 0x402952
push str.SetCommTimeouts_function_failed
call fcn.0040102d
add esp, 4
call esi
push eax
call fcn.004010af
add esp, 4
push str.COM_port_set_up_complete
call fcn.0040102d
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
add esp, 4
push ebx
push ebx
push 1
push ebx
call esi
mov dword [0x43f3fc], eax
xor eax, eax
mov dword [0x43f3d8], eax
push ebx
mov dword [0x43f3dc], eax
push ebx
mov dword [0x43f3e0], eax
push ebx
mov dword [0x43f3e4], eax
push ebx
mov dword [0x43f3e8], eax
call esi
xor ecx, ecx
push ebx
mov dword [0x43f3b0], ecx
push ebx
mov dword [0x43f3b4], ecx
push ebx
mov dword [0x43f3b8], ecx
push ebx
mov dword [0x43f3bc], ecx
mov dword [0x43f3e8], eax
mov dword [0x43f3c0], ecx
call esi
mov dword [0x43f3c0], eax
mov dword [edi + 0x40], ebx
call fcn.0042cb47
mov eax, dword [eax + 4]
push ebx
push ebx
push ebx
push ebx
push eax
push 0x40105a
call fcn.00420429
cmp eax, ebx
mov dword [edi + 0x40], eax
je 0x402b3a
push str.WRITE_THREAD_L1_STARTED_OK
call fcn.0040102d
mov eax, dword [edi + 0x40]
mov word [edi + 0x50], 1
mov ebp, dword [sym.imp.KERNEL32.dll_SetThreadPriority]
add esp, 4
mov edx, dword [eax + 0x2c]
mov dword [edi + 0x4c], edx
mov ecx, dword [eax + 0x28]
mov dword [0x43f3c8], ecx
mov eax, dword [edi + 0x3c]
cmp eax, ebx
je 0x402a52
cmp eax, 1
jne 0x402a27
push 2
push ecx
call ebp
mov esi, eax
jmp 0x402a2b
mov esi, dword [esp + 0x50]
cmp dword [edi + 0x3c], 2
jl 0x402a3d
mov eax, dword [0x43f3c8]
push 0xf
push eax
call ebp
mov esi, eax
cmp esi, ebx
jne 0x402a56
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004010af
add esp, 4
jmp 0x402a56
mov esi, dword [esp + 0x50]
mov ecx, dword [0x43f3c8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
cmp eax, 0x7fffffff
jne 0x402a79
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004010af
add esp, 4
mov dword [edi + 0x40], ebx
call fcn.0042cb47
mov eax, dword [eax + 4]
push ebx
push ebx
push ebx
push ebx
push eax
push 0x4010b9
call fcn.00420429
cmp eax, ebx
mov dword [edi + 0x44], eax
je 0x402b24
push str.READ_THREAD_L1_STARTED_OK
call fcn.0040102d
mov eax, dword [edi + 0x44]
mov word [edi + 0x52], 1
add esp, 4
mov edx, dword [eax + 0x2c]
mov dword [edi + 0x48], edx
mov ecx, dword [eax + 0x28]
mov dword [0x43f3c4], ecx
mov eax, dword [edi + 0x3c]
cmp eax, ebx
je 0x402afb
cmp eax, 1
jne 0x402ad6
push 2
push ecx
call ebp
mov esi, eax
cmp dword [edi + 0x3c], 2
jl 0x402ae8
mov eax, dword [0x43f3c4]
push 0xf
push eax
call ebp
mov esi, eax
cmp esi, ebx
jne 0x402afb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004010af
add esp, 4
mov ecx, dword [0x43f3c4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
cmp eax, 0x7fffffff
jne 0x402b1e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004010af
add esp, 4
mov ax, 1
jmp 0x402b8a
push str.ERROR_STARTING_READ_THREAD_L1
push str.C1SERIAL
push 4
call fcn.00401087
add esp, 0xc
jmp 0x402b87
push str.ERROR_STARTING_WRITE_THREAD_L1
push str.C1SERIAL
push 4
call fcn.00401087
add esp, 0xc
jmp 0x402b87
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [edi + 0x58]
mov esi, eax
push edx
lea eax, [esp + 0x16c]
push str.Apertura_porta_seriale___s__non_riuscita
push eax
call fcn.004050ac
add esp, 0xc
lea ecx, [esp + 0x168]
push ecx
call fcn.0040102d
push esi
call fcn.004010af
add esp, 8
xor ax, ax
mov ecx, dword [esp + 0x1e8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1e4
ret