Function at 0x406790
Capabilities:
Copy file
Create process on windows
Create process suspended
Get common file path

Disassembly:
sub esp, 0x670
mov eax, dword [0x4161c0]
push esi
push edi
mov dword [esp + 0x674], eax
push 0x104
lea eax, [esp + 0x60]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x264]
push ecx
push 0x208
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov edi, eax
push edi
lea edx, [esp + 0x268]
push edx
lea eax, [esp + 0x64]
push eax
call fcn.004091d8
add esp, 0xc
test eax, eax
je 0x406962
push str.NotDelete
push str.Uninstall_User_Data
call fcn.00403570
add esp, 8
test eax, eax
jne 0x406825
call fcn.00402550
cmp eax, 2
jne 0x406854
pop edi
mov eax, 0xfffffffe
pop esi
mov ecx, dword [esp + 0x66c]
call fcn.004077be
add esp, 0x670
ret 4
push 0x104
push 0x6f
push 0
call fcn.004043f0
cmp eax, 7
jne 0x406854
pop edi
mov eax, 0xfffffffe
pop esi
mov ecx, dword [esp + 0x66c]
call fcn.004077be
add esp, 0x670
ret 4
push 0
push str.RemoveService.exe
call dword [sym.imp.KERNEL32.dll_WinExec]
push 0
call fcn.00405c00
push 0
call fcn.004039f0
push 0
call fcn.004035e0
lea ecx, [esp + 0x68]
push 0x5c
push ecx
call fcn.004080e6
mov esi, eax
add esp, 0x14
lea edx, [esi + 2]
push edx
lea eax, [esp + edi*2 + 0x268]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0
lea ecx, [esp + 0x268]
push ecx
lea edx, [esp + 0x64]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push str.__u__
lea eax, [esp + 0x268]
push eax
call edi
lea ecx, [esp + 0x5c]
push ecx
lea edx, [esp + 0x268]
push edx
mov word [esi], 0
call edi
push 0x41329c
lea eax, [esp + 0x268]
push eax
call edi
xor eax, eax
mov ecx, 0x11
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
xor ecx, ecx
mov dword [esp + 8], ecx
lea edx, [esp + 8]
push edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
lea eax, [esp + 0x1c]
push eax
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
mov dword [esp + 0x34], ecx
lea ecx, [esp + 0x284]
push ecx
push 0
mov dword [esp + 0x40], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x4069d4
mov edx, dword [esp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0xc]
push eax
call esi
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x66c]
call fcn.004077be
add esp, 0x670
ret 4
mov ecx, dword [esp + 0x67c]
push 0x41390c
push ecx
call fcn.00407624
add esp, 8
test eax, eax
je 0x4069d4
add eax, 6
push 0x22
push eax
call fcn.004085c2
mov esi, eax
add esp, 8
test esi, esi
je 0x4069d4
add esi, 2
push 0x22
push esi
call fcn.004085c2
add esp, 8
test eax, eax
je 0x4069d4
sub eax, esi
sar eax, 1
inc eax
push eax
push esi
lea edx, [esp + 0x64]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [esp + 0x5c]
push eax
push str.Uninstall:_Path_s_n
call fcn.00403310
add esp, 8
lea ecx, [esp + 0x5c]
push ecx
call fcn.00405220
cmp eax, 0xffffffff
jne 0x4069ee
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x66c]
call fcn.004077be
add esp, 0x670
ret 4
lea edx, [esp + 0x5c]
push edx
call fcn.00403f60
add esp, 4
cmp eax, 1
jne 0x406a0b
push 0
push 0x73
push 0
call fcn.004043f0
lea eax, [esp + 0x5c]
push eax
call fcn.00403ac0
mov cl, 1
call fcn.00404960
push 1
call fcn.00406200
mov ecx, dword [esp + 0x674]
pop edi
mov eax, 1
pop esi
call fcn.004077be
add esp, 0x670
ret 4