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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push esi
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
mov ecx, dword [ebp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esi + eax + 2]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.00407617
add esp, 4
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
jne 0x40460f
mov edx, dword [ebp + 0x10]
push edx
mov ecx, dword [ebp + 0xc]
call fcn.00403cd0
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.00406230
add esp, 0xc
mov dword [ebp - 0x28], 0xe
jmp 0x40483e
mov ecx, dword [ebp - 0x10]
push ecx
push 0
mov edx, dword [ebp - 8]
push edx
call fcn.004076d0
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x40466d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 8]
push ecx
push 0x17
mov edx, dword [ebp + 0x10]
push edx
mov ecx, dword [ebp + 0xc]
call fcn.00403cd0
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.00405fb0
add esp, 0x14
jmp 0x40483e
cmp dword [ebp - 0x20], 0
je 0x404679
mov ecx, dword [ebp - 0x20]
mov byte [ecx], 0
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.00403600
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jge 0x4046c8
mov edx, dword [ebp - 0x1c]
and edx, 0xffff
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 8]
push eax
push 0x17
mov ecx, dword [ebp + 0x10]
push ecx
mov ecx, dword [ebp + 0xc]
call fcn.00403cd0
push eax
mov edx, dword [ebp + 8]
push edx
call fcn.00405fb0
add esp, 0x14
jmp 0x40483e
mov eax, dword [ebp - 0x10]
shl eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00407617
add esp, 4
mov dword [ebp - 0x30], eax
mov edx, dword [ebp - 0x30]
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0
jne 0x404715
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
call fcn.00403cd0
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406230
add esp, 0xc
mov dword [ebp - 0x28], 0xe
jmp 0x40483e
lea edx, [ebp - 0x20]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x18]
jbe 0x4047ac
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x34]
push edx
call fcn.0040767c
add esp, 4
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00407617
add esp, 4
mov dword [ebp - 0x38], eax
mov edx, dword [ebp - 0x38]
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0
jne 0x404793
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
call fcn.00403cd0
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406230
add esp, 0xc
mov dword [ebp - 0x28], 0xe
jmp 0x40483e
lea edx, [ebp - 0x20]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4047de
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 8]
push eax
push 0x17
mov ecx, dword [ebp + 0x10]
push ecx
mov ecx, dword [ebp + 0xc]
call fcn.00403cd0
push eax
mov edx, dword [ebp + 8]
push edx
call fcn.00405fb0
add esp, 0x14
jmp 0x40483e
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
jne 0x40481b
mov ecx, dword [ebp - 4]
push ecx
push 0x1c
mov edx, dword [ebp + 0x10]
push edx
mov ecx, dword [ebp + 0xc]
call fcn.00403cd0
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.00405fb0
add esp, 0x14
mov dword [ebp - 0x28], 2
jmp 0x40483e
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00404f60
add esp, 0x18
mov dword [ebp - 0x28], eax
cmp dword [ebp - 8], 0
je 0x404856
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x3c]
push edx
call fcn.0040767c
add esp, 4
cmp dword [ebp - 4], 0
je 0x40486e
mov eax, dword [ebp - 4]
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
push ecx
call fcn.0040767c
add esp, 4
mov eax, dword [ebp - 0x28]
pop esi
mov esp, ebp
pop ebp
ret