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

Disassembly:
sub esp, 0xc54
test byte [0x45ec3c], 1
mov dword [esp], ecx
mov dword [esp + 4], 0
jne 0x407f98
mov ecx, dword [0x45ec3c]
mov eax, dword [0x43ec2c]
or ecx, 1
test eax, eax
setne al
mov dword [0x45ec3c], ecx
mov byte [0x45ec38], al
push ebx
push ebp
mov ebp, dword [esp + 0xc64]
push esi
push edi
mov edi, dword [esp + 0xc68]
lea ebx, [ebx]
lea ecx, [esp + 0x324]
push ecx
push ebp
xor bl, bl
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x407ff8
test byte [esp + 0x324], 0x10
jne 0x407fd2
mov bl, 1
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test bl, bl
je 0x407ff8
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x407ff8
test al, 1
je 0x407ff8
and eax, 0xfffffffe
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0xc74]
test eax, eax
jne 0x40801b
push eax
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov esi, eax
jmp 0x4080a3
mov ebx, dword [esp + 0xc78]
mov edx, dword [ebx + 0x10]
mov cl, byte [0x45ec38]
test cl, cl
mov dword [edx], 0
mov dword [edx + 4], 0
je 0x408080
mov ecx, dword [esp + 0xc70]
push 0
push ecx
push ebx
push eax
push ebp
push edi
call dword [0x43ec2c]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
mov dword [esp + 0x14], eax
jne 0x408070
push 0
mov byte [0x45ec38], 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov al, byte [0x45ec38]
test al, al
jne 0x4080a3
mov eax, dword [esp + 0xc74]
mov edx, dword [esp + 0xc70]
mov ecx, dword [esp + 0x10]
push 0
push edx
push ebx
push eax
push ebp
push edi
call fcn.00407dc0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
test esi, esi
jne 0x408172
cmp dword [esp + 0x14], 0x4d3
je 0x408170
mov ebx, dword [esp + 0xc70]
cmp dword [ebx], 0
jne 0x408170
push 0x400
lea eax, [esp + 0x468]
push eax
push 0x30
call fcn.004028e0
push edi
lea ecx, [esp + 0x474]
push ecx
lea edx, [esp + 0x878]
push edx
call fcn.0040d398
add esp, 0x18
push 5
push 0x42bdd2
lea eax, [esp + 0x86c]
push eax
push esi
call dword [0x43a2bc]
mov esi, eax
cmp esi, 2
jne 0x408153
push 0x400
lea ecx, [esp + 0x868]
push ecx
push 0x2e
xor esi, esi
call fcn.004028e0
add esp, 0xc
push 0x24
push 0x42bdd2
lea edx, [esp + 0x86c]
push edx
push esi
call dword [0x43a2bc]
cmp eax, 6
jne 0x407fb0
mov dword [ebx], 1
jmp 0x408170
cmp esi, 5
je 0x40816b
cmp esi, 4
je 0x407fb0
test esi, esi
je 0x407fb0
jmp 0x408170
mov esi, 1
test esi, esi
lea edx, [esp + 0x220]
setne bl
mov eax, ebp
sub edx, ebp
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x408180
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x220]
push eax
lea ecx, [esp + 0x328]
push ecx
mov ecx, esi
call fcn.00407330
lea edx, [esp + 0x324]
push edx
lea eax, [esp + 0x120]
push eax
mov ecx, esi
call fcn.004072e0
lea ecx, [esp + 0x11c]
push ecx
call fcn.0041bcd4
add esp, 4
mov edi, 0x42ca90
lea esi, [esp + 0x11c]
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x4081fa
mov edi, 0x42ca8c
lea esi, [esp + 0x11c]
mov ecx, 4
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x408270
lea ecx, [esp + 0x220]
push ecx
lea edx, [esp + 0x1c]
push 0x42c4d0
push edx
call fcn.0040d398
push 0
lea eax, [esp + 0x28]
push eax
push 0x42c2ac
push 0x43eb28
push 0x43eb28
push 0
call fcn.0040f4ca
mov ecx, dword [esp + 0x34]
mov al, byte [ecx]
add esp, 0x24
test al, al
je 0x408270
lea edx, [esp + 0x18]
push edx
push 0x43eb28
lea eax, [esp + 0x46c]
push str.exec:__s__s__s
push eax
call fcn.0040d398
add esp, 0x10
push 0
push str.MyCopyFile
lea ecx, [esp + 0x46c]
push ecx
push 0
call fcn.00401fe0
mov edi, 0x42ca64
lea esi, [esp + 0x11c]
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4082fd
lea eax, [esp + 0x220]
push eax
lea ecx, [esp + 0x1c]
push 0x42c4d0
push ecx
call fcn.0040d398
push 0
lea edx, [esp + 0x28]
push edx
push str._s__regserver
push 0x43eb28
push 0x43eb28
push 0
call fcn.0040f4ca
mov eax, dword [esp + 0x34]
mov cl, byte [eax]
add esp, 0x24
test cl, cl
je 0x4082fd
lea ecx, [esp + 0x18]
push ecx
push 0x43eb28
lea edx, [esp + 0x46c]
push str.exec:__s__s__regserver__s
push edx
call fcn.0040d398
add esp, 0x10
push 0
push str.MyCopyFile
lea eax, [esp + 0x46c]
push eax
push 0
call fcn.00401fe0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x408318
test al, 1
je 0x408318
and eax, 0xfffffffe
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0xc54
ret 0x14