Function at 0x4217a0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x144
mov eax, dword [0x457a00]
xor eax, esp
mov dword [esp + 0x140], eax
mov eax, dword [esp + 0x14c]
push ebx
push esi
push edi
push 6
xor edi, edi
push edi
push 0x450b78
push edi
mov esi, ecx
mov dword [esp + 0x28], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4217f6
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x140]
xor ecx, esp
call fcn.0042fb8f
add esp, 0x144
ret
push ebp
push 0xff
lea ecx, [esp + 0x55]
push edi
push ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
mov byte [esp + 0x5c], 0
call fcn.00433570
add esp, 0xc
mov dword [esp + 0x24], 0x1c
lea ebp, [esi + 0x434]
mov esi, dword [esp + 0x14]
lea edx, [esp + 0x24]
push edx
push esi
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
add esi, 1
test eax, eax
mov dword [esp + 0x14], esi
jne 0x421852
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x103
je 0x421cbe
push 0
push 0x100
lea eax, [esp + 0x58]
push eax
push 0
push 7
lea ecx, [esp + 0x38]
push ecx
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
je 0x421825
mov eax, 5
mov ecx, str.Ports
lea edx, [esp + 0x50]
mov esi, dword [edx]
cmp esi, dword [ecx]
jne 0x421898
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x421880
test eax, eax
je 0x4218f5
movzx esi, byte [edx]
movzx edi, byte [ecx]
sub esi, edi
jne 0x4218e7
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x4218f5
movzx esi, byte [edx]
movzx edi, byte [ecx]
sub esi, edi
jne 0x4218e7
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x4218f5
movzx esi, byte [edx]
movzx edi, byte [ecx]
sub esi, edi
jne 0x4218e7
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x4218f5
movzx esi, byte [edx]
movzx edx, byte [ecx]
sub esi, edx
je 0x4218f5
test esi, esi
mov eax, 1
jg 0x4218f7
or eax, 0xffffffff
jmp 0x4218f7
xor eax, eax
test eax, eax
jne 0x421903
lea edi, [eax + 1]
jmp 0x421993
mov eax, 4
mov ecx, str.Modem
lea edx, [esp + 0x50]
mov esi, dword [edx]
cmp esi, dword [ecx]
jne 0x421929
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x421911
test eax, eax
je 0x421986
movzx esi, byte [edx]
movzx edi, byte [ecx]
sub esi, edi
jne 0x421978
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x421986
movzx esi, byte [edx]
movzx edi, byte [ecx]
sub esi, edi
jne 0x421978
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x421986
movzx esi, byte [edx]
movzx edi, byte [ecx]
sub esi, edi
jne 0x421978
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x421986
movzx esi, byte [edx]
movzx eax, byte [ecx]
sub esi, eax
je 0x421986
test esi, esi
mov eax, 1
jg 0x421988
or eax, 0xffffffff
jmp 0x421988
xor eax, eax
test eax, eax
jne 0x421825
lea edi, [eax + 2]
push 0x438
lea esi, [ebp - 0x434]
push 0
push esi
call fcn.00433570
push 0x100
lea ecx, [esp + 0x60]
push 0
push ecx
call fcn.00433570
add esp, 0x18
push 0x20019
push 1
push 0
push 1
lea edx, [esp + 0x34]
push edx
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
cmp eax, 0xffffffff
je 0x421aa9
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x54]
push edx
lea ecx, [esp + 0x20]
push ecx
push 0
push str.PortName
push eax
mov dword [esp + 0x30], 0
mov dword [esp + 0x38], 0x100
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x421aa9
lea edx, [esp + 0x50]
push 0x450b74
push edx
mov dword [ebp - 0x430], edi
call fcn.00430890
add eax, 3
push eax
call fcn.00430dd5
xor ecx, ecx
mov word [esi], ax
movzx eax, ax
push eax
mov dword [esp + 0x51], ecx
mov dword [esp + 0x55], ecx
mov dword [esp + 0x59], ecx
mov word [esp + 0x5d], cx
mov byte [esp + 0x5f], cl
lea ecx, [esp + 0x50]
push str..COM_d
push ecx
mov byte [esp + 0x58], 0
call fcn.00430b35
add esp, 0x18
cmp dword [esp + 0x160], 1
mov dword [ebp], 1
jne 0x421aa9
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
lea edx, [esp + 0x58]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x421a9b
mov dword [ebp], 0
jmp 0x421aa9
push eax
mov dword [ebp], 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x100
lea eax, [esp + 0x54]
push 0
push eax
call fcn.00433570
mov esi, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
add esp, 0xc
push 0
push 0x100
lea ecx, [esp + 0x58]
push ecx
push 0
push 0xc
lea edx, [esp + 0x38]
push edx
push ebx
call esi
test eax, eax
je 0x421b06
lea eax, [esp + 0x50]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x421ae6
sub eax, edx
push eax
lea eax, [esp + 0x54]
push eax
lea ecx, [ebp - 0x42c]
push ecx
call fcn.0043dca0
add esp, 0xc
push 0x100
lea edx, [esp + 0x54]
push 0
push edx
call fcn.00433570
add esp, 0xc
push 0
push 0x100
lea eax, [esp + 0x58]
push eax
push 0
push 1
lea ecx, [esp + 0x38]
push ecx
push ebx
call esi
test eax, eax
je 0x421b60
lea eax, [esp + 0x50]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x421b40
sub eax, edx
push eax
lea edx, [esp + 0x54]
push edx
lea eax, [ebp - 0x305]
push eax
call fcn.0043dca0
add esp, 0xc
push 0x100
lea ecx, [esp + 0x54]
push 0
push ecx
call fcn.00433570
add esp, 0xc
push 0
push 0x100
lea edx, [esp + 0x58]
push edx
push 0
push 8
lea eax, [esp + 0x38]
push eax
push ebx
call esi
test eax, eax
je 0x421bb7
lea eax, [esp + 0x50]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x421b97
sub eax, edx
push eax
lea ecx, [esp + 0x54]
push ecx
lea edx, [ebp - 0x32c]
push edx
call fcn.0043dca0
add esp, 0xc
push 0x100
lea eax, [esp + 0x54]
push 0
push eax
call fcn.00433570
add esp, 0xc
push 0
push 0x100
lea ecx, [esp + 0x58]
push ecx
push 0
push 0xe
lea edx, [esp + 0x38]
push edx
push ebx
call esi
test eax, eax
je 0x421c10
lea eax, [esp + 0x50]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x421bf0
sub eax, edx
push eax
lea eax, [esp + 0x54]
push eax
lea ecx, [ebp - 0x205]
push ecx
call fcn.0043dca0
add esp, 0xc
push 0x100
lea edx, [esp + 0x54]
push 0
push edx
call fcn.00433570
add esp, 0xc
push 0
push 0x100
lea eax, [esp + 0x58]
push eax
push 0
push 0xd
lea ecx, [esp + 0x38]
push ecx
push ebx
call esi
test eax, eax
je 0x421c67
lea eax, [esp + 0x50]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x421c47
sub eax, edx
push eax
lea edx, [esp + 0x54]
push edx
lea eax, [ebp - 0x105]
push eax
call fcn.0043dca0
add esp, 0xc
push 0x100
lea ecx, [esp + 0x54]
push 0
push ecx
call fcn.00433570
add esp, 0xc
push 0
push 0x100
lea edx, [esp + 0x58]
push edx
push 0
push 0x1c
lea eax, [esp + 0x38]
push eax
push ebx
call esi
test eax, eax
je 0x421c9e
mov ecx, dword [esp + 0x50]
mov dword [ebp - 4], ecx
mov eax, dword [esp + 0x10]
add eax, 1
add ebp, 0x438
cmp eax, dword [esp + 0x158]
mov dword [esp + 0x10], eax
jle 0x421825
jmp 0x421ccf
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
push ebx
mov dword [eax], edx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov ecx, dword [esp + 0x150]
pop ebp
pop edi
pop esi
pop ebx
xor ecx, esp
mov al, 1
call fcn.0042fb8f
add esp, 0x144
ret