Function at 0x4010f0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb8
push str.CM44CPU_vx9.4__con_controllo_di_checksum
push str.COMELZ_spa._Upgrade__s_n_n
call fcn.00402c37
add esp, 8
push 0x412ab0
push 0x412a0c
call fcn.00402e90
add esp, 8
test eax, eax
jne 0x401134
mov dword [ebp - 8], 1
mov dword [ebp - 0xc], 0x1c200
jmp 0x401272
push str.Serial_port__1_4__ESCCancel__:
call fcn.00402c37
add esp, 4
mov dword [ebp - 8], 0
cmp dword [ebp - 8], 0
jne 0x401272
call fcn.00407b45
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x40116a
call fcn.00407b45
neg eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x90], eax
cmp dword [ebp - 0x90], 0x1b
je 0x4011ac
cmp dword [ebp - 0x90], 0x30
jle 0x4011c0
cmp dword [ebp - 0x90], 0x34
jle 0x401190
jmp 0x4011c0
mov ecx, dword [ebp - 0x1c]
sub ecx, 0x30
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
push edx
push str._i_n_n
call fcn.00402c37
add esp, 8
jmp 0x4011c0
push str._n_nUpgrade_aborted_n
call fcn.00402c37
add esp, 4
push 1
call fcn.00402bf7
push str.CM44
push 0x412a14
call fcn.00402e90
add esp, 8
test eax, eax
jne 0x4011e2
mov dword [ebp - 0xc], 0x4b00
jmp 0x40126d
push str.Speed__19600__219200__3115200__ESCCancel__:
call fcn.00402c37
add esp, 4
mov dword [ebp - 0xc], 0
cmp dword [ebp - 0xc], 0
jne 0x40126d
call fcn.00407b45
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x401214
call fcn.00407b45
neg eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x94], eax
mov ecx, dword [ebp - 0x94]
sub ecx, 0x1b
mov dword [ebp - 0x94], ecx
cmp dword [ebp - 0x94], 0x18
ja case.0x401242.1
mov edx, dword [ebp - 0x94]
movzx eax, byte [edx + 0x401e9f]
jmp dword [eax*4 + 0x401e8b]
mov dword [ebp - 0xc], 0x2580
jmp case.0x401242.1
mov dword [ebp - 0xc], 0x4b00
jmp case.0x401242.1
mov dword [ebp - 0xc], 0x1c200
jmp case.0x401242.1
push 1
call fcn.00402bf7
jmp 0x4011f6
jmp 0x401148
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 8]
push edx
call fcn.00402760
add esp, 8
push str._nAttesa_accensione_CM44cn
call fcn.00402c37
add esp, 4
call fcn.00402a40
call fcn.00402a60
call fcn.00402740
mov dword [ebp - 0x38], eax
call fcn.00402740
sub eax, dword [ebp - 0x38]
cmp eax, 0x48
jge 0x4012b0
jmp 0x4012a1
push 0x412b50
call fcn.00401030
add esp, 4
call fcn.00402a80
push str._nInitializing...
call fcn.00402c37
add esp, 4
push 0x412b68
call fcn.00401030
add esp, 4
push 0x412b6c
call fcn.00401030
add esp, 4
push 0x412b70
call fcn.00401030
add esp, 4
call fcn.00402740
mov dword [ebp - 0x3c], eax
call fcn.00402740
sub eax, dword [ebp - 0x3c]
cmp eax, 0x12
jge 0x40130d
jmp 0x4012fe
call fcn.00402920
push 0x412b74
call fcn.00401030
add esp, 4
call fcn.00402740
mov dword [ebp - 0x30], eax
mov byte [ebp - 0x18], 0
mov byte [ebp - 0x17], 0
mov byte [ebp - 0x16], 0
mov dword [ebp - 0x24], 0
jmp 0x401345
mov eax, dword [ebp - 0x24]
add eax, 1
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 2
jge 0x401374
call fcn.004029d0
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0xffffffff
jne 0x401368
call fcn.00402740
sub eax, dword [ebp - 0x30]
cmp eax, 0x12
jge 0x401368
jmp 0x40134b
mov ecx, dword [ebp - 0x24]
mov dl, byte [ebp - 0x34]
mov byte [ebp + ecx - 0x18], dl
jmp 0x40133c
push 0x412b78
lea eax, [ebp - 0x18]
push eax
call fcn.00402e90
add esp, 8
test eax, eax
jne 0x401392
mov dword [ebp - 4], 3
jmp 0x4013c9
push 0x412b7c
lea ecx, [ebp - 0x18]
push ecx
call fcn.00402e90
add esp, 8
test eax, eax
jne 0x4013b0
mov dword [ebp - 4], 2
jmp 0x4013c9
push 0x412b80
call fcn.00402c37
add esp, 4
call section..text
push 1
call fcn.00402bf7
call fcn.00402920
push str.Ok._n
call fcn.00402c37
add esp, 4
push str._nProgram_upload...
call fcn.00402c37
add esp, 4
cmp dword [ebp - 4], 2
jne 0x401420
push 0x412bc4
call fcn.00402c37
add esp, 4
push str.LA4000_r
call fcn.00401030
add esp, 4
push 1
push 0x412bd4
call fcn.00401060
add esp, 8
mov dword [ebp - 0x28], 0x40a040
jmp 0x401456
cmp dword [ebp - 4], 3
jne 0x401456
push 0x412bd8
call fcn.00402c37
add esp, 4
push str.LA8800_r
call fcn.00401030
add esp, 4
push 1
push 0x412be8
call fcn.00401060
add esp, 8
mov dword [ebp - 0x28], 0x40a8f0
mov edx, dword [ebp - 0x28]
mov ax, word [edx]
mov word [ebp - 0x2c], ax
mov ecx, dword [ebp - 0x28]
add ecx, 2
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x34], 0
movzx edx, word [ebp - 0x2c]
test edx, edx
je 0x40157c
cmp dword [ebp - 0x20], 0
jne 0x401496
push 0x412bec
call fcn.00401030
add esp, 4
mov eax, dword [ebp - 0x28]
movzx ecx, word [eax]
mov dword [ebp - 0x98], ecx
mov edx, dword [ebp - 0x98]
push edx
push str._04X
lea eax, [ebp - 0x18]
push eax
call fcn.00402e38
add esp, 0xc
mov ecx, dword [ebp - 0x28]
add ecx, 2
mov dword [ebp - 0x28], ecx
lea edx, [ebp - 0x18]
push edx
call fcn.00401030
add esp, 4
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xc
jne 0x40156b
push 0x412bf8
call fcn.00401030
add esp, 4
push 1
push 0x412bfc
call fcn.00401060
add esp, 8
mov ecx, dword [ebp - 0x34]
add ecx, 1
mov dword [ebp - 0x34], ecx
cmp dword [ebp - 0x34], 4
jne 0x401564
mov edx, dword [0x421ad4]
sub edx, 1
mov dword [0x421ad4], edx
js 0x401548
mov eax, dword [0x421ad0]
mov byte [eax], 0x2e
mov ecx, 0x2e
and ecx, 0xff
mov dword [ebp - 0x9c], ecx
mov edx, dword [0x421ad0]
add edx, 1
mov dword [0x421ad0], edx
jmp 0x40155d
push 0x421ad0
push 0x2e
call fcn.00402c68
add esp, 8
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x20], 0
mov ax, word [ebp - 0x2c]
sub ax, 1
mov word [ebp - 0x2c], ax
jmp 0x401477
cmp dword [ebp - 0x20], 0
jle 0x40159e
push 0x412c00
call fcn.00401030
add esp, 4
push 1
push 0x412c04
call fcn.00401060
add esp, 8
push 0x412c08
call fcn.00402c37
add esp, 4
push str.Data_upload...
call fcn.00402c37
add esp, 4
push str.D0000_r
call fcn.00401030
add esp, 4
push 0xa
push str.______
call fcn.00401060
add esp, 8
cmp dword [ebp - 4], 2
jne 0x401e47
push str.C2...
call fcn.00402c37
add esp, 4
mov dword [0x422360], 0
mov dword [ebp - 0x40], 0x40b0d0
mov ecx, dword [ebp - 0x40]
mov dx, word [ecx]
mov word [ebp - 0x44], dx
mov eax, dword [ebp - 0x40]
add eax, 2
mov dword [ebp - 0x40], eax
movzx ecx, word [ebp - 0x44]
and ecx, 0xff
push ecx
call fcn.00402940
add esp, 4
movzx edx, word [ebp - 0x44]
sar edx, 8
push edx
call fcn.00402940
add esp, 4
movzx eax, word [ebp - 0x44]
test eax, eax
je 0x401689
mov ecx, dword [ebp - 0x40]
movzx edx, word [ecx]
and edx, 0xff
push edx
call fcn.00402940
add esp, 4
mov eax, dword [ebp - 0x40]
movzx ecx, word [eax]
sar ecx, 8
push ecx
call fcn.00402940
add esp, 4
mov edx, dword [ebp - 0x40]
movzx eax, word [edx]
add eax, dword [0x422360]
mov dword [0x422360], eax
mov ecx, dword [ebp - 0x40]
add ecx, 2
mov dword [ebp - 0x40], ecx
mov dx, word [ebp - 0x44]
sub dx, 1
mov word [ebp - 0x44], dx
jmp 0x401632
mov eax, dword [0x422360]
and eax, 0xff
push eax
call fcn.00402940
add esp, 4
mov ecx, dword [0x422360]
shr ecx, 8
push ecx
call fcn.00402940
add esp, 4
push 0x412c34
push 0x412c38
call fcn.00401ec0
add esp, 8
test eax, eax
je 0x4016c6
jmp 0x4016cb
jmp 0x4015eb
mov dword [0x422360], 0
mov dword [ebp - 0x48], 0x40b1d0
mov edx, dword [ebp - 0x48]
mov ax, word [edx]
mov word [ebp - 0x4c], ax
mov ecx, dword [ebp - 0x48]
add ecx, 2
mov dword [ebp - 0x48], ecx
movzx edx, word [ebp - 0x4c]
and edx, 0xff
push edx
call fcn.00402940
add esp, 4
movzx eax, word [ebp - 0x4c]
sar eax, 8
push eax
call fcn.00402940
add esp, 4
movzx ecx, word [ebp - 0x4c]
test ecx, ecx
je 0x401769
mov edx, dword [ebp - 0x48]
movzx eax, word [edx]
and eax, 0xff
push eax
call fcn.00402940
add esp, 4
mov ecx, dword [ebp - 0x48]
movzx edx, word [ecx]
sar edx, 8
push edx
call fcn.00402940
add esp, 4
mov eax, dword [ebp - 0x48]
movzx ecx, word [eax]
add ecx, dword [0x422360]
mov dword [0x422360], ecx
mov edx, dword [ebp - 0x48]
add edx, 2
mov dword [ebp - 0x48], edx
mov ax, word [ebp - 0x4c]
sub ax, 1
mov word [ebp - 0x4c], ax
jmp 0x401712
mov ecx, dword [0x422360]
and ecx, 0xff
push ecx
call fcn.00402940
add esp, 4
mov edx, dword [0x422360]
shr edx, 8
push edx
call fcn.00402940
add esp, 4
push 0x412c3c
push 0x412c40
call fcn.00401ec0
add esp, 8
test eax, eax
je 0x4017a8
jmp 0x4017ad
jmp 0x4016cb
mov dword [0x422360], 0
mov dword [ebp - 0x50], 0x40b2f0
mov eax, dword [ebp - 0x50]
mov cx, word [eax]
mov word [ebp - 0x54], cx
mov edx, dword [ebp - 0x50]
add edx, 2
mov dword [ebp - 0x50], edx
movzx eax, word [ebp - 0x54]
and eax, 0xff
push eax
call fcn.00402940
add esp, 4
movzx ecx, word [ebp - 0x54]
sar ecx, 8
push ecx
call fcn.00402940
add esp, 4
movzx edx, word [ebp - 0x54]
test edx, edx
je 0x40184b
mov eax, dword [ebp - 0x50]
movzx ecx, word [eax]
and ecx, 0xff
push ecx
call fcn.00402940
add esp, 4
mov edx, dword [ebp - 0x50]
movzx eax, word [edx]
sar eax, 8
push eax
call fcn.00402940
add esp, 4
mov ecx, dword [ebp - 0x50]
movzx edx, word [ecx]
add edx, dword [0x422360]
mov dword [0x422360], edx
mov eax, dword [ebp - 0x50]
add eax, 2
mov dword [ebp - 0x50], eax
mov cx, word [ebp - 0x54]
sub cx, 1
mov word [ebp - 0x54], cx
jmp 0x4017f3
mov edx, dword [0x422360]
and edx, 0xff
push edx
call fcn.00402940
add esp, 4
mov eax, dword [0x422360]
shr eax, 8
push eax
call fcn.00402940
add esp, 4
push 0x412c44
push 0x412c48
call fcn.00401ec0
add esp, 8
test eax, eax
je 0x401889
jmp 0x40188e
jmp 0x4017ad
mov dword [0x422360], 0
mov dword [ebp - 0x58], 0x40b410
mov ecx, dword [ebp - 0x58]
mov dx, word [ecx]
mov word [ebp - 0x5c], dx
mov eax, dword [ebp - 0x58]
add eax, 2
mov dword [ebp - 0x58], eax
movzx ecx, word [ebp - 0x5c]
and ecx, 0xff
push ecx
call fcn.00402940
add esp, 4
movzx edx, word [ebp - 0x5c]
sar edx, 8
push edx
call fcn.00402940
add esp, 4
mov word [ebp - 0x64], 0
mov byte [ebp - 0x60], 0
mov byte [ebp - 0x5f], 0
movzx eax, word [ebp - 0x5c]
test eax, eax
je 0x4019c6
mov ecx, dword [ebp - 0x58]
movzx edx, word [ecx]
and edx, 0xff
push edx
call fcn.00402940
add esp, 4
mov eax, dword [ebp - 0x58]
movzx ecx, word [eax]
sar ecx, 8
push ecx
call fcn.00402940
add esp, 4
mov edx, dword [ebp - 0x58]
movzx eax, word [edx]
add eax, dword [0x422360]
mov dword [0x422360], eax
mov ecx, dword [ebp - 0x58]
add ecx, 2
mov dword [ebp - 0x58], ecx
mov dx, word [ebp - 0x5c]
sub dx, 1
mov word [ebp - 0x5c], dx
mov ax, word [ebp - 0x64]
add ax, 1
mov word [ebp - 0x64], ax
movzx ecx, word [ebp - 0x64]
cmp ecx, 0x100
jne 0x4019c1
mov dl, byte [ebp - 0x60]
add dl, 1
mov byte [ebp - 0x60], dl
mov word [ebp - 0x64], 0
push 1
lea eax, [ebp - 0x60]
push eax
call fcn.00401060
add esp, 8
mov ecx, dword [0x421ad4]
sub ecx, 1
mov dword [0x421ad4], ecx
js 0x4019ac
mov edx, dword [0x421ad0]
mov byte [edx], 0x2e
mov eax, 0x2e
and eax, 0xff
mov dword [ebp - 0xa0], eax
mov ecx, dword [0x421ad0]
add ecx, 1
mov dword [0x421ad0], ecx
jmp 0x4019c1
push 0x421ad0
push 0x2e
call fcn.00402c68
add esp, 8
mov dword [ebp - 0xa0], eax
jmp 0x4018e3
movzx edx, word [ebp - 0x64]
test edx, edx
je 0x401a3a
mov al, byte [ebp - 0x60]
add al, 1
mov byte [ebp - 0x60], al
mov word [ebp - 0x64], 0
push 1
lea ecx, [ebp - 0x60]
push ecx
call fcn.00401060
add esp, 8
mov edx, dword [0x421ad4]
sub edx, 1
mov dword [0x421ad4], edx
js 0x401a25
mov eax, dword [0x421ad0]
mov byte [eax], 0x2e
mov ecx, 0x2e
and ecx, 0xff
mov dword [ebp - 0xa4], ecx
mov edx, dword [0x421ad0]
add edx, 1
mov dword [0x421ad0], edx
jmp 0x401a3a
push 0x421ad0
push 0x2e
call fcn.00402c68
add esp, 8
mov dword [ebp - 0xa4], eax
mov eax, dword [0x422360]
and eax, 0xff
push eax
call fcn.00402940
add esp, 4
mov ecx, dword [0x422360]
shr ecx, 8
push ecx
call fcn.00402940
add esp, 4
push 0x412c4c
push 0x412c50
call fcn.00401ec0
add esp, 8
test eax, eax
je 0x401a84
push 0x412c54
call fcn.00402c37
add esp, 4
jmp 0x401a89
jmp 0x40188e
push 0x412c58
call fcn.00402c37
add esp, 4
push 0x1e
push 0x412c64
call fcn.00401060
add esp, 8
push 0x412c68
call fcn.00402c37
add esp, 4
push 0x412c6c
call fcn.00402c37
add esp, 4
push 0x1e
push 0x412c78
call fcn.00401060
add esp, 8
push 0x412c7c
call fcn.00402c37
add esp, 4
push 0x412c80
call fcn.00402c37
add esp, 4
mov dword [ebp - 0x6c], 0
mov word [ebp - 0x70], 0
mov dx, word [ebp - 0x70]
mov word [ebp - 0x68], dx
call fcn.004029d0
mov dword [ebp - 0x88], eax
cmp dword [ebp - 0x88], 0xffffffff
je 0x401e40
cmp dword [ebp - 0x88], 0xd
jne 0x401b38
mov dword [ebp - 0x6c], 0
mov word [ebp - 0x70], 0
mov ax, word [ebp - 0x70]
mov word [ebp - 0x68], ax
jmp 0x401bbd
cmp dword [ebp - 0x88], 0x30
jl 0x401b6b
cmp dword [ebp - 0x88], 0x39
jg 0x401b6b
movzx ecx, word [ebp - 0x70]
shl ecx, 4
mov edx, dword [ebp - 0x88]
lea eax, [ecx + edx - 0x30]
mov word [ebp - 0x70], ax
mov dword [ebp - 0x88], 0x58
jmp 0x401bbd
cmp dword [ebp - 0x88], 0x41
jl 0x401b9e
cmp dword [ebp - 0x88], 0x46
jg 0x401b9e
movzx ecx, word [ebp - 0x70]
shl ecx, 4
mov edx, dword [ebp - 0x88]
lea eax, [ecx + edx - 0x37]
mov word [ebp - 0x70], ax
mov dword [ebp - 0x88], 0x58
jmp 0x401bbd
cmp dword [ebp - 0x88], 0x28
jne 0x401bbd
mov cx, word [ebp - 0x70]
mov word [ebp - 0x68], cx
mov word [ebp - 0x70], 0
mov dx, word [ebp - 0x68]
mov word [ebp - 0x68], dx
mov eax, dword [ebp - 0x6c]
mov cl, byte [ebp - 0x88]
mov byte [ebp + eax - 0x84], cl
mov edx, dword [ebp - 0x6c]
mov byte [ebp + edx - 0x83], 0
cmp dword [ebp - 0x6c], 0x12
jge 0x401be7
mov eax, dword [ebp - 0x6c]
add eax, 1
mov dword [ebp - 0x6c], eax
push 0x412c94
lea ecx, [ebp - 0x84]
push ecx
call fcn.00402e90
add esp, 8
test eax, eax
jne 0x401db2
call fcn.00402740
mov dword [ebp - 0x8c], eax
call fcn.00402740
sub eax, dword [ebp - 0x8c]
cmp eax, 0x12
jge 0x401c34
call fcn.004029d0
mov dword [ebp - 0x88], eax
cmp dword [ebp - 0x88], 0xffffffff
jne 0x401c34
jmp 0x401c0e
cmp dword [ebp - 0x88], 0xffffffff
jne 0x401c56
push 0x412c98
call fcn.00402c37
add esp, 4
call section..text
push 1
call fcn.00402bf7
cmp dword [ebp - 0x88], 0x41
jne 0x401c71
push 0x412cc0
call fcn.00402c37
add esp, 4
jmp 0x401d2a
mov edx, dword [ebp - 0x88]
sub edx, 0x41
and edx, 8
je 0x401c8b
mov dword [ebp - 0xa8], 0x412ce8
jmp 0x401c95
mov dword [ebp - 0xa8], 0x422140
mov eax, dword [ebp - 0x88]
sub eax, 0x41
and eax, 4
je 0x401caf
mov dword [ebp - 0xac], 0x412cf0
jmp 0x401cb9
mov dword [ebp - 0xac], 0x422141
mov ecx, dword [ebp - 0x88]
sub ecx, 0x41
and ecx, 2
je 0x401cd3
mov dword [ebp - 0xb0], 0x412cf8
jmp 0x401cdd
mov dword [ebp - 0xb0], 0x422142
mov edx, dword [ebp - 0x88]
sub edx, 0x41
and edx, 1
je 0x401cf7
mov dword [ebp - 0xb4], 0x412d00
jmp 0x401d01
mov dword [ebp - 0xb4], 0x422143
mov eax, dword [ebp - 0xa8]
push eax
mov ecx, dword [ebp - 0xac]
push ecx
mov edx, dword [ebp - 0xb0]
push edx
mov eax, dword [ebp - 0xb4]
push eax
push 0x412d08
call fcn.00402c37
add esp, 0x14
call fcn.00402740
mov dword [ebp - 0x8c], eax
call fcn.00402740
sub eax, dword [ebp - 0x8c]
cmp eax, 0x12
jge 0x401d5b
call fcn.004029d0
mov dword [ebp - 0x88], eax
cmp dword [ebp - 0x88], 0xffffffff
jne 0x401d5b
jmp 0x401d35
cmp dword [ebp - 0x88], 0xffffffff
jne 0x401d7d
push 0x412d34
call fcn.00402c37
add esp, 4
call section..text
push 1
call fcn.00402bf7
cmp dword [ebp - 0x88], 0x2d
jne 0x401da5
push 0x412d5c
call fcn.00402c37
add esp, 4
push 0x412d70
call fcn.00402c37
add esp, 4
call section..text
push 0x412da0
call fcn.00402c37
add esp, 4
push 0x412db4
lea ecx, [ebp - 0x84]
push ecx
call fcn.00402e90
add esp, 8
test eax, eax
jne 0x401dd8
movzx edx, word [ebp - 0x70]
cmp edx, 0xfe
jne 0x401dd8
jmp 0x401e45
push 0x412dbc
lea eax, [ebp - 0x84]
push eax
call fcn.00402e90
add esp, 8
test eax, eax
jne 0x401e40
mov ecx, dword [0x421ad4]
sub ecx, 1
mov dword [0x421ad4], ecx
js 0x401e2b
mov edx, dword [0x421ad0]
mov byte [edx], 0x2e
mov eax, 0x2e
and eax, 0xff
mov dword [ebp - 0xb8], eax
mov ecx, dword [0x421ad0]
add ecx, 1
mov dword [0x421ad0], ecx
jmp 0x401e40
push 0x421ad0
push 0x2e
call fcn.00402c68
add esp, 8
mov dword [ebp - 0xb8], eax
jmp 0x401afd
jmp 0x401e62
cmp dword [ebp - 4], 3
jne 0x401e62
call fcn.00401f60
test eax, eax
jne 0x401e62
call section..text
push 1
call fcn.00402bf7
push str.Ok_n_n
call fcn.00402c37
add esp, 4
push str.Reprogramming_completed_succesfully._n
call fcn.00402c37
add esp, 4
call section..text
jmp 0x401e85
xor eax, eax
mov esp, ebp
pop ebp
ret