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

Disassembly:
sub esp, 0x23c
mov eax, dword [0x49a11c]
xor eax, esp
mov dword [esp + 0x238], eax
push ebp
push esi
push edi
xor edi, edi
mov dword [esp + 0x10], 0
xor ebp, ebp
mov dword [esp + 0x14], 0
cmp dword [esp + 0x24c], edi
jne 0x411070
push 0x42ea
call fcn.0040e430
add esp, 4
test eax, eax
je 0x411032
push 0x20a
lea eax, [esp + 0x3c]
push edi
push eax
call fcn.0042fbd0
lea eax, [esp + 0x44]
push eax
call fcn.0040c460
xor eax, eax
add esp, 0x10
cmp ax, word [esp + 0x38]
je 0x411032
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x411032
test al, 0x10
je 0x411032
lea ecx, [esp + 0x38]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x410fe0
sub ecx, edx
sar ecx, 1
lea edi, [ecx + 1]
lea eax, [edi + edi]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x411070
lea eax, [esp + 0x38]
push eax
push edi
push esi
call fcn.0040f580
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
mov eax, esi
pop esi
pop ebp
mov ecx, dword [esp + 0x238]
xor ecx, esp
call fcn.0042e033
add esp, 0x23c
ret
xorps xmm0, xmm0
mov dword [esp + 0x1c], 0x1c
push 0
movlpd qword [esp + 0x24], xmm0
movlpd qword [esp + 0x2c], xmm0
movlpd qword [esp + 0x34], xmm0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x1770
call fcn.0040e430
add esp, 4
test eax, eax
jne 0x41108a
push 0x78
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x238]
xor ecx, esp
call fcn.0042e033
add esp, 0x23c
ret
mov eax, dword [0x49c4e8]
test eax, eax
jne 0x4110aa
push eax
push str.Setupapi.dll
call fcn.0040e630
add esp, 8
mov dword [0x49c4e8], eax
test eax, eax
je 0x411070
cmp dword [0x49c4fc], edi
jne 0x4110cc
push str.SetupDiGetDevicePropertyW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x49c4fc], eax
test eax, eax
je 0x411070
mov eax, dword [0x49c4e8]
cmp dword [0x49c504], edi
jne 0x4110ee
push str.SetupGetInfDriverStoreLocationW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x49c504], eax
test eax, eax
je 0x411070
mov eax, dword [0x49c4e8]
cmp dword [0x49c500], edi
jne 0x41110f
push str.SetupDiDestroyDeviceInfoList
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x49c500], eax
test eax, eax
je 0x411070
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x14]
push eax
push 0
call fcn.0040c150
add esp, 0xc
test eax, eax
je 0x411070
mov esi, dword [0x49c4fc]
lea eax, [esp + 0xc]
push 0
push eax
push 0
push 0
lea eax, [esp + 0x28]
mov dword [esp + 0x1c], edi
push eax
push 0x488e48
lea eax, [esp + 0x34]
mov dword [esp + 0x30], edi
push eax
mov eax, dword [esp + 0x2c]
mov ecx, esi
push eax
mov dword [esp + 0x30], eax
call dword [0x485320]
call esi
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4112b5
add eax, eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [esp + 0x14], eax
test eax, eax
je 0x4112b5
mov esi, dword [0x49c4fc]
mov ecx, esi
push 0
push 0
push dword [esp + 0x14]
push eax
lea eax, [esp + 0x28]
push eax
push 0x488e48
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x2c]
call dword [0x485320]
call esi
test eax, eax
je 0x4112b5
mov esi, dword [0x49c504]
lea eax, [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x18]
mov ecx, esi
push eax
push 0
push 0
push 0
push 0
push ebx
call dword [0x485320]
call esi
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4112b4
add eax, eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebp, eax
test ebp, ebp
je 0x4112b4
mov esi, dword [0x49c504]
mov ecx, esi
push 0
push dword [esp + 0x14]
push ebp
push 0
push 0
push ebx
call dword [0x485320]
call esi
test eax, eax
je 0x4112b4
push 0x5c
push ebp
call fcn.004304d0
add esp, 8
lea ebx, [eax + 2]
test eax, eax
jne 0x411239
mov ebx, ebp
sub ebx, ebp
sar ebx, 1
sub ebx, 1
js 0x4112b2
mov esi, ebp
lfence
lea ecx, [esi + 2]
nop word [eax + eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x411250
sub esi, ecx
sar esi, 1
cmp ebx, esi
cmovb esi, ebx
inc esi
lea eax, [esi + esi]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x4112b2
test esi, esi
je 0x4112a8
cmp esi, 0x7fffffff
ja 0x41129f
cmp ebx, 0x7ffffffe
ja 0x4112a3
push ebx
push ebp
push 0
push esi
push edi
lfence
call fcn.0040f5f0
test eax, eax
jns 0x4112b4
jmp 0x4112a8
test esi, esi
je 0x4112a8
xor eax, eax
mov word [edi], ax
push edi
lfence
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor edi, edi
pop ebx
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4112df
mov esi, dword [0x49c500]
mov ecx, esi
push eax
call dword [0x485320]
call esi
test edi, edi
je 0x4112eb
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esp + 0x244]
mov eax, edi
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0042e033
add esp, 0x23c
ret