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

Disassembly:
push ebp
lea ebp, [esp - 0x6c]
sub esp, 0x120
push ebx
push esi
push dword [ebp + 0x7c]
xor esi, esi
lea ecx, [ebp + 8]
mov dword [ebp + 0x64], esi
call fcn.0040648e
lea eax, [ebp + 8]
push eax
push 0x42a000
push dword [ebp + 0x78]
lea eax, [ebp + 0x24]
push eax
call fcn.00409dfb
add esp, 0xc
push eax
lea eax, [ebp + 0x40]
push eax
call fcn.00409d6b
add esp, 0xc
cmp dword [eax + 0x18], 8
jb 0x40a032
mov eax, dword [eax + 4]
jmp 0x40a035
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
sete byte [ebp + 0x6b]
xor ebx, ebx
push esi
inc ebx
push ebx
lea ecx, [ebp + 0x40]
call fcn.004049d8
push esi
push ebx
lea ecx, [ebp + 0x24]
call fcn.004049d8
cmp byte [ebp + 0x6b], 0
je 0x40a07b
mov ecx, dword [ebp + 0x74]
lea eax, [ebp + 8]
push eax
call fcn.0040648e
push esi
push ebx
lea ecx, [ebp + 8]
call fcn.004049d8
jmp 0x40a363
mov ecx, dword [ebp + 0x7c]
push edi
push ebx
push 0xffffffffffffffff
lea eax, [ebp + 0x60]
push eax
mov dword [ebp + 0x60], 0x2e
call fcn.00409ac8
mov edi, eax
cmp edi, 0xffffffff
jne 0x40a09e
mov eax, dword [ebp + 0x7c]
jmp 0x40a0da
mov ecx, dword [ebp + 0x7c]
lea eax, [ebp - 8]
push eax
mov dword [ebp + 0x64], ebx
call fcn.0040502d
mov ecx, dword [eax]
mov eax, dword [eax + 4]
lea eax, [eax + edi*2]
mov dword [ebp + 0x60], eax
lea eax, [ebp]
mov dword [ebp + 0x5c], ecx
mov ecx, dword [ebp + 0x7c]
push eax
call fcn.0040502d
push dword [ebp + 0x60]
lea ecx, [ebp + 0x40]
push dword [ebp + 0x5c]
push dword [eax + 4]
push dword [eax]
call fcn.00409cea
push eax
lea ecx, [ebp - 0x24]
call fcn.0040648e
test byte [ebp + 0x64], bl
je 0x40a0f6
and dword [ebp + 0x64], 0xfffffffe
push esi
push ebx
lea ecx, [ebp + 0x40]
call fcn.004049d8
cmp edi, 0xffffffff
jne 0x40a114
or dword [ebp + 0x64], 2
push esi
lea ecx, [ebp + 0x40]
mov dword [ebp + 0x58], 7
call fcn.00404941
lea eax, [ebp + 0x40]
jmp 0x40a14c
mov ecx, dword [ebp + 0x7c]
or dword [ebp + 0x64], 4
lea eax, [ebp]
push eax
call fcn.0040502d
mov ecx, dword [eax]
mov eax, dword [eax + 4]
lea edi, [eax + edi*2]
lea eax, [ebp - 8]
mov dword [ebp + 0x5c], ecx
mov ecx, dword [ebp + 0x7c]
push eax
call fcn.0040504b
push dword [eax + 4]
lea ecx, [ebp + 0x24]
push dword [eax]
push edi
push dword [ebp + 0x5c]
call fcn.00409cea
push eax
lea ecx, [ebp - 0x5c]
call fcn.0040648e
test byte [ebp + 0x64], 4
je 0x40a169
and dword [ebp + 0x64], 0xfffffffb
push esi
push ebx
lea ecx, [ebp + 0x24]
call fcn.004049d8
test byte [ebp + 0x64], 2
je 0x40a179
push esi
push ebx
lea ecx, [ebp + 0x40]
call fcn.004049d8
mov byte [ebp + 0x6b], 0
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x24]
push eax
push 0x42a000
push dword [ebp + 0x78]
lea eax, [ebp - 0x78]
push eax
call fcn.00409dfb
add esp, 0xc
push eax
lea eax, [ebp + 0x24]
push eax
call fcn.00409d6b
add esp, 0xc
push eax
lea eax, [ebp + 0x40]
push eax
call fcn.00409d6b
add esp, 0xc
push esi
push ebx
lea ecx, [ebp + 0x24]
call fcn.004049d8
push esi
push ebx
lea ecx, [ebp - 0x78]
call fcn.004049d8
cmp dword [ebp + 0x58], 8
mov eax, dword [ebp + 0x44]
jae 0x40a1d3
lea eax, [ebp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40a32e
mov dword [ebp + 0x64], ebx
push 7
xor eax, eax
pop ecx
mov word [ebp - 0x98], ax
lea edi, [ebp - 0x96]
rep stosd dword es:[edi], eax
push 0xa
stosw word es:[edi], ax
push 0x10
lea eax, [ebp - 0x98]
push eax
push dword [ebp + 0x64]
call fcn.0041e384
add esp, 0x10
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x98]
push eax
push 0x429ffc
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00409dfb
add esp, 0xc
push eax
lea eax, [ebp - 0xb4]
push eax
call fcn.00409dfb
add esp, 0xc
push eax
lea eax, [ebp - 0x78]
push eax
call fcn.00409d6b
add esp, 0xc
push 0xffffffffffffffff
push esi
push eax
lea ecx, [ebp + 8]
call fcn.00404b9f
push esi
push ebx
lea ecx, [ebp - 0x78]
call fcn.004049d8
push esi
push ebx
lea ecx, [ebp - 0xb4]
call fcn.004049d8
push esi
push ebx
lea ecx, [ebp - 0x40]
call fcn.004049d8
lea eax, [ebp + 8]
push eax
push 0x42a000
push dword [ebp + 0x78]
lea eax, [ebp - 0x40]
push eax
call fcn.00409dfb
add esp, 0xc
push eax
lea eax, [ebp + 0x24]
push eax
call fcn.00409d6b
add esp, 0xc
push esi
push ebx
lea ecx, [ebp - 0x40]
call fcn.004049d8
cmp dword [ebp + 0x3c], 8
mov eax, dword [ebp + 0x28]
jae 0x40a2b7
lea eax, [ebp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
lea ecx, [ebp + 0x24]
push ebx
cmp eax, 0xffffffff
je 0x40a2df
call fcn.004049d8
inc dword [ebp + 0x64]
cmp dword [ebp + 0x64], 0x3e8
jl 0x40a1e6
jmp 0x40a2e7
mov byte [ebp + 0x6b], bl
call fcn.004049d8
cmp byte [ebp + 0x6b], 0
jne 0x40a318
push str..copy
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00409dfb
add esp, 0xc
push 0xffffffffffffffff
push esi
push eax
lea ecx, [ebp - 0x24]
call fcn.00404b9f
push esi
push ebx
lea ecx, [ebp - 0x40]
call fcn.004049d8
push esi
push ebx
lea ecx, [ebp + 0x40]
call fcn.004049d8
cmp byte [ebp + 0x6b], 0
je 0x40a17d
jmp 0x40a338
push esi
push ebx
lea ecx, [ebp + 0x40]
call fcn.004049d8
mov ecx, dword [ebp + 0x74]
lea eax, [ebp + 8]
push eax
call fcn.0040648e
push esi
push ebx
lea ecx, [ebp - 0x5c]
call fcn.004049d8
push esi
push ebx
lea ecx, [ebp - 0x24]
call fcn.004049d8
push esi
push ebx
lea ecx, [ebp + 8]
call fcn.004049d8
pop edi
mov eax, dword [ebp + 0x74]
pop esi
pop ebx
add ebp, 0x6c
leave
ret