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

Disassembly:
sub esp, 0x23c
mov eax, dword [0x4d57fc]
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 0x4184e0
push 0x42ea
call fcn.004160d0
add esp, 4
test eax, eax
je 0x4184a2
push 0x20a
lea eax, [esp + 0x3c]
push edi
push eax
call fcn.004638a0
lea eax, [esp + 0x44]
push eax
call fcn.004140f0
xor eax, eax
add esp, 0x10
cmp ax, word [esp + 0x38]
je 0x4184a2
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4184a2
test al, 0x10
je 0x4184a2
lea ecx, [esp + 0x38]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x418450
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 0x4184e0
lea eax, [esp + 0x38]
push eax
push edi
push esi
call fcn.00416a40
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.00461564
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.004160d0
add esp, 4
test eax, eax
jne 0x4184fa
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.00461564
add esp, 0x23c
ret
mov eax, dword [0x4d7770]
test eax, eax
jne 0x41851a
push eax
push str.Setupapi.dll
call fcn.004162d0
add esp, 8
mov dword [0x4d7770], eax
test eax, eax
je 0x4184e0
cmp dword [0x4d7784], edi
jne 0x41853c
push str.SetupDiGetDevicePropertyW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4d7784], eax
test eax, eax
je 0x4184e0
mov eax, dword [0x4d7770]
cmp dword [0x4d778c], edi
jne 0x41855e
push str.SetupGetInfDriverStoreLocationW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4d778c], eax
test eax, eax
je 0x4184e0
mov eax, dword [0x4d7770]
cmp dword [0x4d7788], edi
jne 0x41857f
push str.SetupDiDestroyDeviceInfoList
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4d7788], eax
test eax, eax
je 0x4184e0
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x14]
push eax
push 0
call fcn.00413de0
add esp, 0xc
test eax, eax
je 0x4184e0
mov esi, dword [0x4d7784]
lea eax, [esp + 0xc]
push 0
push eax
push 0
push 0
lea eax, [esp + 0x28]
mov dword [esp + 0x1c], edi
push eax
push 0x4bd008
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 [0x4b9328]
call esi
mov eax, dword [esp + 0xc]
test eax, eax
je 0x418725
add eax, eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [esp + 0x14], eax
test eax, eax
je 0x418725
mov esi, dword [0x4d7784]
mov ecx, esi
push 0
push 0
push dword [esp + 0x14]
push eax
lea eax, [esp + 0x28]
push eax
push 0x4bd008
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x2c]
call dword [0x4b9328]
call esi
test eax, eax
je 0x418725
mov esi, dword [0x4d778c]
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 [0x4b9328]
call esi
mov eax, dword [esp + 0x10]
test eax, eax
je 0x418724
add eax, eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebp, eax
test ebp, ebp
je 0x418724
mov esi, dword [0x4d778c]
mov ecx, esi
push 0
push dword [esp + 0x14]
push ebp
push 0
push 0
push ebx
call dword [0x4b9328]
call esi
test eax, eax
je 0x418724
push 0x5c
push ebp
call fcn.00464954
add esp, 8
lea ebx, [eax + 2]
test eax, eax
jne 0x4186a9
mov ebx, ebp
sub ebx, ebp
sar ebx, 1
sub ebx, 1
js 0x418722
mov esi, ebp
lfence
lea ecx, [esi + 2]
nop word [eax + eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4186c0
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 0x418722
test esi, esi
je 0x418718
cmp esi, 0x7fffffff
ja 0x41870f
cmp ebx, 0x7ffffffe
ja 0x418713
push ebx
push ebp
push 0
push esi
push edi
lfence
call fcn.00416ab0
test eax, eax
jns 0x418724
jmp 0x418718
test esi, esi
je 0x418718
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 0x41874f
mov esi, dword [0x4d7788]
mov ecx, esi
push eax
call dword [0x4b9328]
call esi
test edi, edi
je 0x41875b
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.00461564
add esp, 0x23c
ret