Function at 0x40e160
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x284
mov eax, dword [0x46af24]
xor eax, esp
mov dword [esp + 0x280], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0xc], eax
mov eax, dword [esi + 0xc8]
push eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edx
call ebx
cmp eax, 0xffffffff
jne 0x40e3b2
cmp dword [ebp + 0x14], 0
jne 0x40e275
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x40e275
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x26e], eax
mov dword [esp + 0x272], eax
mov dword [esp + 0x276], eax
mov dword [esp + 0x27a], eax
mov dword [esp + 0x27e], eax
mov dword [esp + 0x282], eax
mov dword [esp + 0x286], eax
mov word [esp + 0x28a], ax
mov eax, dword [esi + 0xd0]
mov word [esp + 0x26c], cx
cmp word [eax], cx
je 0x40e275
cmp word [eax + 2], 0x3a
jne 0x40e275
push 2
push eax
lea edx, [esp + 0x274]
push edx
call dword [sym.imp.MSVCR100.dll_wcsncpy]
add esp, 0xc
lea ecx, [esp + 0x26c]
xor eax, eax
push ecx
mov word [esp + 0x274], ax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
test eax, eax
je 0x40e24f
cmp eax, 1
jne 0x40e275
lea edx, [esp + 0x26c]
push edx
call fcn.0040e000
add esp, 4
test eax, eax
je 0x40e275
mov eax, dword [esi + 0xc8]
push eax
call ebx
cmp eax, 0xffffffff
jne 0x40e3b2
cmp dword [ebp + 0x14], 0
mov ecx, dword [edi]
mov edi, dword [ecx + 0x9b4]
je 0x40e383
mov eax, dword [esi + 0xc8]
lea edx, [esp + 0x18]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x40e2ab
cmp dword [esp + 0x18], 0xffffffff
je 0x40e2ab
push eax
jmp 0x40e3a8
mov ecx, dword [esp + 0x14]
push ecx
call fcn.004507e5
add esp, 4
test eax, eax
je 0x40e2fc
mov edx, dword [esi + 0xc8]
push edx
push 0x1ed
push edi
call fcn.00402980
mov eax, dword [esp + 0x18]
add esp, 0xc
push eax
push 0xd0
push edi
call fcn.00402980
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x280]
xor ecx, esp
call fcn.004534b8
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x10]
mov dword [ecx], 1
mov edx, dword [esi + 0xc8]
push edx
call ebx
cmp eax, 0xffffffff
jne 0x40e3b2
mov ecx, dword [esi + 0xc8]
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40e338
cmp dword [esp + 0x18], 0xffffffff
jne 0x40e3a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0xc]
push edx
push 0xd0
push edi
mov esi, eax
call fcn.00402980
mov ecx, dword [edi + 8]
add esp, 0xc
push esi
call fcn.00443acb
push eax
mov ecx, edi
call fcn.004024a0
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x280]
xor ecx, esp
call fcn.004534b8
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0xc8]
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40e338
cmp dword [esp + 0x18], 0xffffffff
je 0x40e338
test ebx, ebx
je 0x40e3ae
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [esp + 0x28c]
pop edi
mov dword [esi + 0x70], edx
pop esi
pop ebx
xor ecx, esp
call fcn.004534b8
mov esp, ebp
pop ebp
ret