Function at 0x4059a0
Capabilities:
Check if file exists
Copy file
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x600
push ebp
push edi
mov edi, dword [esp + 0x60c]
push edi
call fcn.004086d0
mov ebp, dword [sym.imp.KERNEL32.DLL_Sleep]
add esp, 4
test eax, eax
jbe 0x40605c
mov eax, dword [esp + 0x614]
test eax, eax
push ebx
push esi
jne 0x405cf4
mov ebx, dword [esp + 0x618]
push ebx
call fcn.004086d0
add esp, 4
cmp eax, 1
jbe 0x40605a
lea eax, [esp + 0x1c4]
push eax
push 0x40c401
push ebx
push edi
call fcn.00402080
add esp, 0x10
lea ecx, [esp + 0x1c4]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40605a
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x1c8]
push 0x2e
push eax
call fcn.00402170
lea ecx, [esp + 0x2c]
push ecx
call fcn.004086d0
add esp, 0x10
cmp eax, 2
jbe 0x40605a
lea edx, [esp + 0x20]
push edx
call fcn.004086d0
add esp, 4
cmp eax, 5
jae 0x40605a
lea eax, [esp + 0x20]
push eax
call fcn.00408244
lea ecx, [esp + 0x24]
push 0x40e780
push ecx
call fcn.004089e0
add esp, 0xc
test eax, eax
je 0x405c42
lea edx, [esp + 0x20]
push 0x40e77c
push edx
call fcn.004089e0
add esp, 8
test eax, eax
je 0x405c42
lea eax, [esp + 0x20]
push 0x40e774
push eax
call fcn.004089e0
add esp, 8
test eax, eax
je 0x405c42
lea ecx, [esp + 0x20]
push 0x40e770
push ecx
call fcn.004089e0
add esp, 8
test eax, eax
je 0x405c42
lea edx, [esp + 0x20]
push 0x40e76c
push edx
call fcn.004089e0
add esp, 8
test eax, eax
je 0x405c42
lea eax, [esp + 0x20]
push 0x40e768
push eax
call fcn.004089e0
add esp, 8
test eax, eax
je 0x405c42
lea ecx, [esp + 0x20]
push 0x40e764
push ecx
call fcn.004089e0
add esp, 8
test eax, eax
je 0x405c42
lea edx, [esp + 0x20]
push 0x40e760
push edx
call fcn.004089e0
add esp, 8
test eax, eax
je 0x405c42
lea eax, [esp + 0x20]
push 0x40e75c
push eax
call fcn.004089e0
add esp, 8
test eax, eax
je 0x405c42
lea ecx, [esp + 0x20]
push 0x40e758
push ecx
call fcn.004089e0
add esp, 8
test eax, eax
je 0x405c42
lea edx, [esp + 0x20]
push 0x40e754
push edx
call fcn.004089e0
add esp, 8
test eax, eax
je 0x405c42
lea eax, [esp + 0x20]
push 0x40e750
push eax
call fcn.004089e0
add esp, 8
test eax, eax
je 0x405c42
lea ecx, [esp + 0x20]
push 0x40e74c
push ecx
call fcn.004089e0
add esp, 8
test eax, eax
je 0x405c12
lea edx, [esp + 0x20]
push 0x40e748
push edx
call fcn.004089e0
add esp, 8
test eax, eax
je 0x405c12
lea eax, [esp + 0x20]
push 0x40e744
push eax
call fcn.004089e0
add esp, 8
test eax, eax
je 0x405c12
lea ecx, [esp + 0x20]
push 0x40e740
push ecx
call fcn.004089e0
add esp, 8
test eax, eax
je 0x405c12
lea edx, [esp + 0x20]
push 0x40e73c
push edx
call fcn.004089e0
add esp, 8
test eax, eax
jne 0x40605a
push ebx
call fcn.00402d00
add esp, 4
test eax, eax
je 0x40605a
lea eax, [esp + 0x1c4]
push eax
call fcn.00401240
add esp, 4
pop esi
pop ebx
push 1
call ebp
pop edi
pop ebp
add esp, 0x600
ret
lea ecx, [esp + 0x1c4]
push ecx
call fcn.00403dc0
add esp, 4
push 1
call ebp
lea edx, [esp + 0x20]
push 0x40e758
push edx
call fcn.004089e0
add esp, 8
test eax, eax
je 0x405c86
lea eax, [esp + 0x20]
push 0x40e754
push eax
call fcn.004089e0
add esp, 8
test eax, eax
jne 0x40605a
push ebx
call fcn.004086d0
add esp, 4
push 0x80
lea ecx, [esp + 0x1c8]
mov esi, eax
push ecx
sub esi, 3
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesA]
push 1
call ebp
lea edx, [esp + 0x408]
push edx
push esi
push ebx
call fcn.00402130
lea eax, [esp + 0x518]
push eax
push 0x40e738
lea ecx, [esp + 0x41c]
push ecx
push edi
call fcn.00402080
lea edx, [esp + 0x528]
push edx
call fcn.00401240
add esp, 0x20
pop esi
pop ebx
push 1
call ebp
pop edi
pop ebp
add esp, 0x600
ret
cmp eax, 1
jne 0x405ddb
push edi
call fcn.004086d0
add esp, 4
cmp eax, 3
jbe 0x40605a
push 0x4128c0
push edi
call fcn.004089e0
add esp, 8
test eax, eax
je 0x40605a
lea eax, [esp + 0x304]
push eax
push edi
call fcn.004086d0
add esp, 4
dec eax
push eax
push edi
call fcn.00402130
lea ecx, [esp + 0x1d0]
push ecx
lea edx, [esp + 0x314]
push 0x5c
push edx
call fcn.00402170
push 0
lea eax, [esp + 0x1e0]
push 0x40c094
push eax
call fcn.00401370
add esp, 0x24
test eax, eax
jle 0x405d87
lea ecx, [esp + 0x304]
push ecx
push 0x40e730
lea edx, [esp + 0x1cc]
push edx
jmp 0x405d9c
lea eax, [esp + 0x304]
push eax
push 0x40e728
lea ecx, [esp + 0x1cc]
push ecx
push edi
call fcn.00402080
add esp, 0x10
push 0
lea edx, [esp + 0x308]
push edx
push 0x412118
call dword [sym.imp.KERNEL32.DLL_CopyFileA]
push edi
push 0x4128c0
call fcn.00408760
add esp, 8
push 1
call ebp
pop esi
pop ebx
push 1
call ebp
pop edi
pop ebp
add esp, 0x600
ret
cmp eax, 2
jne 0x40602d
mov esi, dword [esp + 0x618]
push esi
call fcn.004086d0
add esp, 4
cmp eax, 9
jbe 0x40605a
push esi
call fcn.004086d0
add esp, 4
cmp eax, 0x28
jae 0x40605a
lea eax, [esp + 0x1c4]
push eax
push 0x2e
push esi
call fcn.00402170
lea ecx, [esp + 0x1d0]
push ecx
call fcn.00408244
lea edx, [esp + 0x1d4]
push 0x40e724
push edx
call fcn.004089e0
add esp, 0x18
test eax, eax
jne 0x40605a
push eax
push 0x40c3fc
push esi
call fcn.00401370
lea ecx, [esp + 0x16c]
push ecx
dec eax
push eax
push esi
call fcn.00402130
lea edx, [esp + 0x178]
push edx
call fcn.004086d0
add esp, 0x1c
cmp eax, 7
jbe 0x40605a
lea eax, [esp + 0x160]
push eax
call fcn.00401560
add esp, 4
test eax, eax
je 0x40605a
call fcn.00401ee0
test eax, eax
jne 0x40605a
lea ecx, [esp + 0x408]
push ecx
push esi
push 0x40bc84
push 0x412ad0
call fcn.00402080
lea edx, [esp + 0x418]
push edx
call fcn.00401100
add esp, 0x14
test eax, eax
jne 0x40605a
lea eax, [esp + 0x304]
push eax
lea ecx, [esp + 0x164]
push 0x40
push ecx
xor edi, edi
xor esi, esi
call fcn.00402170
lea edx, [esp + 0x310]
push edx
call fcn.00401400
add esp, 0x10
test eax, eax
je 0x40601a
lea eax, [esp + 0x160]
push eax
mov dword [esp + 0x14], 0x40c401
mov dword [esp + 0x18], 0x40e71c
mov dword [esp + 0x1c], 0x40e714
mov dword [esp + 0x20], 0x40e70c
call fcn.004086d0
mov ebx, eax
and ebx, 0x80000001
jns 0x405f42
dec ebx
or ebx, 0xfffffffe
inc ebx
lea ecx, [esp + 0x164]
push ecx
call fcn.004022a0
add esp, 8
test ebx, ebx
mov dword [0x4104fc], eax
jne 0x405f77
lea edx, [esp + 0x50c]
push edx
lea eax, [esp + 0x308]
push eax
push 0x40e6d8
push 0x40e700
jmp 0x405f91
lea ecx, [esp + 0x50c]
push ecx
lea edx, [esp + 0x308]
push edx
push 0x40e6d8
push 0x40e6f4
call fcn.00402080
add esp, 0x10
lea esp, [esp]
cmp esi, 4
jge 0x405fec
mov edx, dword [esp + esi*4 + 0x10]
lea eax, [esp + 0x20]
push eax
push 0x40c401
lea ecx, [esp + 0x30c]
push ecx
push edx
call fcn.00402080
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x174]
push ecx
lea edx, [esp + 0x524]
push edx
call fcn.00405750
add esp, 0x1c
push 0x1f4
mov edi, eax
inc esi
call ebp
test edi, edi
je 0x405fa0
cmp edi, 1
jne 0x40601a
push edi
lea eax, [esp + 0x40c]
push eax
push 0x412ef8
call dword [sym.imp.KERNEL32.DLL_CopyFileA]
push 0x1f4
call ebp
pop esi
pop ebx
push edi
call ebp
pop edi
pop ebp
add esp, 0x600
ret
push 0x64
call ebp
pop esi
pop ebx
push 1
call ebp
pop edi
pop ebp
add esp, 0x600
ret
cmp eax, 3
jne 0x40605a
mov edx, dword [esp + 0x618]
lea ecx, [esp + 0x20]
push ecx
push 0x40c401
push edx
push edi
call fcn.00402080
add esp, 0x10
push 2
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesA]
pop esi
pop ebx
push 1
call ebp
pop edi
pop ebp
add esp, 0x600
ret