Function at 0x402cfe
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x106c
call fcn.00406b70
mov eax, dword [0x4071b4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0x22c
mov dword [ebp - 0x1064], eax
xor ebx, ebx
lea eax, [ebp - 0xa30]
mov edi, edx
mov esi, ecx
mov dword [ebp - 0x1058], edi
push ebx
push eax
mov dword [ebp - 0x106c], esi
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0xa30], 0x22c
lea eax, [ebp - 0xa30]
push eax
push edi
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstallParamsW]
test eax, eax
je 0x40311a
or dword [ebp - 0xa28], 0x4000800
lea eax, [ebp - 0xa30]
push eax
push edi
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiSetDeviceInstallParamsW]
xor edi, edi
inc edi
test eax, eax
je 0x402dc1
push edi
push dword [ebp - 0x1058]
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiBuildDriverInfoList]
test eax, eax
je 0x40311a
push dword [ebp - 0x1064]
push ebx
push edi
push dword [ebp - 0x1058]
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDriverInfoW]
neg eax
sbb eax, eax
neg eax
jmp 0x40311c
and dword [ebp - 0xa28], 0xfbfff7ff
push 0x20019
push 2
push ebx
push edi
push dword [ebp - 0x1058]
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
mov esi, eax
mov dword [ebp - 0x1068], esi
cmp esi, 0xffffffff
jne 0x402df4
push eax
jmp 0x403114
lea eax, [ebp - 0x105c]
mov dword [ebp - 0x105c], 0x208
push eax
lea eax, [ebp - 0xa0c]
push eax
lea eax, [ebp - 0x1060]
push eax
push ebx
push 0x401254
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x403113
cmp dword [ebp - 0x1060], edi
jne 0x403113
lea eax, [ebp - 0x105c]
mov dword [ebp - 0x105c], 0x200
push eax
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x1060]
push eax
push ebx
push 0x401264
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x403113
cmp dword [ebp - 0x1060], edi
jne 0x403113
lea eax, [ebp - 0x105c]
mov dword [ebp - 0x105c], 0x200
push eax
lea eax, [ebp - 0x604]
push eax
lea eax, [ebp - 0x1060]
push eax
push ebx
push 0x401280
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x403113
cmp dword [ebp - 0x1060], edi
jne 0x403113
lea eax, [ebp - 0x105c]
mov dword [ebp - 0x105c], 0x200
push eax
lea eax, [ebp - 0x804]
push eax
lea eax, [ebp - 0x1060]
push eax
push ebx
push 0x401298
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x1068]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x40311a
cmp dword [ebp - 0x1060], edi
jne 0x40311a
mov esi, dword [ebp - 0x106c]
lea eax, [ebp - 0x204]
push ebx
push 0x200
push eax
push ebx
push 0xb
push dword [ebp - 0x1058]
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
test eax, eax
je 0x40311a
or dword [ebp - 0xa2c], 0x10000
lea eax, [ebp - 0xa30]
or dword [ebp - 0xa28], 0x800
push eax
push dword [ebp - 0x1058]
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiSetDeviceInstallParamsW]
test eax, eax
je 0x40311a
push edi
push dword [ebp - 0x1058]
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiBuildDriverInfoList]
test eax, eax
je 0x40311a
push dword [ebp - 0x1064]
mov dword [ebp - 0x1068], ebx
push ebx
push edi
push dword [ebp - 0x1058]
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDriverInfoW]
test eax, eax
je 0x403101
mov eax, dword [ebp - 0x1064]
add eax, 0x20c
mov dword [ebp - 0x106c], eax
lea ecx, [ebp - 0x204]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x402fd3
test dx, dx
je 0x402fcf
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x402fd3
add eax, 4
add ecx, 4
test dx, dx
jne 0x402fad
mov eax, ebx
jmp 0x402fd7
sbb eax, eax
or eax, edi
test eax, eax
jne 0x4030cc
mov eax, dword [ebp - 0x1064]
lea ecx, [ebp - 0x404]
add eax, 0x40c
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x403016
test dx, dx
je 0x403012
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x403016
add eax, 4
add ecx, 4
test dx, dx
jne 0x402ff0
mov eax, ebx
jmp 0x40301a
sbb eax, eax
or eax, edi
test eax, eax
jne 0x4030cc
push ebx
mov eax, 0x622
push eax
mov dword [ebp - 0x1054], eax
lea eax, [ebp - 0x1054]
push eax
push dword [ebp - 0x1064]
push dword [ebp - 0x1058]
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDriverInfoDetailW]
test eax, eax
jne 0x403058
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4030cc
lea ecx, [ebp - 0x604]
lea eax, [ebp - 0x103c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40308a
test dx, dx
je 0x403086
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40308a
add eax, 4
add ecx, 4
test dx, dx
jne 0x403064
mov eax, ebx
jmp 0x40308e
sbb eax, eax
or eax, edi
test eax, eax
jne 0x4030cc
lea ecx, [ebp - 0x804]
lea eax, [ebp - 0xc34]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4030c4
test dx, dx
je 0x4030c0
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4030c4
add eax, 4
add ecx, 4
test dx, dx
jne 0x40309e
mov eax, ebx
jmp 0x4030c8
sbb eax, eax
or eax, edi
test eax, eax
je 0x4030fd
push dword [ebp - 0x1064]
mov eax, dword [ebp - 0x1068]
inc eax
push eax
push edi
push dword [ebp - 0x1058]
mov dword [ebp - 0x1068], eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDriverInfoW]
test eax, eax
je 0x403101
mov eax, dword [ebp - 0x106c]
jmp 0x402fa7
mov ebx, edi
jmp 0x40310f
push edi
push dword [ebp - 0x1058]
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDriverInfoList]
mov eax, ebx
jmp 0x40311c
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004065e0
mov esp, ebp
pop ebp
ret 4