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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push esi
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x18], 0
mov eax, dword [ebp + 0x10]
push eax
call fcn.0040de9d
add esp, 4
mov esi, eax
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.0040de9d
add esp, 4
lea edx, [esi + eax + 2]
mov dword [ebp - 0x10], edx
xor ecx, ecx
mov eax, dword [ebp - 0x10]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040d2a9
add esp, 4
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x40a318
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00409b00
push eax
call fcn.0040baa0
add esp, 8
mov dword [ebp - 0x24], 0xe
jmp 0x40a54e
mov edx, dword [ebp - 0x10]
shl edx, 1
push edx
push 0
mov eax, dword [ebp - 8]
push eax
call fcn.0040d9b0
add esp, 0xc
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
jne 0x40a374
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 8]
push edx
push 0x17
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
call fcn.00409b00
push eax
call fcn.0040b820
add esp, 0x10
jmp 0x40a54e
cmp dword [ebp - 0x1c], 0
je 0x40a382
xor ecx, ecx
mov edx, dword [ebp - 0x1c]
mov word [edx], cx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 8]
push edx
call fcn.0040b370
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jge 0x40a3cc
mov eax, dword [ebp - 0x18]
and eax, 0xffff
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 8]
push ecx
push 0x17
mov edx, dword [ebp + 0xc]
push edx
mov ecx, dword [ebp + 8]
call fcn.00409b00
push eax
call fcn.0040b820
add esp, 0x10
jmp 0x40a54e
mov eax, dword [ebp - 0x10]
shl eax, 1
mov dword [ebp - 0x14], eax
xor ecx, ecx
mov eax, dword [ebp - 0x14]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040d2a9
add esp, 4
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40a425
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00409b00
push eax
call fcn.0040baa0
add esp, 8
mov dword [ebp - 0x24], 0xe
jmp 0x40a54e
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
jbe 0x40a4cc
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x30]
push edx
call fcn.0040e455
add esp, 4
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
xor ecx, ecx
mov eax, dword [ebp - 0x14]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040d2a9
add esp, 4
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40a4b3
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00409b00
push eax
call fcn.0040baa0
add esp, 8
mov dword [ebp - 0x24], 0xe
jmp 0x40a54e
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40a4fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 8]
push eax
push 0x17
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00409b00
push eax
call fcn.0040b820
add esp, 0x10
jmp 0x40a54e
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jne 0x40a533
mov eax, dword [ebp - 4]
push eax
push 0x1c
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00409b00
push eax
call fcn.0040b820
add esp, 0x10
mov dword [ebp - 0x24], 2
jmp 0x40a54e
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0040abf0
add esp, 0x10
mov dword [ebp - 0x24], eax
cmp dword [ebp - 8], 0
je 0x40a566
mov eax, dword [ebp - 8]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.0040e455
add esp, 4
cmp dword [ebp - 4], 0
je 0x40a57e
mov edx, dword [ebp - 4]
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x3c]
push eax
call fcn.0040e455
add esp, 4
mov eax, dword [ebp - 0x24]
pop esi
mov esp, ebp
pop ebp
ret