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

Disassembly:
sub esp, 0xc58
test byte [0x47e5ac], 1
mov dword [esp + 4], ecx
mov dword [esp + 8], 0
jne 0x4151d9
mov ecx, dword [0x47e5ac]
mov eax, dword [0x45e59c]
or ecx, 1
test eax, eax
setne al
mov dword [0x47e5ac], ecx
mov byte [0x47e5a8], al
push ebp
mov ebp, dword [esp + 0xc64]
push edi
mov edi, dword [esp + 0xc64]
push ebx
push esi
jmp 0x4151f0
lea ecx, [esp + 0x328]
push ecx
push ebp
xor bl, bl
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x415238
test byte [esp + 0x328], 0x10
jne 0x415212
mov bl, 1
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test bl, bl
je 0x415238
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x415238
test al, 1
je 0x415238
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 + 0xc78]
test eax, eax
jne 0x41525b
push eax
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov esi, eax
jmp 0x4152e3
mov ebx, dword [esp + 0xc7c]
mov edx, dword [ebx + 0x10]
mov cl, byte [0x47e5a8]
test cl, cl
mov dword [edx], 0
mov dword [edx + 4], 0
je 0x4152c0
mov ecx, dword [esp + 0xc74]
push 0
push ecx
push ebx
push eax
push ebp
push edi
call dword [0x45e59c]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
mov dword [esp + 0x18], eax
jne 0x4152b0
push 0
mov byte [0x47e5a8], 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov al, byte [0x47e5a8]
test al, al
jne 0x4152e3
mov eax, dword [esp + 0xc78]
mov edx, dword [esp + 0xc74]
mov ecx, dword [esp + 0x14]
push 0
push edx
push ebx
push eax
push ebp
push edi
call fcn.00415000
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
test esi, esi
jne 0x4153b5
cmp dword [esp + 0x18], 0x4d3
je 0x4153b3
mov ebx, dword [esp + 0xc74]
cmp dword [ebx], 0
jne 0x4153b3
push 0x400
lea eax, [esp + 0x46c]
push eax
push 0x30
call fcn.00408270
push edi
lea ecx, [esp + 0x478]
push ecx
lea edx, [esp + 0x87c]
push edx
call fcn.00424a8c
add esp, 0x18
push 5
push 0x446a11
lea eax, [esp + 0x870]
push eax
push esi
call dword [0x457308]
mov esi, eax
cmp esi, 2
jne 0x415396
push 0x400
lea ecx, [esp + 0x86c]
push ecx
push 0x2e
xor esi, esi
call fcn.00408270
add esp, 0xc
push 0x124
push 0x446a11
lea edx, [esp + 0x870]
push edx
push esi
call dword [0x457308]
cmp eax, 6
jne 0x4151f0
mov dword [ebx], 1
jmp 0x4153b3
cmp esi, 5
je 0x4153ae
cmp esi, 4
je 0x4151f0
test esi, esi
je 0x4151f0
jmp 0x4153b3
mov esi, 1
test esi, esi
lea edx, [esp + 0x224]
setne byte [esp + 0x13]
mov eax, ebp
sub edx, ebp
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4153c5
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x224]
push eax
lea ecx, [esp + 0x32c]
push ecx
mov ecx, esi
call fcn.004141c0
lea edx, [esp + 0x328]
push edx
lea eax, [esp + 0x124]
push eax
mov ecx, esi
call fcn.00414170
lea ecx, [esp + 0x120]
push ecx
call fcn.00435176
add esp, 4
mov edi, 0x4488e0
lea esi, [esp + 0x120]
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x415443
mov edi, 0x4488dc
lea esi, [esp + 0x120]
mov ecx, 4
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4154d1
lea ecx, [esp + 0x224]
push ecx
lea edx, [esp + 0x20]
push 0x4479f4
push edx
call fcn.00424a8c
mov ebx, dword [esp + 0x20]
add esp, 0xc
lea eax, [esp + 0x224]
push eax
mov ecx, ebx
call fcn.004148d0
test al, al
je 0x4154d5
push 0
lea ecx, [esp + 0x20]
push ecx
push 0x4485dc
push 0x45e498
push 0x45e498
push 0
call fcn.004272c9
mov al, byte [ebx]
add esp, 0x18
test al, al
je 0x4154d5
lea edx, [esp + 0x1c]
push edx
push 0x45e498
lea eax, [esp + 0x470]
push str.exec:__s__s__s
push eax
call fcn.00424a8c
add esp, 0x10
push 0
push str.MyCopyFile
lea ecx, [esp + 0x470]
push ecx
push 0
call fcn.00406ba0
jmp 0x4154d5
mov ebx, dword [esp + 0x14]
mov edi, 0x4488b4
lea esi, [esp + 0x120]
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x41555e
lea eax, [esp + 0x224]
push eax
lea ecx, [esp + 0x20]
push 0x4479f4
push ecx
call fcn.00424a8c
push 0
lea edx, [esp + 0x2c]
push edx
push str._s__regserver
push 0x45e498
push 0x45e498
push 0
call fcn.004272c9
mov al, byte [ebx]
add esp, 0x24
test al, al
je 0x41555e
lea eax, [esp + 0x1c]
push eax
push 0x45e498
lea ecx, [esp + 0x470]
push str.exec:__s__s__regserver__s
push ecx
call fcn.00424a8c
add esp, 0x10
push 0
push str.MyCopyFile
lea edx, [esp + 0x470]
push edx
push 0
call fcn.00406ba0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
pop esi
pop ebx
je 0x41557b
test al, 1
je 0x41557b
and eax, 0xfffffffe
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov al, byte [esp + 0xb]
pop edi
pop ebp
add esp, 0xc58
ret 0x14