Function at 0x4043f0
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x21c
mov eax, dword [ecx + 4]
push esi
test eax, eax
mov dword [esp + 4], ecx
jne 0x404409
mov esi, str.SystemCurrentControlSetServicesClassPorts
jmp 0x404414
mov esi, str.SystemCurrentControlSetControlClass4D36E978_E325_11CE_BFC1_08002BE10318
push esi
call fcn.00405dc0
lea eax, [esp + 0xc]
push eax
push 0xf003f
push 0
push esi
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4045e8
mov edx, dword [esp + 0xc]
push ebp
mov ebp, 0x104
push edi
lea ecx, [esp + 0x124]
push ebp
push ecx
push eax
push edx
mov edi, 1
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x4045d3
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
xor esi, esi
push eax
push 0xf003f
lea ecx, [esp + 0x130]
push esi
push ecx
push edx
mov dword [esp + 0x30], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4045b2
lea eax, [esp + 0x14]
lea ecx, [esp + 0x24]
push eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x24]
push ecx
push edx
push esi
push str.DriverDesc
push eax
mov dword [esp + 0x2c], ebp
call ebx
test eax, eax
jne 0x404506
cmp dword [esp + 0x14], 4
jbe 0x404506
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x14]
call fcn.00405d90
push 0x19
lea edx, [esp + 0x28]
push str.usb_to_serial_port_driver
push edx
mov dword [esp + 0x20], ebp
call fcn.00410430
add esp, 0xc
test eax, eax
jne 0x4044ea
mov esi, 1
push 0x1b
lea eax, [esp + 0x28]
push str.usb_to_parallel_port_driver
push eax
call fcn.00410430
add esp, 0xc
test eax, eax
je 0x404575
test esi, esi
jne 0x40457a
lea ecx, [esp + 0x14]
lea edx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x24]
push edx
push eax
push 0
push str.PortDriver
push ecx
mov dword [esp + 0x2c], ebp
call ebx
test eax, eax
jne 0x40457a
cmp dword [esp + 0x14], 4
jbe 0x40457a
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x24]
push edx
call fcn.00405d90
push 8
lea eax, [esp + 0x28]
push str.mosusrpt
push eax
call fcn.00410430
add esp, 0xc
test eax, eax
jne 0x40455d
mov esi, 1
push 8
lea ecx, [esp + 0x28]
push str.mosuprpt
push ecx
call fcn.00410430
add esp, 0xc
test eax, eax
jne 0x40457a
mov esi, 1
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
mov dword [esp + 0x1c], 0
je 0x4045b2
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x128]
push eax
push ecx
mov ecx, dword [esp + 0x18]
call fcn.00405f20
test eax, eax
je 0x4045b2
sub edi, 2
jns 0x4045b2
xor edi, edi
lea edx, [esp + 0x128]
mov eax, edi
push ebp
push edx
push eax
mov eax, dword [esp + 0x24]
push eax
inc edi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
je 0x404464
pop ebx
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop ebp
pop esi
add esp, 0x21c
ret
cmp eax, 2
je 0x404631
push 0
lea edx, [esp + 8]
push 0
push edx
push 0x400
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov eax, dword [0x43acf0]
test eax, eax
je 0x404626
mov eax, dword [esp + 4]
push 0x40
push str.Registry_Error
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop esi
add esp, 0x21c
ret