Function at 0x408850
Capabilities:
Copy file
Create process on windows
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c5c53
mov eax, dword fs:[0]
push eax
mov eax, 0x1534
call fcn.004c4990
mov eax, dword [0x4f1040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ecx, [ebp - 0x1440]
call fcn.00401eb0
mov dword [ebp - 4], 0
mov byte [ebp - 0x1501], 0
lea ecx, [ebp - 0x1500]
call fcn.00401eb0
mov byte [ebp - 4], 1
push 0x800
push 0
lea eax, [ebp - 0xc10]
push eax
call fcn.004a0100
add esp, 0xc
push 0x3fe
lea ecx, [ebp - 0xc10]
push ecx
push str.TEMP
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x151c], eax
cmp dword [ebp - 0x151c], 0
je 0x408947
lea edx, [ebp - 0xc10]
mov dword [ebp - 0x1508], edx
mov eax, dword [ebp - 0x1508]
add eax, 2
mov dword [ebp - 0x1520], eax
mov ecx, dword [ebp - 0x1508]
mov dx, word [ecx]
mov word [ebp - 0x1512], dx
add dword [ebp - 0x1508], 2
cmp word [ebp - 0x1512], 0
jne 0x4088fe
mov eax, dword [ebp - 0x1508]
sub eax, dword [ebp - 0x1520]
sar eax, 1
mov dword [ebp - 0x1524], eax
je 0x408947
lea ecx, [ebp - 0xc10]
push ecx
lea ecx, [ebp - 0x1440]
call fcn.004059e0
lea ecx, [ebp - 0x14e8]
call fcn.00401eb0
mov byte [ebp - 4], 2
push 0x400
push 0
lea edx, [ebp - 0x410]
push edx
call fcn.004a0100
add esp, 0xc
push 0x1ff
lea eax, [ebp - 0x410]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x410]
push ecx
lea ecx, [ebp - 0x1428]
call fcn.00401d30
mov byte [ebp - 4], 3
push 0
lea ecx, [ebp - 0x1440]
call fcn.00401b60
push eax
lea ecx, [ebp - 0x1428]
call fcn.00401ac0
cmp eax, 0xffffffff
jne 0x408d46
lea edx, [ebp - 0x1440]
push edx
lea ecx, [ebp - 0x1470]
call fcn.00401e20
mov byte [ebp - 4], 4
push 0x4e597c
lea ecx, [ebp - 0x1470]
call fcn.00404c80
push 0
lea ecx, [ebp - 0x1470]
call fcn.00401b60
push eax
lea ecx, [ebp - 0x1428]
call fcn.00401b60
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x408d35
lea ecx, [ebp - 0x1540]
call fcn.00408e70
mov byte [ebp - 4], 5
push 0x4e599c
lea ecx, [ebp - 0x14b8]
call fcn.00401d30
mov byte [ebp - 4], 6
lea eax, [ebp - 0x14b8]
push eax
lea ecx, [ebp - 0x1540]
push ecx
lea edx, [ebp - 0x1428]
push edx
call fcn.004018c0
add esp, 0xc
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x14b8]
call fcn.00401be0
lea ecx, [ebp - 0x1540]
call fcn.00408e20
sub eax, 1
push eax
lea ecx, [ebp - 0x1540]
call fcn.00408de0
push eax
lea ecx, [ebp - 0x14a0]
call fcn.00401e20
mov byte [ebp - 4], 7
push 0x800
push 0
lea eax, [ebp - 0x1410]
push eax
call fcn.004a0100
add esp, 0xc
lea ecx, [ebp - 0x1428]
call fcn.00401b60
mov dword [ebp - 0x150c], eax
mov ecx, dword [ebp - 0x150c]
add ecx, 2
mov dword [ebp - 0x1528], ecx
mov edx, dword [ebp - 0x150c]
mov ax, word [edx]
mov word [ebp - 0x1514], ax
add dword [ebp - 0x150c], 2
cmp word [ebp - 0x1514], 0
jne 0x408ab5
mov ecx, dword [ebp - 0x150c]
sub ecx, dword [ebp - 0x1528]
sar ecx, 1
mov dword [ebp - 0x1530], ecx
lea ecx, [ebp - 0x14a0]
call fcn.00401b60
mov dword [ebp - 0x1510], eax
mov edx, dword [ebp - 0x1510]
add edx, 2
mov dword [ebp - 0x152c], edx
mov eax, dword [ebp - 0x1510]
mov cx, word [eax]
mov word [ebp - 0x1516], cx
add dword [ebp - 0x1510], 2
cmp word [ebp - 0x1516], 0
jne 0x408b0a
mov edx, dword [ebp - 0x1510]
sub edx, dword [ebp - 0x152c]
sar edx, 1
mov dword [ebp - 0x1534], edx
mov eax, dword [ebp - 0x1530]
sub eax, dword [ebp - 0x1534]
push eax
lea ecx, [ebp - 0x1428]
call fcn.00401b60
push eax
lea ecx, [ebp - 0x1410]
push ecx
call fcn.004ad08d
add esp, 0xc
lea edx, [ebp - 0x1410]
push edx
lea ecx, [ebp - 0x1458]
call fcn.00401d30
mov byte [ebp - 4], 8
push 0x4e59a0
lea ecx, [ebp - 0x1458]
call fcn.00404c80
lea eax, [ebp - 0x1440]
push eax
lea ecx, [ebp - 0x1488]
call fcn.00401e20
mov byte [ebp - 4], 9
push 0x4e59bc
lea ecx, [ebp - 0x1488]
call fcn.00404c80
lea ecx, [ebp - 0x1458]
call fcn.00401b60
push eax
call fcn.004050f0
add esp, 4
test eax, eax
jne 0x408ca6
push 0x4e59dc
lea ecx, [ebp - 0x14d0]
call fcn.00401d30
push 0
push 0x4e5a0c
lea ecx, [ebp - 0x14d0]
call fcn.00401b60
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov cl, byte [ebp - 0x1501]
mov byte [ebp - 0x1502], cl
lea ecx, [ebp - 0x14d0]
call fcn.00401be0
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x1488]
call fcn.00401be0
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x1458]
call fcn.00401be0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x14a0]
call fcn.00401be0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x1540]
call fcn.00408e50
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x1470]
call fcn.00401be0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1428]
call fcn.00401be0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x14e8]
call fcn.00401be0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1500]
call fcn.00401be0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1440]
call fcn.00401be0
mov al, byte [ebp - 0x1502]
jmp 0x408dc1
push 0
lea ecx, [ebp - 0x1488]
call fcn.00401b60
push eax
lea ecx, [ebp - 0x1458]
call fcn.00401b60
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push 1
push 0x4e5a1c
mov ecx, 0x4f3da8
call fcn.00401b60
push eax
lea ecx, [ebp - 0x1470]
call fcn.00401b60
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x1470]
call fcn.00401be0
jmp 0x408d4d
mov byte [ebp - 0x1501], 1
movzx edx, byte [ebp - 0x1501]
test edx, edx
jne 0x408d70
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.uninstall.exe
mov eax, dword [ebp + 8]
push eax
call fcn.00404e30
add esp, 0xc
mov cl, byte [ebp - 0x1501]
mov byte [ebp - 0x1503], cl
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1428]
call fcn.00401be0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x14e8]
call fcn.00401be0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1500]
call fcn.00401be0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1440]
call fcn.00401be0
mov al, byte [ebp - 0x1503]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040b76b
mov esp, ebp
pop ebp
ret