Function at 0x40f719
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push edi
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0xac], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0xb8], 0
mov eax, dword [str.PNP_ID]
mov dword [ebp - 0x6c], eax
mov cx, word [0x45af98]
mov word [ebp - 0x68], cx
mov dl, byte [0x45af9a]
mov byte [ebp - 0x66], dl
xor eax, eax
mov byte [ebp - 0x65], al
mov ecx, dword [str.EnumPCI_]
mov dword [ebp - 0xa4], ecx
mov edx, dword [0x45afa0]
mov dword [ebp - 0xa0], edx
mov ax, word [0x45afa4]
mov word [ebp - 0x9c], ax
mov ecx, 0xa
xor eax, eax
lea edi, [ebp - 0x9a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, dword [str.FFFFFFFFFFFFFFFF]
mov dword [ebp - 0x5c], ecx
mov edx, dword [0x45afac]
mov dword [ebp - 0x58], edx
mov eax, dword [0x45afb0]
mov dword [ebp - 0x54], eax
mov ecx, dword [0x45afb4]
mov dword [ebp - 0x50], ecx
mov dl, byte [0x45afb8]
mov byte [ebp - 0x4c], dl
xor eax, eax
mov dword [ebp - 0x4b], eax
mov dword [ebp - 0x47], eax
mov dword [ebp - 0x43], eax
mov dword [ebp - 0x3f], eax
mov dword [ebp - 0x3b], eax
mov word [ebp - 0x37], ax
mov byte [ebp - 0x35], al
mov byte [ebp - 0x2c], 0
mov ecx, 0xa
xor eax, eax
lea edi, [ebp - 0x2b]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov dword [ebp - 0x64], 0
mov dword [ebp - 0xb4], 0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0xa8], 0
mov byte [ebp - 0x108], 0
mov ecx, 0x13
xor eax, eax
lea edi, [ebp - 0x107]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea ecx, [ebp - 0xb4]
push ecx
push 3
push 0
push 0x45afbc
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40f861
jmp 0x40fa43
mov dword [ebp - 0xac], 0x2a
lea edx, [ebp - 0xac]
push edx
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0xb8]
push ecx
push 0
lea edx, [ebp - 0x6c]
push edx
mov eax, dword [ebp - 0xb4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0xb0], eax
cmp dword [ebp - 0xb0], 0
je 0x40f8ac
mov ecx, dword [ebp - 0xb4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0xb4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0xa4]
push ecx
call fcn.00422890
add esp, 8
lea edx, [ebp - 0xb4]
push edx
push 3
push 0
lea eax, [ebp - 0xa4]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push 0
push 0
push 0
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x34]
push ecx
push 0
push 0
push 0
mov edx, dword [ebp - 0xb4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov dword [ebp - 0xb0], eax
mov eax, dword [ebp - 0x34]
sub eax, 1
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0xffffffff
je 0x40fa36
mov dword [ebp - 0x30], 0x50
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x30]
push ecx
lea edx, [ebp - 0x108]
push edx
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0xb4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov dword [ebp - 0xb0], eax
cmp dword [ebp - 0xb0], 0
jne 0x40fa1a
lea edx, [ebp - 0x70]
push edx
push 3
push 0
lea eax, [ebp - 0x108]
push eax
mov ecx, dword [ebp - 0xb4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40f992
mov edx, dword [ebp - 0xb4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0xa8], 0x14
mov eax, dword [ebp - 0xb8]
push eax
push 0x45ff78
push 1
push 0
push 0x45afd8
mov ecx, dword [ebp - 0x70]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea edx, [ebp - 0xb4]
push edx
push 3
push 0
push 0x45afe4
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov eax, dword [ebp - 0xb8]
push eax
push 0x45ff78
push 1
push 0
push str.PortName
mov ecx, dword [ebp - 0xb4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 0x70]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0xb4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x34]
sub ecx, 1
mov dword [ebp - 0x34], ecx
jmp 0x40fa31
mov edx, dword [ebp - 0x34]
sub edx, 1
mov dword [ebp - 0x34], edx
cmp dword [ebp - 0xb0], 0x103
jne 0x40fa31
jmp 0x40fa36
jmp 0x40f91d
mov eax, dword [ebp - 0xb4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov esp, ebp
pop ebp
ret