Function at 0x42cf7f
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
mov eax, dword [0x637190]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
push 0x5cca70
mov edi, str.RemoveUnknownDevices
mov dword [ebp - 0x25c], ebx
push edi
push 5
call fcn.00424dad
push ebx
push str.pInfFile
push edi
push 4
call fcn.00424d8f
add esp, 0x1c
test ebx, ebx
jne 0x42cfd3
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x42d252
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x42cff9
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Inf_file_is_not_found._n
push edi
push 2
call fcn.00424dad
add esp, 0xc
jmp 0x42cfcc
push 4
xor ebx, ebx
push ebx
push ebx
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x42d011
push 6
jmp 0x42cfc6
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x1c
push eax
push ebx
push edi
mov dword [ebp - 0x258], ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x42d234
lea eax, [ebp - 0x250]
mov dword [ebp - 0x250], ebx
push eax
push 1
lea eax, [ebp - 0x20]
push eax
push edi
call fcn.00427f4e
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x42d061
cmp dword [ebp - 0x250], 0xd
jne 0x42d2d5
cmp dword [ebp - 0x250], 0xd
je 0x42d2ad
push ebx
push str.HardwareID___1_s__n
push str.RemoveUnknownDevices
push 4
call fcn.00424dad
push ebx
call fcn.0045a8a4
lea eax, [ebp - 0x250]
push eax
push 7
lea eax, [ebp - 0x20]
push eax
push edi
call fcn.00427f4e
mov ebx, eax
add esp, 0x24
test ebx, ebx
jne 0x42d0af
cmp dword [ebp - 0x250], 0xd
jne 0x42d2e4
push ebx
push str.ClassName___1_s__n
push str.RemoveUnknownDevices
push 4
call fcn.00424dad
add esp, 0x10
test ebx, ebx
je 0x42d137
push ebx
call fcn.0058edd4
pop ecx
test eax, eax
je 0x42d130
push str.Unknown
push ebx
call fcn.005921d4
pop ecx
pop ecx
test eax, eax
je 0x42d130
push ebx
call fcn.0045a8a4
lea eax, [ebp - 0x250]
push eax
push 9
lea eax, [ebp - 0x20]
push eax
push edi
call fcn.00427f4e
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x42d119
cmp dword [ebp - 0x250], 0xd
je 0x42d137
push str.Get_SPDRP_DRIVER_failed._n
jmp 0x42d2da
push ebx
call fcn.0058edd4
pop ecx
test eax, eax
je 0x42d130
push ebx
call fcn.0045a8a4
pop ecx
jmp 0x42d2ad
push ebx
call fcn.0045a8a4
pop ecx
push str.Unknown_device_has_been_found._n
mov ebx, str.RemoveUnknownDevices
push ebx
push 4
call fcn.00424dad
add esp, 0xc
mov dword [ebp - 0x24c], 0x22c
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstallParamsW]
test eax, eax
je 0x42d2ad
push dword [ebp - 0x25c]
or dword [ebp - 0x248], 0x10000
lea eax, [ebp - 0x228]
push 0x104
push eax
call fcn.00591d62
or dword [ebp - 0x244], 0x800
lea eax, [ebp - 0x24c]
add esp, 0xc
push eax
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiSetDeviceInstallParamsW]
test eax, eax
je 0x42d2ad
push 2
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiBuildDriverInfoList]
test eax, eax
je 0x42d2ad
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiSelectBestCompatDrv]
test eax, eax
je 0x42d2ad
push str.__Hit___n
push ebx
push 4
call fcn.00424dad
lea eax, [ebp - 0x250]
mov dword [ebp - 0x254], 0x40
push eax
push 0xa
lea eax, [ebp - 0x20]
push eax
push edi
call fcn.00427f4e
mov ecx, eax
add esp, 0x1c
test ecx, ecx
jne 0x42d262
cmp dword [ebp - 0x250], 0xd
je 0x42d297
push eax
call fcn.0045a8a4
mov dword [esp], str.Get_SPDRP_CONFIGFLAGS_failed._n
push ebx
push 2
call fcn.00424dad
add esp, 0xc
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
push 0x5cca8c
push str.RemoveUnknownDevices
push 5
call fcn.00424dad
xor eax, eax
add esp, 0xc
inc eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.0058f6bb
mov esp, ebp
pop ebp
ret
mov eax, dword [ecx]
push ecx
mov dword [ebp - 0x254], eax
call fcn.0045a8a4
cmp dword [ebp + 0xc], 0
pop ecx
je 0x42d28d
mov eax, dword [ebp - 0x254]
and eax, 0xffffffbf
or eax, 0x400
mov dword [ebp - 0x254], eax
jmp 0x42d297
and dword [ebp - 0x254], 0xfffffbff
push 4
lea eax, [ebp - 0x254]
push eax
push 0xa
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiSetDeviceRegistryPropertyW]
mov eax, dword [ebp - 0x258]
lea ecx, [ebp - 0x20]
inc eax
push ecx
push eax
push edi
mov dword [ebp - 0x258], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x42d234
xor ebx, ebx
jmp 0x42d032
push str.Get_SPDRP_HARDWAREID_failed._n
push str.RemoveUnknownDevices
jmp 0x42d22a
push str.Get_SPDRP_CLASS_failed._n
jmp 0x42d2da