Function at 0x40b160
Capabilities:
Delete registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x452491
mov eax, dword fs:[0]
push eax
sub esp, 0x268
mov eax, dword [0x469744]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x270], eax
mov edi, ecx
mov esi, edx
xor eax, eax
mov dword [ebp - 0x274], edi
mov dword [ebp - 0x268], esi
mov dword [ebp - 0x264], eax
imul edi, edi, 0x114
mov dword [ebp - 4], eax
add edi, dword [0x46a9b0]
xor ecx, ecx
push eax
lea edx, [edi + 0x20]
mov dword [ebp - 0x258], eax
mov dword [ebp - 0x228], eax
mov word [ebp - 0x238], cx
push edx
or eax, 0xffffffff
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x224], 7
call fcn.00406170
push 0x11c
lea eax, [ebp - 0x134]
mov byte [ebp - 4], 1
push 0
xor bl, bl
push eax
mov byte [ebp - 0x26c], bl
mov dword [esi], 0
call fcn.0043d4f0
add esp, 0xc
lea ecx, [ebp - 0x134]
push ecx
mov dword [ebp - 0x134], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [ebp - 0x130]
shl eax, 8
or eax, dword [ebp - 0x12c]
shl eax, 8
or eax, dword [ebp - 0x128]
shl eax, 8
cmp eax, 0xa37e600
jb 0x40b26d
push str.RS1_or_greater_detected.__DiInstallDriver_will_be_used_to_install_driver.
mov bl, 1
push 0x46a9d4
xor eax, eax
mov byte [ebp - 0x26c], bl
call fcn.0042d150
add esp, 8
cmp dword [ebp - 0x224], 8
mov eax, dword [ebp - 0x238]
jae 0x40b282
lea eax, [ebp - 0x238]
push eax
push str.INF___s
push 0x46a9d4
xor eax, eax
call fcn.0042d150
add esp, 0xc
push str.IsWow64Process
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x40b424
lea edx, [ebp - 0x25c]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
cmp dword [ebp - 0x25c], 0
setne al
test al, al
je 0x40b424
cmp dword [ebp - 0x224], 8
mov ecx, dword [ebp - 0x238]
jae 0x40b2ef
lea ecx, [ebp - 0x238]
mov eax, dword [ebp - 0x26c]
push eax
push 1
push 0x14
call fcn.0040bb60
xor esi, esi
mov dword [ebp - 0x258], eax
cmp eax, esi
jne 0x40b407
mov eax, dword [ebp - 0x264]
cmp eax, esi
je 0x40b320
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x264]
push ecx
push 0xf003f
push esi
push str.SoftwareIntelDifx64
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x264], esi
mov dword [ebp - 0x260], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x258], eax
cmp eax, esi
jne 0x40b537
mov ecx, dword [ebp - 0x264]
lea edx, [ebp - 0x25c]
push edx
lea eax, [ebp - 0x258]
push eax
push esi
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push str.Code
mov ebx, 4
push ecx
mov dword [ebp - 0x25c], ebx
call esi
mov ecx, dword [ebp - 0x264]
lea edx, [ebp - 0x25c]
push edx
lea eax, [ebp - 0x26c]
push eax
push 0
push 0
push str.Reboot
push ecx
mov dword [ebp - 0x25c], ebx
call esi
mov eax, dword [ebp - 0x268]
mov ecx, dword [ebp - 0x270]
xor edx, edx
cmp dword [ebp - 0x26c], 1
push ecx
sete dl
lea ecx, [ebp - 0x264]
mov dword [eax], edx
mov eax, str.StorePath
call fcn.0042d620
mov eax, dword [ebp - 0x264]
test eax, eax
je 0x40b3e8
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.SoftwareIntelDifx64
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x264], 0
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
jmp 0x40b531
push eax
push str.Error_0x_X_launching_Drv64.exe
push 0x46a9d4
mov eax, 2
call fcn.0042d150
add esp, 0xc
jmp 0x40b531
test bl, bl
je 0x40b479
push str.RS1_or_greater_detected__x86_.__Running_DiInstallDriver.
push 0x46a9d4
xor eax, eax
call fcn.0042d150
mov eax, dword [ebp - 0x238]
add esp, 8
cmp dword [ebp - 0x224], 8
jae 0x40b451
lea eax, [ebp - 0x238]
mov edx, dword [ebp - 0x268]
push edx
push 2
push eax
push 0
call dword [sym.imp.newdev.dll_DiInstallDriverW]
test eax, eax
jne 0x40b531
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DiInstllDriver_FAILED._Error_0x_X
jmp 0x40b40d
push 0
push 0x40aaf0
call dword [sym.imp.DIFXAPI.dll_DIFXAPISetLogCallbackW]
cmp dword [ebp - 0x224], 8
mov eax, dword [ebp - 0x238]
jae 0x40b49b
lea eax, [ebp - 0x238]
mov ecx, dword [ebp - 0x268]
push ecx
push 0
push 0x14
push eax
call dword [sym.imp.DIFXAPI.dll_DriverPackageInstallW]
mov dword [ebp - 0x258], eax
test eax, eax
je 0x40b4c5
cmp eax, 0xe000020b
je 0x40b4c5
cmp eax, 0x103
jne 0x40b537
cmp dword [ebp - 0x224], 8
mov eax, dword [ebp - 0x238]
mov dword [ebp - 0x25c], 0x104
jae 0x40b4e4
lea eax, [ebp - 0x238]
lea edx, [ebp - 0x25c]
push edx
lea ecx, [ebp - 0x21c]
push ecx
push eax
call dword [sym.imp.DIFXAPI.dll_DriverPackageGetPathW]
mov dword [ebp - 0x258], eax
test eax, eax
jne 0x40b537
lea eax, [ebp - 0x21c]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b510
mov esi, dword [ebp - 0x270]
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x21c]
call fcn.00406550
mov eax, dword [ebp - 0x258]
cmp eax, 0x47e
ja 0x40b5d1
je 0x40b57f
test eax, eax
je 0x40b6bf
cmp eax, 0x103
jne 0x40b5e7
push str.Installed_driver_is_better_match_for_the_device
push 0x46a9d4
mov eax, 1
call fcn.0042d150
mov dword [ebp - 0x258], 0
mov ebx, 8
jmp 0x40b7b4
push 0x7f01
push 1
push 0x80
push 0x7da
xor ecx, ecx
mov edx, 0x7e3
call fcn.00433b40
mov edx, dword [ebp - 0x258]
push edx
push str.DriverPackageInstall___Platform_not_Vista_or_higher
push 0x46a9d4
mov eax, 2
call fcn.0042d150
mov eax, dword [ebp - 0x258]
add esp, 0x1c
mov dword [0x46a9f8], eax
call fcn.0042d090
push 0
call fcn.0043afff
cmp eax, 0xe000020b
je 0x40b6a8
cmp eax, 0xe0000243
je 0x40b69e
push eax
push str.DriverPackageInstall_error_0x_X
push 0x46a9d4
mov eax, 2
call fcn.0042d150
xor ecx, ecx
add esp, 0xc
mov dword [ebp - 0x240], 7
mov dword [ebp - 0x244], 0
mov word [ebp - 0x254], cx
lea edx, [ebp - 0x254]
push edx
push 0x41
mov ecx, 0x46bf88
mov byte [ebp - 4], 2
call fcn.0042dd90
test al, al
jne 0x40b64a
lea eax, [ebp - 0x254]
push eax
push 0xe
mov ecx, 0x46bf88
call fcn.0042dd90
mov edx, dword [ebp - 0x254]
mov ebx, 8
cmp dword [ebp - 0x240], ebx
jae 0x40b663
lea edx, [ebp - 0x254]
push 0x7f01
push 1
push 0x80
push 0x7da
xor ecx, ecx
call fcn.00433b40
add esp, 0x10
cmp dword [ebp - 0x240], ebx
jb 0x40b7b7
mov ecx, dword [ebp - 0x254]
push ecx
call fcn.00439c00
add esp, 4
jmp 0x40b7b7
push str.Driver_install_was_cancelled__continuing_with_the_rest_of_the_installation.
jmp 0x40b55c
push str.Device_was_not_found
push 0x46a9d4
mov eax, 1
call fcn.0042d150
add esp, 8
mov eax, dword [ebp - 0x238]
mov ebx, 8
cmp dword [ebp - 0x224], ebx
jae 0x40b6d8
lea eax, [ebp - 0x238]
push eax
push str.Installation_source___s
push 0x46a9d4
xor eax, eax
call fcn.0042d150
mov eax, dword [ebp - 0x270]
add esp, 0xc
cmp dword [eax + 0x14], ebx
jb 0x40b6fa
mov eax, dword [eax]
push eax
push str.DriverStore_location___s
push 0x46a9d4
xor eax, eax
call fcn.0042d150
mov edx, dword [ebp - 0x268]
add esp, 0xc
cmp dword [edx], 0
mov eax, 0x458eac
jne 0x40b724
mov eax, 0x458eb4
push eax
push str.Package_Requires_Reboot___s
push 0x46a9d4
xor eax, eax
call fcn.0042d150
mov ecx, dword [0x46a9c4]
sub ecx, dword [0x46a9c0]
mov esi, dword [ebp - 0x274]
mov eax, 0x78787879
imul ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
add esp, 0xc
cmp eax, esi
jbe 0x40b7a0
sub esp, 0x1c
mov ecx, esp
xor edx, edx
mov dword [ebp - 0x274], esp
push edx
add edi, 0x58
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push edi
or eax, 0xffffffff
mov word [ecx], dx
call fcn.00406170
imul esi, esi, 0x110
add esi, dword [0x46a9c0]
mov ecx, esi
call fcn.0040acc0
jmp 0x40b7b7
push str.No_devices_found_for_driver._Skipping_uninstall_of_previous_driver.
push 0x46a9d4
mov eax, 2
call fcn.0042d150
add esp, 8
mov esi, dword [ebp - 0x258]
cmp dword [ebp - 0x224], ebx
jb 0x40b7d4
mov eax, dword [ebp - 0x238]
push eax
call fcn.00439c00
add esp, 4
mov eax, dword [ebp - 0x264]
xor ecx, ecx
mov dword [ebp - 0x224], 7
mov dword [ebp - 0x228], 0
mov word [ebp - 0x238], cx
test eax, eax
je 0x40b802
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00438876
mov esp, ebp
pop ebp
ret 4