Function at 0x405700
Capabilities:
Copy file
Get file attributes
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43ebc8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
mov eax, dword [ebp + 0x18]
push ebx
xor ebx, ebx
push esi
mov esi, dword [ebp + 0xc]
cmp eax, ebx
push edi
je 0x405798
push 0x5c
mov ecx, esi
call fcn.00430090
cmp eax, ebx
jl 0x405798
push eax
lea eax, [ebp + 0x18]
push eax
mov ecx, esi
call fcn.0042ffe0
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 4], ebx
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
or edi, 0xffffffff
cmp eax, edi
je 0x40575b
test al, 0x10
jne 0x40578d
mov edx, dword [ebp + 0x20]
lea eax, [ebp + 0x18]
push edx
push eax
call fcn.00405520
add esp, 8
test eax, eax
jne 0x40578d
lea ecx, [ebp + 0x18]
mov dword [ebp - 4], edi
call fcn.004368f0
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp + 0x18]
mov dword [ebp - 4], edi
call fcn.004368f0
cmp dword [ebp + 0x10], ebx
je 0x4057b7
mov edi, dword [ebp + 8]
mov eax, dword [esi]
xor edx, edx
cmp dword [ebp + 0x14], ebx
mov ecx, dword [edi]
sete dl
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
jmp 0x40582f
cmp dword [0x4848c8], 2
jne 0x40581c
mov eax, dword [0x4848bc]
cmp eax, 5
ja 0x4057d5
jne 0x40581c
cmp dword [0x4848c0], 1
jb 0x40581c
mov edi, dword [ebp + 0x14]
xor eax, eax
cmp edi, ebx
mov dword [ebp + 0x18], ebx
setne al
push 0x4527c0
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x40581c
push 0x4527d0
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40581c
mov edi, dword [ebp + 8]
mov ecx, dword [esi]
or ebx, 8
mov edx, dword [edi]
push ebx
lea ebx, [ebp + 0x18]
push ebx
push 0
push 0
push ecx
push edx
call eax
jmp 0x40582f
mov edi, dword [ebp + 8]
mov edx, dword [ebp + 0x14]
mov eax, dword [esi]
push edx
mov ecx, dword [edi]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x40589c
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x40595d
mov esi, dword [esi]
mov dword [ebp + 0x14], 0
push 0
lea ecx, [ebp + 0x14]
mov dword [ebp - 4], 1
call fcn.004134c0
push 1
push esi
lea ecx, [ebp + 0x14]
mov dword [ebp - 4], 2
call fcn.00413530
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x40595d
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0040ad30
add esp, 8
mov ebx, eax
push edi
lea ecx, [ebp - 0x10]
push str.Cannot_copy_file_
push ecx
mov dword [ebp - 4], 3
call fcn.00436ce0
push str._to_
lea edx, [ebp + 0x1c]
push eax
push edx
mov byte [ebp - 4], 4
call fcn.00436c50
push esi
push eax
lea eax, [ebp + 0x10]
mov byte [ebp - 4], 5
push eax
call fcn.00436bc0
push 0x4527dc
lea ecx, [ebp + 0xc]
push eax
push ecx
mov byte [ebp - 4], 6
call fcn.00436c50
push ebx
lea edx, [ebp + 0x14]
push eax
push edx
mov byte [ebp - 4], 7
call fcn.00436bc0
mov ecx, dword [ebp + 0x20]
push eax
mov byte [ebp - 4], 8
call fcn.00436a80
lea ecx, [ebp + 0x14]
mov byte [ebp - 4], 7
call fcn.004368f0
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 6
call fcn.004368f0
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 5
call fcn.004368f0
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 4
call fcn.004368f0
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 3
call fcn.004368f0
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call fcn.004368f0
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret