Function at 0x40f380
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56939a
mov eax, dword fs:[0]
push eax
sub esp, 0x1e8
mov eax, dword [0x5d4050]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], 0
lea eax, [ebp + 0xc]
cmp dword [ebp + 0x20], 0x10
cmovae eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40f460
xorps xmm0, xmm0
mov dword [ebp - 0x120], 0
movq qword [ebp - 0x128], xmm0
mov dword [ebp - 0x128], 0
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x120], 0
lea ecx, [ebp - 0x128]
call fcn.00404d20
push 0
mov byte [ebp - 4], 2
lea eax, [ebp + 0xc]
cmp dword [ebp + 0x20], 0x10
push 2
cmovae eax, dword [ebp + 0xc]
push 0
push eax
mov dword [ebp - 0x144], 0
call dword [sym.imp.SETUPAPI.dll_SetupOpenInfFileA]
mov dword [ebp - 0x184], eax
cmp eax, 0xffffffff
jne 0x40f47a
mov esi, dword [ebp - 0x128]
test esi, esi
je 0x40f460
push dword [ebp - 0x124]
push esi
call fcn.00404d70
push esi
call fcn.00421c08
add esp, 4
cmp dword [ebp + 0x20], 0x10
jb 0x40f9e7
push dword [ebp + 0xc]
call fcn.00421c08
add esp, 4
jmp 0x40f9e7
mov ebx, dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineA]
lea ecx, [ebp - 0x154]
push ecx
push str.ClassGUID
push str.Version
push eax
call ebx
test eax, eax
je 0x40f441
push 0x100
call fcn.00421c0d
add esp, 4
mov esi, eax
lea eax, [ebp - 0x144]
push eax
push 0x100
push esi
push 1
lea eax, [ebp - 0x154]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetStringFieldA]
mov edx, esi
lea ecx, [ebp - 0x19c]
call fcn.00417820
cmp dword [eax + 0x14], 8
jb 0x40f4d8
mov eax, dword [eax]
lea ecx, [ebp - 0x164]
push ecx
push eax
call dword [sym.imp.ole32.dll_CLSIDFromString]
cmp dword [ebp - 0x188], 8
movdqu xmm0, xmmword [ebp - 0x164]
movdqu xmmword [ebp - 0x1f4], xmm0
jb 0x40f50d
push dword [ebp - 0x19c]
call fcn.00421c08
add esp, 4
mov esi, dword [ebp - 0x184]
lea eax, [ebp - 0x154]
push eax
push 0
push str.Manufacturer
push esi
call ebx
test eax, eax
je 0x40f9d4
mov ebx, dword [sym.imp.SETUPAPI.dll_SetupFindNextLine]
test eax, eax
je 0x40f96a
push 0x100
call fcn.00421c0d
add esp, 4
mov dword [ebp - 0x180], 0
mov edi, eax
lea eax, [ebp - 0x180]
push eax
push 0x100
push edi
push 1
lea eax, [ebp - 0x154]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetMultiSzFieldA]
cmp dword [ebp - 0x180], 0x100
jbe 0x40f5ac
push edi
call fcn.00421c08
add esp, 4
push dword [ebp - 0x180]
call fcn.00421c0d
add esp, 4
mov edi, eax
lea eax, [ebp - 0x154]
push 0
push dword [ebp - 0x180]
push edi
push 1
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetMultiSzFieldA]
test eax, eax
je 0x40f95b
cmp byte [edi], 0
mov dword [ebp - 0x168], 0xf
mov dword [ebp - 0x16c], 0
mov byte [ebp - 0x17c], 0
jne 0x40f5d8
xor ecx, ecx
jmp 0x40f5e9
mov ecx, edi
lea edx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40f5e0
sub ecx, edx
push ecx
push edi
lea ecx, [ebp - 0x17c]
call fcn.00402bf0
push 0xffffffffffffffff
mov byte [ebp - 4], 3
lea eax, [ebp - 0x17c]
push 0
push eax
lea ecx, [ebp - 0x140]
mov dword [ebp - 0x12c], 0xf
mov dword [ebp - 0x130], 0
mov byte [ebp - 0x140], 0
call fcn.00402ac0
mov byte [ebp - 4], 4
nop
cmp dword [ebp - 0x12c], 0x10
lea ecx, [ebp - 0x164]
push ecx
lea eax, [ebp - 0x140]
cmovae eax, dword [ebp - 0x140]
push 0
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineA]
test eax, eax
je 0x40f6f1
lea ecx, [ecx]
push 0xff
lea eax, [ebp - 0x11b]
mov byte [ebp - 0x11c], 0
push 0
push eax
call fcn.0054d610
add esp, 0xc
lea eax, [ebp - 0x11c]
push 0
push 0x100
push eax
push 2
lea eax, [ebp - 0x164]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetStringFieldA]
test eax, eax
je 0x40f6da
lea edx, [ebp - 0x11c]
lea ecx, [ebp - 0x19c]
call fcn.004173c0
push eax
lea ecx, [ebp - 0x128]
mov byte [ebp - 4], 5
call fcn.00410720
mov byte [ebp - 4], 4
cmp dword [ebp - 0x188], 0x10
jb 0x40f6da
push dword [ebp - 0x19c]
call fcn.00421c08
add esp, 4
lea eax, [ebp - 0x164]
push eax
push eax
call ebx
test eax, eax
jne 0x40f660
jmp 0x40f90e
mov dword [ebp - 0x1a0], 0xf
mov dword [ebp - 0x1a4], 0
mov byte [ebp - 0x1b4], 0
cmp byte [edi], 0
jne 0x40f715
xor ecx, ecx
jmp 0x40f729
mov ecx, edi
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40f720
sub ecx, edx
push ecx
push edi
lea ecx, [ebp - 0x1b4]
call fcn.00402bf0
mov eax, dword [ebp - 0x1a4]
inc eax
add edi, eax
cmp dword [ebp - 0x1a0], 0x10
jb 0x40f756
push dword [ebp - 0x1b4]
call fcn.00421c08
add esp, 4
mov dword [ebp - 0x1a0], 0xf
mov dword [ebp - 0x1a4], 0
mov byte [ebp - 0x1b4], 0
cmp byte [edi], 0
mov dword [ebp - 0x1b8], 0xf
mov dword [ebp - 0x1bc], 0
mov byte [ebp - 0x1cc], 0
jne 0x40f795
xor eax, eax
jmp 0x40f7a9
mov eax, edi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f7a0
sub eax, edx
push eax
push edi
lea ecx, [ebp - 0x1cc]
call fcn.00402bf0
push 0x5b09ac
lea edx, [ebp - 0x17c]
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x19c]
call fcn.00403b60
add esp, 4
lea ecx, [ebp - 0x1cc]
mov byte [ebp - 4], 7
push ecx
mov edx, eax
lea ecx, [ebp - 0x1e4]
call fcn.00403c50
mov esi, eax
add esp, 4
lea eax, [ebp - 0x140]
cmp eax, esi
je 0x40f880
cmp dword [ebp - 0x12c], 0x10
jb 0x40f815
push dword [ebp - 0x140]
call fcn.00421c08
add esp, 4
mov dword [ebp - 0x12c], 0xf
mov dword [ebp - 0x130], 0
mov byte [ebp - 0x140], 0
cmp dword [esi + 0x14], 0x10
jae 0x40f84f
mov eax, dword [esi + 0x10]
inc eax
je 0x40f85d
push eax
lea eax, [ebp - 0x140]
push esi
push eax
call fcn.0054a070
add esp, 0xc
jmp 0x40f85d
mov eax, dword [esi]
mov dword [ebp - 0x140], eax
mov dword [esi], 0
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x130], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x12c], eax
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], 0
mov byte [esi], 0
cmp dword [ebp - 0x1d0], 0x10
jb 0x40f897
push dword [ebp - 0x1e4]
call fcn.00421c08
add esp, 4
cmp dword [ebp - 0x188], 0x10
mov dword [ebp - 0x1d0], 0xf
mov dword [ebp - 0x1d4], 0
mov byte [ebp - 0x1e4], 0
jb 0x40f8c9
push dword [ebp - 0x19c]
call fcn.00421c08
add esp, 4
mov byte [ebp - 4], 4
cmp dword [ebp - 0x1b8], 0x10
mov dword [ebp - 0x188], 0xf
mov dword [ebp - 0x18c], 0
mov byte [ebp - 0x19c], 0
jb 0x40f8ff
push dword [ebp - 0x1cc]
call fcn.00421c08
add esp, 4
cmp byte [edi], 0
mov esi, dword [ebp - 0x184]
jne 0x40f630
cmp dword [ebp - 0x12c], 0x10
jb 0x40f925
push dword [ebp - 0x140]
call fcn.00421c08
add esp, 4
mov byte [ebp - 4], 2
cmp dword [ebp - 0x168], 0x10
mov dword [ebp - 0x12c], 0xf
mov dword [ebp - 0x130], 0
mov byte [ebp - 0x140], 0
jb 0x40f95b
push dword [ebp - 0x17c]
call fcn.00421c08
add esp, 4
lea eax, [ebp - 0x154]
push eax
push eax
call ebx
jmp 0x40f532
movdqu xmm0, xmmword [ebp - 0x1f4]
sub esp, 0x10
mov eax, esp
push dword [ebp + 8]
movdqu xmmword [eax], xmm0
sub esp, 0xc
lea eax, [ebp - 0x128]
mov ecx, esp
push eax
call fcn.00410670
call fcn.0040fa10
test al, al
je 0x40f9d4
test esi, esi
je 0x40f9a3
push esi
call dword [sym.imp.SETUPAPI.dll_SetupCloseInfFile]
lea ecx, [ebp - 0x128]
call fcn.00404e50
lea ecx, [ebp + 0xc]
call fcn.00402530
mov eax, 1
jmp 0x40f9e9
lea ecx, [ebp - 0x128]
call fcn.00404e50
lea ecx, [ebp + 0xc]
call fcn.00402530
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.00549fe1
mov esp, ebp
pop ebp
ret 0x1c