Function at 0x402f80
Capabilities:
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x41c6a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x10], ecx
mov eax, dword [ecx + 0x48]
xor ebp, ebp
cmp eax, ebp
mov dword [esp + 0x2c], 1
mov dword [esp + 0x14], ebp
jle 0x40302f
lea edi, [ecx + 0x40]
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push eax
push ecx
mov ecx, edi
call fcn.00401390
mov esi, dword [eax]
mov eax, dword [esp + 0x38]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x402ff7
test cl, cl
je 0x402ff3
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x402ff7
add eax, 2
add esi, 2
test cl, cl
jne 0x402fcf
xor eax, eax
jmp 0x402ffc
sbb eax, eax
sbb eax, 0xffffffff
xor ebx, ebx
lea ecx, [esp + 0x18]
test eax, eax
sete bl
call fcn.00414f8b
test bl, bl
jne 0x403026
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
inc eax
mov edx, dword [ecx + 0x48]
mov dword [esp + 0x14], eax
cmp eax, edx
jl 0x402fb8
jmp 0x40302b
mov ebp, 1
mov ecx, dword [esp + 0x10]
xor edi, edi
cmp ebp, edi
jne 0x403041
push edi
push edi
push str.The_new_com_port_is_not_available
jmp 0x4031ad
mov eax, dword [ecx + 0x20]
mov dword [esp + 0x18], edi
cmp eax, edi
jle 0x4030bb
lea ebp, [ecx + 0x18]
lea edx, [esp + 0x1c]
push edi
push edx
mov ecx, ebp
call fcn.00401390
mov esi, dword [eax]
mov eax, dword [esp + 0x34]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x40308a
test cl, cl
je 0x403086
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x40308a
add eax, 2
add esi, 2
test cl, cl
jne 0x403062
xor eax, eax
jmp 0x40308f
sbb eax, eax
sbb eax, 0xffffffff
xor ebx, ebx
lea ecx, [esp + 0x1c]
test eax, eax
sete bl
call fcn.00414f8b
test bl, bl
jne 0x4030af
mov eax, dword [esp + 0x10]
inc edi
cmp edi, dword [eax + 0x20]
jl 0x40304f
jmp 0x4030b7
mov dword [esp + 0x18], 1
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x4030d1
push 0
push 0
push str.The_COM_port_was_not_found
jmp 0x4031ad
lea edx, [esp + 0x1c]
push edi
push edx
add ecx, 0x54
call fcn.00401390
mov edx, dword [eax]
lea ecx, [esp + 0x20]
push ecx
push 0
push 0x20019
push edx
push 0x80000002
mov byte [esp + 0x40], 2
call dword [0x42b564]
mov ebx, eax
lea ecx, [esp + 0x1c]
neg ebx
sbb ebx, ebx
mov byte [esp + 0x2c], 1
inc ebx
call fcn.00414f8b
test bl, bl
je 0x40316b
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x20]
push 4
push eax
push 1
push 0
push str.PORTNAME
push ecx
call dword [0x42b560]
test eax, eax
jne 0x4031a4
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x38]
push edx
mov eax, dword [esi + 0x30]
lea ecx, [eax + edi*4]
call fcn.0041508e
mov ecx, dword [esp + 0x14]
add esi, 0x40
push 1
push ecx
mov ecx, esi
call fcn.00410936
mov edx, dword [esp + 0x34]
mov eax, dword [esi + 8]
push edx
push eax
mov ecx, esi
call fcn.0041090a
lea ecx, [esp + 0x34]
mov byte [esp + 0x2c], 0
call fcn.00414f8b
lea ecx, [esp + 0x38]
mov dword [esp + 0x2c], 0xffffffff
call fcn.00414f8b
mov eax, 1
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x20
ret 8
push 0
push 0
push str.Unable_to_set_new_com_port
call fcn.004183de
lea ecx, [esp + 0x34]
mov byte [esp + 0x2c], 0
call fcn.00414f8b
lea ecx, [esp + 0x38]
mov dword [esp + 0x2c], 0xffffffff
call fcn.00414f8b
xor eax, eax
jmp 0x40318f