Function at 0x477800
Capabilities:
Copy file
Delete file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x566fae
mov eax, dword fs:[0]
push eax
mov eax, 0x1828
call fcn.004a9ba0
mov eax, dword [0x5c9c4c]
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 ebx, ecx
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0x1818], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x1814], eax
push edi
push dword [edi + 4]
mov dword [ebp - 4], 0
push dword [edi]
call fcn.00474c10
mov eax, dword [edi]
add esp, 0xc
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x1818]
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x477bf1
test esi, esi
je 0x477bf1
push 3
push esi
push eax
call fcn.0053a22d
add esp, 0xc
test eax, eax
je 0x4778ac
push dword [ebp - 0x1814]
mov ecx, ebx
push esi
push dword [ebp - 0x1818]
call fcn.004775b0
jmp 0x477bf3
push 0x800
lea eax, [ebp - 0x1010]
push 0
push eax
call fcn.00506df0
push 0x400
lea eax, [ebp - 0x1010]
push esi
push eax
call fcn.00533177
add esp, 0x18
lea eax, [ebp - 0x1010]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x1010]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 1
push esi
push dword [ebp - 0x1818]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x477bf3
push 0x58ad60
lea ecx, [ebp - 0x1814]
call fcn.0040e030
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x1814]
push eax
lea ecx, [ebp - 0x1828]
call fcn.00475230
push eax
mov ecx, edi
mov byte [ebp - 4], 2
call fcn.004797d0
lea ecx, [ebp - 0x1828]
call fcn.00475700
mov edx, dword [ebp - 0x1814]
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x47797a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x800
lea eax, [ebp - 0x810]
push 0
push eax
call fcn.00506df0
add esp, 0xc
lea eax, [ebp - 0x810]
push eax
push 0
push 0x57c970
lea eax, [ebp - 0x1010]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x4779e9
push 0x58ad70
lea ecx, [ebp - 0x1814]
call fcn.0040e030
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], 3
call eax
push eax
lea eax, [ebp - 0x1814]
push eax
lea ecx, [ebp - 0x1828]
call fcn.00475230
mov byte [ebp - 4], 4
jmp 0x477abd
push 3
lea eax, [ebp - 0x810]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x477a88
lea eax, [ebp - 0x810]
push eax
call fcn.0040f940
add esp, 4
test eax, eax
jne 0x477a3a
push 4
push eax
lea eax, [ebp - 0x810]
mov ecx, ebx
push eax
call fcn.00476d70
lea eax, [ebp - 0x810]
push eax
push esi
push str.move_exist_file__s_to__s__delete_it_by_pending
call fcn.00472ca0
add esp, 0xc
push 3
push esi
push dword [ebp - 0x1818]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x477bf3
push 0x58ade8
lea ecx, [ebp - 0x1814]
call fcn.0040e030
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], 5
call eax
push eax
lea eax, [ebp - 0x1814]
push eax
lea ecx, [ebp - 0x1828]
call fcn.00475230
mov byte [ebp - 4], 6
jmp 0x477abd
push str.T_rT
lea ecx, [ebp - 0x1814]
call fcn.0040e030
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], 7
call eax
push eax
lea eax, [ebp - 0x1814]
push eax
lea ecx, [ebp - 0x1828]
call fcn.00475230
mov byte [ebp - 4], 8
push eax
mov ecx, edi
call fcn.004797d0
lea ecx, [ebp - 0x1828]
call fcn.00475700
lea ecx, [ebp - 0x1814]
mov dword [ebp - 4], 0xffffffff
call fcn.0040ac10
push 0x800
lea eax, [ebp - 0x1810]
push 0
push eax
call fcn.00506df0
add esp, 0xc
lea eax, [ebp - 0x1810]
push eax
push 0
push 0x57c970
lea eax, [ebp - 0x1010]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 3
lea eax, [ebp - 0x1810]
push eax
push dword [ebp - 0x1818]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push 5
push esi
lea eax, [ebp - 0x1810]
mov ecx, ebx
push eax
call fcn.00476d70
mov dword [ebp - 0x1814], eax
lea eax, [ebp - 0x1810]
push eax
push dword [ebp - 0x1818]
push str.copy__s_to__s__replace_until_reboot
call fcn.00472ca0
mov eax, dword [ebp - 0x1814]
add esp, 0xc
test eax, eax
jne 0x477bc2
push 0x58ae58
lea ecx, [ebp - 0x181c]
call fcn.0040e030
mov dword [ebp - 4], 9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x181c]
push eax
lea ecx, [ebp - 0x1834]
call fcn.00475230
push eax
mov ecx, edi
mov byte [ebp - 4], 0xa
call fcn.004797d0
lea ecx, [ebp - 0x1834]
call fcn.00475700
lea ecx, [ebp - 0x181c]
mov dword [ebp - 4], 0xffffffff
call fcn.0040ac10
mov eax, dword [ebp - 0x1814]
cmp dword [ebx + 0x74], 0
jne 0x477bf3
push esi
mov ecx, ebx
call fcn.00476c60
test eax, eax
je 0x477be9
push esi
push str.check_file__s___need_reboot_now
call fcn.00472ca0
add esp, 8
mov dword [ebx + 0x74], 1
mov eax, dword [ebp - 0x1814]
jmp 0x477bf3
xor eax, eax
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.004a9748
mov esp, ebp
pop ebp
ret 0x14