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

Disassembly:
push ebp
lea ebp, [esp - 0x1004]
mov eax, 0x1004
call fcn.00530230
push 0xffffffffffffffff
push 0x54ba7d
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x58cb30]
xor eax, ebp
mov dword [ebp + 0x1000], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [0x5b4340], 0
je 0x40e3ae
push 0
push 1
push 0x5b332a
mov ecx, 0x5c3bd0
call fcn.0040ab00
cmp eax, 1
jne 0x40e3ae
mov eax, dword [0x5a8ef0]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x10], 0
cmp eax, 3
je 0x40e190
cmp eax, 4
je 0x40e190
push 1
lea eax, [ebp - 0x10]
mov ecx, 0x5c3bd0
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00409b00
jmp 0x40e1a4
push 1
lea eax, [ebp - 0x10]
mov ecx, 0x5c3bd0
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.00409c90
cmp dword [ebp - 0x10], 0
je 0x40e3ae
push 0x800
lea eax, [ebp]
mov ecx, 0x5b432c
push eax
call fcn.004bdcd0
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40e210
push 0
push 0
push SysReAllocString
push SysReAllocString
push 0x800
lea eax, [ebp]
push eax
push 0x5a4ed8
call fcn.004c10c0
cmp eax, 6
je 0x40e200
cmp eax, 1
je 0x40e200
cmp eax, 3
jne 0x40e210
push dword [ebp - 0x14]
call fcn.0053041c
add esp, 4
jmp 0x40e3ae
push 0x558d34
lea eax, [ebp]
push eax
call fcn.004928f0
mov esi, eax
test esi, esi
jne 0x40e24d
lea eax, [ebp]
push eax
push 0x1f6
call fcn.004b7300
push eax
push 0x5b332a
call fcn.00504130
push dword [ebp - 0x14]
call fcn.0053041c
add esp, 0x10
jmp 0x40e3ae
mov eax, dword [0x5a8ef0]
cmp eax, 3
jne 0x40e2ab
push esi
push 0xff
call fcn.00539357
push esi
push 0xfe
call fcn.00539357
xor edi, edi
add esp, 0x10
cmp dword [ebp - 0x10], edi
jbe 0x40e395
jmp 0x40e280
mov eax, dword [ebp - 0x18]
push esi
movzx eax, word [eax + edi*2]
push eax
call fcn.00539357
mov eax, dword [ebp - 0x18]
push esi
movzx eax, byte [eax + edi*2 + 1]
push eax
call fcn.00539357
inc edi
add esp, 0x10
cmp edi, dword [ebp - 0x10]
jb 0x40e280
jmp 0x40e395
cmp eax, 4
jne 0x40e371
push esi
push 0xef
call fcn.00539357
push esi
push 0xbb
call fcn.00539357
push esi
push 0xbf
call fcn.00539357
mov eax, dword [ebp - 0x10]
xor edi, edi
mov dword [ebp - 0x2c], edi
add esp, 0x18
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], edi
lea ebx, [eax*4]
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x28], ebx
test ebx, ebx
je 0x40e32f
cmp ebx, 0x20
jbe 0x40e303
mov eax, ebx
mov dword [ebp - 0x1c], ebx
jmp 0x40e30b
mov eax, 0x20
mov dword [ebp - 0x1c], eax
push eax
push 0
call fcn.0053869a
mov edi, eax
add esp, 8
test edi, edi
jne 0x40e326
mov ecx, 0x5d381c
call fcn.00487da0
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], 0
push ebx
push edi
push dword [ebp - 0x18]
call fcn.004c1830
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40e345
push esi
sub ecx, edx
push ecx
push 1
push edi
call fcn.00539653
add esp, 0x10
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x40e395
push edi
call fcn.0053867f
add esp, 4
jmp 0x40e395
cmp eax, 2
jne 0x40e384
push dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
push eax
push eax
call dword [sym.imp.USER32.dll_CharToOemBuffA]
push esi
push dword [ebp - 0x10]
push 1
push dword [ebp - 0x14]
call fcn.00539653
add esp, 0x10
push esi
call fcn.005391cd
push dword [ebp - 0x14]
call fcn.0053041c
push dword [ebp - 0x18]
call fcn.0053041c
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1000]
xor ecx, ebp
call fcn.00530218
lea esp, [ebp + 0x1004]
pop ebp
ret 4