Function at 0x43a370
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x18
push edi
mov edi, eax
or eax, 0xffffffff
test edi, edi
mov dword [esp + 0x10], eax
je 0x43a5d5
push ebp
push esi
mov eax, edi
call fcn.00439bd0
mov esi, eax
add esi, 1
xor ecx, ecx
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0044288b
add esp, 4
cmp esi, 0x7fffffff
mov ebp, eax
ja 0x43a3c3
mov eax, edi
mov edx, esi
mov ecx, ebp
call fcn.00402c70
test ebp, ebp
mov eax, ebp
je 0x43a3ea
cmp word [ebp], 0
je 0x43a3ea
mov esi, dword [sym.imp.USER32.dll_CharNextW]
cmp word [eax], 0x5c
jne 0x43a3e1
mov word [eax], 0x23
push eax
call esi
cmp word [eax], 0
jne 0x43a3d6
mov eax, ebp
call fcn.00439bd0
mov esi, eax
mov eax, 0x493948
call fcn.00439bd0
add esi, eax
mov eax, str.Device_Parameters
call fcn.00439bd0
add esi, eax
mov eax, str.Control
call fcn.00439bd0
add esi, eax
mov eax, 0x4939f8
call fcn.00439bd0
add esi, eax
mov eax, str.SYSTEMCurrentControlSetControlDeviceClasses
call fcn.00439bd0
lea edi, [esi + eax + 5]
xor ecx, ecx
mov eax, edi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0044288b
add esp, 4
cmp edi, 0x7fffffff
mov esi, eax
ja 0x43a464
mov eax, str.SYSTEMCurrentControlSetControlDeviceClasses
mov edx, edi
mov ecx, esi
call fcn.00402c70
push ebx
push 0x493948
mov eax, esi
call fcn.004254d0
push ebp
mov eax, esi
call fcn.004254d0
push 0x4939f8
mov eax, esi
call fcn.004254d0
push str.Control
mov eax, esi
call fcn.004254d0
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
add esp, 0x10
lea eax, [esp + 0x10]
push eax
push 0x20019
push 0
push esi
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
test eax, eax
jne 0x43a5b4
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x2c]
push eax
push 0
push str.Linked
push ecx
mov dword [esp + 0x38], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x43a4f5
cmp dword [esp + 0x14], eax
mov dword [esp + 0x18], 1
jne 0x43a4fd
mov dword [esp + 0x18], 0
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esp + 0x18], 0
je 0x43a5b4
cmp edi, 0x7fffffff
ja 0x43a529
mov eax, str.SYSTEMCurrentControlSetControlDeviceClasses
mov edx, edi
mov ecx, esi
call fcn.00402c70
push 0x493948
mov eax, esi
call fcn.004254d0
push ebp
mov eax, esi
call fcn.004254d0
push 0x4939f8
mov eax, esi
call fcn.004254d0
push str.Device_Parameters
mov eax, esi
call fcn.004254d0
add esp, 0x10
lea eax, [esp + 0x10]
push eax
push 0x20019
push 0
push esi
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
test eax, eax
jne 0x43a5b4
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x20], eax
lea eax, [esp + 0x2c]
push eax
push 0
push str.Port_Number
push ecx
mov dword [esp + 0x38], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x43a5a9
mov edx, dword [esp + 0x18]
mov dword [esp + 0x1c], edx
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
pop ebx
je 0x43a5c2
push esi
call fcn.00442886
add esp, 4
test ebp, ebp
je 0x43a5cf
push ebp
call fcn.00442886
add esp, 4
mov eax, dword [esp + 0x18]
pop esi
pop ebp
pop edi
add esp, 0x18
ret