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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov eax, ecx
mov dword [ebp - 0x14], edx
xor ecx, ecx
mov dword [ebp - 8], eax
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x10], ecx
mov esi, ecx
mov dword [ebp - 0xc], edi
mov edx, 0x405780
mov ecx, eax
call fcn.00419e25
mov ebx, eax
mov dword [ebp - 0x18], ebx
test ebx, ebx
jne 0x4140fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ebx, dword [ebp - 8]
jmp 0x41425b
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x10]
jne 0x414103
sub ecx, edx
sar ecx, 1
cmp ecx, 1
jbe 0x414126
cmp word [ebx + 2], 0x5c
jne 0x414126
push 0x3f
pop eax
mov word [ebx + 2], ax
lea edx, [ebp - 1]
mov ecx, ebx
call fcn.0041c33c
test eax, eax
jns 0x414156
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
push eax
push 0x405798
push 3
call fcn.0041944e
add esp, 0xc
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4140f6
cmp byte [ebp - 1], 0
jne 0x41416c
push 0x405840
push 2
call fcn.0041944e
pop ecx
pop ecx
jmp 0x4140f6
lea edx, [ebp - 0xc]
mov ecx, ebx
call fcn.004142ed
test eax, eax
jne 0x4141a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x405888
push 3
call fcn.0041944e
add esp, 0xc
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [ebp - 0xc]
jmp 0x4140f6
mov edi, dword [ebp - 0xc]
xor ebx, ebx
cmp dword [edi + 8], ebx
jne 0x4141b2
push 0x4058fc
jmp 0x414161
push 0x405938
push 2
call fcn.0041944e
pop ecx
pop ecx
push edi
cmp dword [ebp - 0x14], ebx
je 0x4141ff
push ebx
mov ebx, dword [ebp - 8]
mov edx, 0x4059a0
push 0x405970
mov ecx, ebx
call fcn.0041438a
test eax, eax
jne 0x4141ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push 0x4059f0
jmp 0x414251
push edi
xor eax, eax
mov edx, 0x403c40
push eax
push 0x405a50
jmp 0x414238
mov ebx, dword [ebp - 8]
mov edx, 0x4039d0
push 0x403ea0
push 0x405a70
mov ecx, ebx
call fcn.0041438a
test eax, eax
jne 0x41422a
push 0x405aa8
push 3
call fcn.0041944e
pop ecx
pop ecx
push edi
xor eax, eax
mov edx, 0x4039d0
push eax
push 0x405b00
mov ecx, ebx
call fcn.0041438a
test eax, eax
jne 0x41425b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push 0x405b28
push 4
call fcn.0041944e
add esp, 0xc
mov edx, 0x405b90
mov ecx, ebx
call fcn.00419e25
mov ebx, eax
test ebx, ebx
jne 0x414277
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x4142ab
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4142ab
test al, 0x50
jne 0x4142ab
mov ecx, ebx
call fcn.0041b5fc
test eax, eax
jne 0x4142ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebx
push 0x405bd0
push 4
call fcn.0041944e
add esp, 0x10
xor ebx, ebx
test edi, edi
je 0x4142c0
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4142d6
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test esi, esi
je 0x4142e5
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4142e8
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret