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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c4c78
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x64a070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov ebx, ecx
cmp dword [ebx + 0x14], 8
jb 0x520b19
mov eax, dword [ebx]
jmp 0x520b1b
mov eax, ebx
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push eax
call esi
test eax, eax
jne 0x520b83
mov eax, dword [0x656c44]
test eax, eax
je 0x520b58
push str.Source_file_does_not_exist_in_CopyFileFromSourceToDestination
push 0x5f8398
push 0x5f8398
push str.FileUtils
push str.OOBEUtils
push 0x32
call eax
add esp, 0x18
xor al, al
jmp 0x520de1
mov ecx, dword [0x656c48]
test ecx, ecx
je 0x520b7c
mov eax, dword [ecx]
push str.Source_file_does_not_exist_in_CopyFileFromSourceToDestination
push str.FileUtils
push 0x5f8398
push 0x32
push ecx
call dword [eax + 0x34]
add esp, 0x14
xor al, al
jmp 0x520de1
cmp byte [ebp + 8], 0
je 0x520bae
cmp dword [edi + 0x14], 8
jb 0x520b93
mov eax, dword [edi]
jmp 0x520b95
mov eax, edi
push eax
call esi
test eax, eax
je 0x520bae
push 0
mov dl, 1
mov ecx, edi
call fcn.00520810
add esp, 4
test al, al
je 0x520b7c
xor eax, eax
mov dword [ebp - 0x14], 7
push 0xffffffffffffffff
push eax
push edi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.00408f10
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0
call fcn.0051e670
push ecx
lea ecx, [ebp - 0x28]
call fcn.0051fb70
add esp, 4
cmp dword [edi + 0x14], 8
jb 0x520bf3
mov ecx, dword [edi]
jmp 0x520bf5
mov ecx, edi
cmp dword [ebx + 0x14], 8
jb 0x520bff
mov eax, dword [ebx]
jmp 0x520c01
mov eax, ebx
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileW]
push 0
push ecx
push eax
call esi
test eax, eax
jne 0x520da7
cmp byte [ebp + 0xc], al
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
je 0x520cc1
call eax
cmp eax, 5
jne 0x520cbc
cmp dword [edi + 0x14], 8
jb 0x520c38
mov ecx, dword [edi]
jmp 0x520c3a
mov ecx, edi
push ecx
call fcn.00521170
add esp, 4
test al, al
je 0x520d05
mov eax, dword [0x656c44]
test eax, eax
je 0x520c76
push str.Trying_to_copy_file_after_setting_permissions
push 0x5f8398
push 0x5f8398
push str.FileUtils
push str.OOBEUtils
push 0x1e
call eax
add esp, 0x18
jmp 0x520c9a
mov ecx, dword [0x656c48]
test ecx, ecx
je 0x520c9a
mov eax, dword [ecx]
push str.Trying_to_copy_file_after_setting_permissions
push str.FileUtils
push 0x5f8398
push 0x1e
push ecx
call dword [eax + 0x34]
add esp, 0x14
cmp dword [edi + 0x14], 8
jb 0x520ca4
mov eax, dword [edi]
jmp 0x520ca6
mov eax, edi
cmp dword [ebx + 0x14], 8
jb 0x520cae
mov ebx, dword [ebx]
push 0
push eax
push ebx
call esi
test eax, eax
jne 0x520da7
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [0x656c44], 0
je 0x520d6e
cmp dword [edi + 0x14], 8
jb 0x520cd6
mov edi, dword [edi]
call eax
push eax
push edi
push str.Failed_to_copy_file_at_the_destination:_s._LastError:__d
push 0x5f8398
push 0x5f8398
push str.FileUtils
push str.OOBEUtils
push 0x32
call dword [0x656c44]
add esp, 0x20
xor bl, bl
jmp 0x520dca
cmp dword [0x656c44], 0
je 0x520d4a
cmp dword [ebx + 0x14], 8
jb 0x520d16
mov ebx, dword [ebx]
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push eax
push ebx
push str.Failed_to_set_permissions_for_path__s._LastError:__d
push 0x5f8398
push 0x5f8398
push str.FileUtils
push str.OOBEUtils
push 0x32
call dword [0x656c44]
add esp, 0x20
xor bl, bl
jmp 0x520dca
mov esi, dword [0x656c48]
test esi, esi
je 0x520da3
cmp dword [ebx + 0x14], 8
jb 0x520d5c
mov ebx, dword [ebx]
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [esi]
call eax
push eax
push ebx
push str.Failed_to_set_permissions_for_path__s._LastError:__d
jmp 0x520d8b
mov esi, dword [0x656c48]
test esi, esi
je 0x520da3
cmp dword [edi + 0x14], 8
jb 0x520d80
mov edi, dword [edi]
mov esi, dword [esi]
call eax
push eax
push edi
push str.Failed_to_copy_file_at_the_destination:_s._LastError:__d
push str.FileUtils
push 0x5f8398
push 0x32
push dword [0x656c48]
call dword [esi + 0x34]
add esp, 0x1c
xor bl, bl
jmp 0x520dca
cmp byte [ebp + 0x10], 0
je 0x520db4
mov ecx, edi
call fcn.004fcf40
cmp dword [edi + 0x14], 8
jb 0x520dbc
mov edi, dword [edi]
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov bl, 1
mov ecx, dword [ebp - 0x14]
cmp ecx, 8
jb 0x520ddf
inc ecx
push ecx
push dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
call fcn.00409510
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005765b2
mov esp, ebp
pop ebp
ret