Function at 0x402040
Capabilities:
Check os version
Copy file
Create process on windows
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x43035c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa8
mov eax, dword [0x441510]
push ebx
push esi
push edi
mov dword [esp + 0xb0], eax
mov ebx, ecx
call fcn.0042317f
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0xc], esi
mov dword [esp + 0xbc], 0
call fcn.0042317f
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea edi, [eax + 0x10]
mov dword [esp + 0x14], edi
mov eax, dword [esi - 4]
mov ecx, 1
sub ecx, eax
mov eax, dword [esi - 8]
sub eax, 0x104
or eax, ecx
mov byte [esp + 0xbc], 1
jge 0x4020cd
push 0x104
lea ecx, [esp + 0x10]
call fcn.004013e0
mov esi, dword [esp + 0xc]
push 0
push 0x1c
push esi
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test esi, esi
jne 0x4020e2
xor eax, eax
jmp 0x4020f6
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4020e7
sub eax, edx
js 0x402315
cmp eax, dword [esi - 8]
jg 0x402315
push 0x5c
mov dword [esi - 0xc], eax
push esi
mov byte [eax + esi], 0
call fcn.004122a9
add esp, 8
test eax, eax
jne 0x40211a
or eax, 0xffffffff
jmp 0x40211c
sub eax, esi
push eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x14]
call fcn.00401ea0
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0xc0], 2
call fcn.00401f90
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0xbc], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402163
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x4021ea
mov byte [esp + 0xbc], al
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40219b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
mov dword [esp + 0xbc], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4021c4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor al, al
mov ecx, dword [esp + 0xb4]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0xa8]
pop ebx
call fcn.00411598
add esp, 0xb4
ret
mov eax, dword [esp + 0x20]
cmp eax, 5
lea ecx, [esp + 0xc]
jne 0x402204
push eax
push str.Temp
call fcn.00401f00
jmp 0x40221a
cmp eax, 6
jne 0x402210
push str.LocalTemp
jmp 0x402215
push str.Temp
call fcn.00402000
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_CopyFileA]
xor edi, edi
mov eax, dword [esp + 0x10]
push edi
push eax
lea ecx, [esp + 0x20]
push str._s_sgUnins_d.exe
push ecx
call fcn.00401720
mov esi, dword [esp + 0x28]
mov eax, dword [ebx + 0xa0]
add esp, 0x10
push 1
push esi
push eax
call ebp
test eax, eax
jne 0x402255
inc edi
cmp edi, 0x64
jl 0x402223
call fcn.0042317f
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0xa4]
push eax
lea ecx, [esp + 0x18]
push str.__s_
push ecx
mov byte [esp + 0xcc], 3
call fcn.00401720
mov edi, dword [esp + 0x20]
add esp, 0xc
push 1
push 0
push edi
push esi
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
lea eax, [edi - 0x10]
mov byte [esp + 0xc0], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
pop ebp
jg 0x4022c3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esi - 0x10]
mov byte [esp + 0xbc], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4022e5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
mov dword [esp + 0xbc], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40230e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov al, 1
jmp 0x4021c6
push 0x80070057
call fcn.00401130
int3