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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0xa00c
call fcn.00405a40
mov eax, dword [0x40f070]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0xc]
push edi
xor edi, edi
push 0x1ffe
mov dword [ebp - 0xa008], eax
lea eax, [ebp - 0x6002]
push edi
push eax
mov word [ebp - 0x6004], di
call sub.msvcrt.dll_memset
mov dword [ebp - 0xa00c], edi
mov edi, 0x2000
push edi
lea eax, [ebp - 0x2004]
push 0
push eax
call sub.msvcrt.dll_memset
push edi
lea eax, [ebp - 0x8004]
push 0
push eax
call sub.msvcrt.dll_memset
push edi
lea eax, [ebp - 0x4004]
push 0
push eax
call sub.msvcrt.dll_memset
push edi
lea eax, [ebp - 0xa004]
push 0
push eax
call sub.msvcrt.dll_memset
xor ecx, ecx
mov dword [esi], ecx
mov eax, dword [ebx + 8]
mov dword [esi + 8], eax
mov eax, dword [ebx + 0xc]
push edi
mov dword [esi + 0xc], eax
lea eax, [esi + 0x24]
push ecx
push eax
mov dword [esi + 0x10], 4
mov dword [esi + 0x14], 0x6018
mov dword [esi + 0x18], ecx
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0xa008]
and dword [esi + 0x20], 0
add esp, 0x48
cmp dword [eax + 0xc], 1
jne 0x404a06
lea ecx, [ebp - 0x2004]
push ecx
push ebx
push eax
call fcn.00403bf7
test eax, eax
je 0x404bff
mov eax, dword [ebp - 0xa008]
cmp dword [eax + 0xc], 3
jne 0x404a28
lea ecx, [ebp - 0x2004]
push ecx
push ebx
push eax
call fcn.00403c20
test eax, eax
je 0x404bff
mov eax, dword [ebp - 0xa008]
cmp dword [eax + 0xc], 4
jne 0x404a4a
lea ecx, [ebp - 0x2004]
push ecx
push ebx
push eax
call fcn.00403bce
test eax, eax
je 0x404bff
mov eax, dword [ebp - 0xa008]
push dword [eax + 0x10]
add eax, 0x14
push eax
lea eax, [ebp - 0x2004]
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0xa008]
push dword [eax + 0x2014]
add eax, 0x2018
push eax
lea eax, [ebp - 0x8004]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0x18
lea eax, [ebp - 0x8004]
push eax
call fcn.004046d1
test al, al
jne 0x404af1
lea eax, [ebp - 0x4004]
push eax
lea eax, [ebp - 0x2004]
push eax
call fcn.00403223
test eax, eax
je 0x404b63
lea eax, [ebp - 0x4004]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
and eax, 0x10
push eax
lea eax, [ebp - 0x6004]
push eax
lea eax, [ebp - 0x4004]
push eax
call fcn.00403260
lea eax, [ebp - 0x4004]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404afa
lea eax, [ebp - 0x6004]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x404afa
and dword [ebp - 0xa00c], 0
jmp 0x404b63
lea eax, [ebp - 0x8004]
push eax
call fcn.004047ea
lea eax, [ebp - 0x4004]
push eax
push 0x1000
lea eax, [ebp - 0x2004]
push eax
call fcn.00402300
lea eax, [ebp - 0xa004]
push eax
lea eax, [ebp - 0x4004]
push eax
call fcn.0040349f
test eax, eax
je 0x404b63
lea eax, [ebp - 0xa004]
push eax
call fcn.00403904
lea eax, [ebp - 0xa004]
push eax
push 0x1000
lea eax, [ebp - 0x2004]
push eax
call fcn.00402300
mov dword [ebp - 0xa00c], 1
xor eax, eax
cmp dword [ebp - 0xa00c], eax
mov dword [esi], eax
mov ecx, dword [ebx + 8]
mov dword [esi + 8], ecx
mov ecx, dword [ebx + 0xc]
mov dword [esi + 0xc], ecx
mov dword [esi + 0x10], 4
mov dword [esi + 0x14], 0x6018
mov dword [esi + 0x18], eax
je 0x404b93
mov dword [esi + 0x18], 1
push edi
push eax
lea edi, [esi + 0x24]
push edi
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x4019ac
mov ebx, 0x1f9c
push ebx
push edi
call fcn.00402300
lea eax, [ebp - 0x2004]
push eax
push ebx
push edi
call fcn.00402fdb
mov eax, edi
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x404bc5
sub eax, ecx
sar eax, 1
lea eax, [eax + eax + 2]
mov dword [esi + 0x20], eax
cmp dword [0x446a10], 0
je 0x404bff
lea eax, [esi + 0x24]
push eax
push dword [esi + 0x18]
push dword [0x446a0c]
push 0x401a48
push 5
call fcn.00402ca2
add esp, 0x14
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405a18
leave
ret 0xc