Function at 0x4878f5
Capabilities:
Check if file exists
Copy file
Delete file
Get common file path
Move file

Disassembly:
push ebp
lea ebp, [esp - 0x3a8]
sub esp, 0x428
mov eax, dword [0x4f4de0]
xor eax, ebp
mov dword [ebp + 0x3a4], eax
mov eax, dword [ebp + 0x3b0]
push ebx
mov ebx, dword [ebp + 0x3b4]
push esi
push edi
xor edi, edi
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x78], eax
cmp eax, edi
je 0x487b22
cmp ebx, edi
je 0x487b22
xor eax, eax
mov esi, 0x206
push esi
mov word [ebp - 0x6c], ax
lea eax, [ebp - 0x6a]
push edi
push eax
mov dword [ebp - 0x7c], edi
mov dword [ebp - 0x70], edi
call fcn.00497680
xor eax, eax
push esi
mov word [ebp + 0x19c], ax
lea eax, [ebp + 0x19e]
push edi
push eax
call fcn.00497680
add esp, 0x18
push ebx
push 0x208
lea eax, [ebp - 0x6c]
push eax
call fcn.0046e216
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x6c]
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push dword [ebp - 0x78]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call esi
test eax, eax
je 0x487b22
push ebx
call esi
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x487a71
push ebx
call esi
test eax, eax
jne 0x487a71
push ebx
lea ecx, [ebp - 0x74]
call fcn.00404050
lea ecx, [ebp - 0x74]
call fcn.004050f0
push edi
push str.safemon.dll
lea ecx, [ebp - 0x74]
call fcn.00404270
cmp eax, 0xffffffff
jne 0x487a0a
push edi
push str.360udiskguard.dll
lea ecx, [ebp - 0x74]
call fcn.00404270
cmp eax, 0xffffffff
jne 0x487a0a
push edi
push str.360udiskguard64.dll
lea ecx, [ebp - 0x74]
call fcn.00404270
cmp eax, 0xffffffff
je 0x487a11
mov dword [ebp - 0x70], 1
lea eax, [ebp + 0x19c]
push eax
push edi
push 0x4cf348
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp + 0x19c]
push eax
call esi
cmp dword [ebp - 0x70], edi
jne 0x487a5a
lea eax, [ebp + 0x19c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x487a5a
push 4
push edi
lea eax, [ebp + 0x19c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
jmp 0x487a61
mov dword [ebp - 0x7c], 1
mov ecx, dword [ebp - 0x74]
add ecx, 0xfffffff0
call fcn.00404d30
cmp dword [ebp - 0x7c], edi
jne 0x487a84
push edi
push ebx
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x487b1d
mov ecx, dword [ebp - 0x80]
push ebx
push dword [ebp - 0x78]
call fcn.00485341
test eax, eax
jne 0x487ad5
lea eax, [ebp + 0x19c]
push eax
push edi
push 0x4cf348
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp + 0x19c]
push eax
call esi
push edi
lea eax, [ebp + 0x19c]
push eax
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push 5
push ebx
lea eax, [ebp + 0x19c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
cmp dword [ebp - 0x70], edi
jne 0x487b1d
push ebx
lea ecx, [ebp - 0x70]
call fcn.00404050
lea ecx, [ebp - 0x70]
call fcn.004050f0
push edi
push str.qhsafemain.exe
lea ecx, [ebp - 0x70]
call fcn.00404270
cmp eax, 0xffffffff
je 0x487b08
mov dword [0x4fb1e4], 1
mov ecx, dword [ebp - 0x70]
add ecx, 0xfffffff0
call fcn.00404d30
mov dword [0x4fb1e0], 1
xor eax, eax
inc eax
jmp 0x487b24
xor eax, eax
mov ecx, dword [ebp + 0x3a4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00497941
add ebp, 0x3a8
leave
ret 8