Function at 0x4078e7
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x40bccc]
push ebx
push edi
mov edi, dword [ebp + 0xc]
push 0x2001f
push 1
xor ebx, ebx
push ebx
push 1
push dword [edi + 4]
mov dword [ebp - 4], eax
push dword [edi]
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x407926
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x407ade
push esi
push 4
pop esi
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0xc]
push ecx
push ebx
push ebx
push 0x40bbf8
push eax
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40795a
cmp dword [ebp - 0xc], 1
setne al
lea eax, [eax*8 + 1]
mov dword [edi + 8], eax
jmp 0x40797b
xor eax, eax
inc eax
push esi
mov dword [edi + 8], eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push esi
push ebx
push 0x40bbf8
push dword [ebp - 0x10]
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push ebx
push str.TranceiverMode
push dword [ebp - 0x10]
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4079c2
mov eax, dword [ebp - 0xc]
cmp eax, ebx
jne 0x4079a6
mov dword [edi + 0xc], ebx
jmp 0x4079e0
xor ecx, ecx
inc ecx
cmp eax, ecx
je 0x4079b4
push 2
pop ecx
cmp eax, ecx
jne 0x4079b9
mov dword [edi + 0xc], ecx
jmp 0x4079e0
push 3
pop ecx
cmp eax, ecx
jne 0x4079e0
jmp 0x4079b4
push esi
lea eax, [ebp - 0x14]
push eax
push esi
push ebx
push str.TranceiverMode
push dword [ebp - 0x10]
mov dword [edi + 0xc], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push ebx
push str.RS485Mode
push dword [ebp - 0x10]
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x407a07
mov eax, dword [ebp - 0xc]
mov dword [edi + 0x10], eax
jmp 0x407a25
push esi
lea eax, [ebp - 0x14]
push eax
push esi
push ebx
push str.RS485Mode
push dword [ebp - 0x10]
mov dword [edi + 0x10], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push ebx
push str.EnableHWFlowControl
push dword [ebp - 0x10]
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x407a4f
cmp dword [ebp - 0xc], ebx
setne al
mov dword [edi + 0x14], eax
jmp 0x407a6d
push esi
lea eax, [ebp - 0x14]
push eax
push esi
push ebx
push str.EnableHWFlowControl
push dword [ebp - 0x10]
mov dword [edi + 0x14], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push ebx
push str.HWFlowControl
push dword [ebp - 0x10]
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
mov dword [ebp - 0x18], eax
jne 0x407ab0
cmp dword [ebp - 0xc], ebx
jne 0x407a99
mov dword [edi + 0x18], ebx
jmp 0x407ad1
xor eax, eax
inc eax
cmp dword [ebp - 0xc], eax
jne 0x407aa6
mov dword [edi + 0x18], eax
jmp 0x407ad1
push 2
pop eax
cmp dword [ebp - 0xc], eax
jne 0x407ad1
jmp 0x407aa1
push esi
lea eax, [ebp - 0x14]
push eax
push esi
push ebx
push str.HWFlowControl
push dword [ebp - 0x10]
mov dword [edi + 0x18], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [ebp - 0x18], eax
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x18]
pop esi
mov ecx, dword [ebp - 4]
pop edi
pop ebx
call fcn.00407e73
leave
ret 8