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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x240
push ebx
push ebp
push esi
push edi
xor ebp, ebp
push 0x42ea
mov dword [esp + 0x1c], ebp
xor esi, esi
mov dword [esp + 0x24], ebp
call fcn.00402b00
add esp, 4
test eax, eax
je 0x403f08
xor eax, eax
mov word [esp + 0x40], bp
mov ecx, 0x82
lea edi, [esp + 0x42]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x40]
push eax
call fcn.004039e0
add esp, 4
cmp word [esp + 0x40], bp
je 0x403f08
lea ecx, [esp + 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x403f08
test al, 0x10
je 0x403f08
lea edx, [esp + 0x40]
push edx
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
mov esi, eax
add esp, 4
add esi, 1
lea eax, [esi + esi]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
cmp edi, ebp
je 0x403f4c
lea ecx, [esp + 0x40]
push ecx
push esi
push edi
call fcn.004024b0
push ebp
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
xor edx, edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], edx
push ebp
mov dword [esp + 0x40], edx
mov dword [esp + 0x28], 0x1c
call edi
push 0x1770
call fcn.00402b00
add esp, 4
test eax, eax
jne 0x403f56
push 0x78
call edi
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x40c8a0]
cmp eax, ebp
jne 0x403f76
push ebp
push str.Setupapi.dll
call fcn.00402790
add esp, 8
cmp eax, ebp
mov dword [0x40c8a0], eax
je 0x403f4c
cmp dword [0x40c8b4], ebp
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
jne 0x403f9a
push str.SetupDiGetDevicePropertyW
push eax
call edi
cmp eax, ebp
mov dword [0x40c8b4], eax
je 0x403f4c
mov eax, dword [0x40c8a0]
cmp dword [0x40c8bc], ebp
jne 0x403fb8
push str.SetupGetInfDriverStoreLocationW
push eax
call edi
cmp eax, ebp
mov dword [0x40c8bc], eax
je 0x403f4c
mov eax, dword [0x40c8a0]
cmp dword [0x40c8b8], ebp
jne 0x403fd5
push str.SetupDiDestroyDeviceInfoList
push eax
call edi
cmp eax, ebp
mov dword [0x40c8b8], eax
je 0x403f4c
lea eax, [esp + 0x18]
push eax
push ebp
lea edi, [esp + 0x2c]
call fcn.00402c00
add esp, 8
test eax, eax
je 0x403f4c
mov ebx, dword [esp + 0x18]
push ebp
lea ecx, [esp + 0x18]
push ecx
push ebp
push ebp
lea edx, [esp + 0x2c]
push edx
push 0x409308
mov eax, edi
push eax
push ebx
mov dword [esp + 0x34], ebp
mov dword [esp + 0x3c], ebp
call dword [0x40c8b4]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4040be
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
lea ecx, [eax + eax]
push ecx
push 0x40
call edi
mov ebp, eax
test ebp, ebp
je 0x4040be
mov edx, dword [esp + 0x14]
push 0
push 0
push edx
push ebp
lea eax, [esp + 0x2c]
push eax
push 0x409308
lea ecx, [esp + 0x3c]
push ecx
push ebx
call dword [0x40c8b4]
test eax, eax
je 0x4040be
lea edx, [esp + 0x14]
push edx
push 0
push 0
push 0
push 0
push ebp
call dword [0x40c8bc]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4040be
add eax, eax
push eax
push 0x40
call edi
mov esi, eax
test esi, esi
je 0x4040be
mov ecx, dword [esp + 0x14]
push 0
push ecx
push esi
push 0
push 0
push ebp
call dword [0x40c8bc]
test eax, eax
je 0x4040be
call fcn.00402280
mov ebx, eax
sub ebx, esi
sar ebx, 1
sub ebx, 1
push esi
call fcn.004028c0
mov ebx, dword [esp + 0x1c]
add esp, 4
mov dword [esp + 0x20], eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
call esi
push ebp
call esi
test ebx, ebx
je 0x4040d5
push ebx
call dword [0x40c8b8]
mov esi, dword [esp + 0x20]
test esi, esi
je 0x4040e5
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret