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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3b4
push ebx
push esi
push edi
mov esi, str.AI98D.CheckAndBind
push dword [ebp + 0x18]
xor ebx, ebx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], ebx
push dword [ebp + 0x14]
mov dword [ebp - 0xc], 1
mov dword [ebp - 0x10], 4
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push esi
push str._s_hKey__lx___hClassKey__1x___hEnumKey__lx__h0000Key__1x___pBindingNo__1x__
push 6
call fcn.00407ea7
add esp, 0x20
lea eax, [ebp - 0x10]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push str.Class
push dword [ebp + 8]
call edi
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x4019f6
cmp dword [ebp - 0xc], 1
jne 0x401a3d
lea eax, [ebp - 0x20]
push 0x40ecf8
push eax
call dword [sym.imp.MSVCRT.dll__mbsicmp]
pop ecx
test eax, eax
pop ecx
jne 0x401a3d
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0x105
push eax
lea eax, [ebp - 0x1c0]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push str.Driver
push dword [ebp + 8]
call edi
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x4019d0
cmp dword [ebp - 0xc], 1
jne 0x401a3d
lea eax, [ebp - 0x1c0]
push str.NdiInterfaces
push eax
call sub.MSVCRT.dll_strcat
pop ecx
lea eax, [ebp - 0x14]
pop ecx
push eax
push 1
lea eax, [ebp - 0x1c0]
push ebx
push eax
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x4019a6
push 1
pop eax
push 0x40
mov dword [ebp + 0xc], eax
mov dword [ebp - 0x18], eax
pop eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0xb8]
push eax
lea eax, [ebp + 0xc]
push eax
push ebx
push str.LowerRange
push dword [ebp - 0x14]
call edi
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x401965
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push str.UpperRange
push dword [ebp - 0x14]
call edi
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x401965
cmp dword [ebp + 0xc], 1
jne 0x401998
cmp dword [ebp - 0x18], 1
jne 0x401998
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0xb8]
push eax
call fcn.0040118d
test eax, eax
je 0x401998
push str.bValidRange_LowerRange__UpperRange_
push esi
push str._s:_1:__s
push 6
call fcn.00407ea7
mov edi, dword [ebp + 0x18]
lea eax, [ebp - 0x38]
push dword [edi]
push str.MDC8021X_04d
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
mov eax, dword [edi]
add esp, 0x1c
cmp eax, ebx
lea ecx, [eax + 1]
mov dword [edi], ecx
je 0x4018ba
lea eax, [ebp - 0x2f]
mov ecx, dword [ebp - 0x1c]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0x14]
call fcn.0040121e
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x401998
push str.Binding_9_
push str.hEnumKey
push str.h0000Key
push str.dwCopy0000Key
push esi
push str._s:_2:__s__s___s___s_
push 6
call fcn.00407ea7
add esp, 0x1c
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp + 0x18]
push eax
push ebx
push 2
push ebx
push ebx
push ebx
push str.Bindings
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x40192d
push 1
push 0x40c39c
push 1
lea eax, [ebp - 0x38]
push ebx
push eax
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x401922
mov dword [ebp - 4], ebx
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x401998
push ebx
push 3
call fcn.00407ea7
pop ecx
test eax, eax
pop ecx
je 0x401998
push ebx
push ebx
lea ecx, [ebp - 0x3b4]
call fcn.0040847c
push eax
push str.failed
push str.RegCreateKeyEx
push esi
push str._s:__s__s:__s
push 3
call fcn.00407ea7
add esp, 0x18
jmp 0x401998
push ebx
push 3
call fcn.00407ea7
pop ecx
test eax, eax
pop ecx
je 0x401998
push ebx
lea ecx, [ebp - 0x3b4]
push dword [ebp - 8]
call fcn.0040847c
push eax
push str.RegQueryValueEx
push esi
push str._s:__s_34_failed:__s
push 3
call fcn.00407ea7
add esp, 0x14
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x401a3d
push ebx
push 3
call fcn.00407ea7
pop ecx
test eax, eax
pop ecx
je 0x401a3d
push ebx
lea ecx, [ebp - 0x3b4]
push dword [ebp - 4]
call fcn.0040847c
push eax
push esi
push str._s:_RegOpenKeyEx_failed:__s
jmp 0x401a33
push ebx
push 3
call fcn.00407ea7
pop ecx
test eax, eax
pop ecx
je 0x401a3d
push ebx
lea ecx, [ebp - 0x3b4]
push dword [ebp - 8]
call fcn.0040847c
push eax
push esi
push str._s:_RegQueryValueEx_2_failed:__s
jmp 0x401a33
cmp eax, 0xea
jne 0x401a0f
push esi
push str._s:_RegQueryValueEx_1_no_match_to_Net
push 3
call fcn.00407ea7
add esp, 0xc
jmp 0x401a3d
push ebx
push 3
call fcn.00407ea7
pop ecx
test eax, eax
pop ecx
je 0x401a3d
push ebx
lea ecx, [ebp - 0x3b4]
push dword [ebp - 8]
call fcn.0040847c
push eax
push esi
push str._s:_RegQueryValueEx_1_failed:__s
push 3
call fcn.00407ea7
add esp, 0x10
push dword [ebp - 4]
push esi
push str._s____d
push 6
call fcn.00407ea7
mov eax, dword [ebp - 4]
add esp, 0x10
pop edi
pop esi
pop ebx
leave
ret 0x14