Function at 0x4039e5
Capabilities:
Accept command line arguments
Check os version
Copy file
Delete file
Get common file path
Get file system object information
Set current directory
Set environment variable
Shutdown system
Terminate process

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x3f0
push ebx
push esi
push edi
push 0x20
pop edi
xor ebx, ebx
push 0x8001
mov dword [ebp + 0x68], ebx
mov dword [ebp + 0x70], str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
mov dword [ebp + 0x74], ebx
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea eax, [ebp - 0xc4]
push eax
mov dword [ebp - 0xb0], ebx
mov dword [ebp + 0x50], ebx
mov dword [ebp + 0x54], ebx
mov dword [ebp - 0xc4], 0x11c
call esi
test eax, eax
jne 0x403a6d
lea eax, [ebp - 0xc4]
push eax
mov dword [ebp - 0xc4], 0x114
call esi
mov ecx, dword [ebp - 0x96]
xor eax, eax
add ecx, 0xffffffd0
cmp word [ebp - 0xb0], 0x53
mov byte [ebp + 0x56], 4
setne al
dec eax
and eax, ecx
mov word [ebp + 0x50], ax
cmp dword [ebp - 0xc0], 0xa
jae 0x403a80
and dword [ebp - 0xb8], 0xffff
mov eax, dword [ebp - 0xb8]
movzx ecx, byte [ebp - 0xbc]
mov dword [0x429df8], eax
movzx ax, byte [ebp - 0xc0]
shl ax, 8
movzx eax, ax
or eax, ecx
movzx cx, byte [ebp + 0x50]
shl cx, 8
shl eax, 0x10
movzx ecx, cx
or eax, ecx
movzx ecx, byte [ebp + 0x56]
or eax, ecx
mov dword [0x429dfc], eax
mov eax, 0x600
cmp word [0x429dfe], ax
je 0x403ade
push ebx
call fcn.00406616
cmp eax, ebx
je 0x403ade
push 0xc00
call eax
mov esi, str.UXTHEME
push esi
call fcn.004065a6
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
cmp byte [esi], bl
jne 0x403ae3
push 0xb
call fcn.00406616
push 9
call fcn.00406616
push 7
mov dword [0x429d00], eax
call fcn.00406616
cmp eax, ebx
je 0x403b25
push 0x1e
call eax
test eax, eax
je 0x403b25
or byte [0x429dfc], 0x80
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
push ebx
push 0x2b4
mov dword [0x429e00], eax
lea eax, [ebp - 0x378]
push eax
push ebx
push 0x4085c0
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x428d00
call fcn.00406491
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
mov ebx, 0x434000
push ebx
call fcn.00406491
push 0x22
pop esi
mov dword [0x429d08], 0x400000
mov eax, ebx
cmp word [0x434000], si
jne 0x403b90
mov edi, esi
mov eax, 0x434002
push edi
push eax
call fcn.00405fd5
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [ebp + 0x6c], eax
jmp 0x403c28
push 0x20
pop edx
cmp cx, dx
jne 0x403bb5
inc eax
inc eax
cmp word [eax], dx
je 0x403bae
mov edi, edx
cmp word [eax], si
jne 0x403bc0
inc eax
inc eax
mov edi, esi
cmp word [eax], 0x2f
jne 0x403c1a
inc eax
inc eax
cmp word [eax], 0x53
jne 0x403be6
movzx ecx, word [eax + 2]
cmp cx, dx
je 0x403bdc
test cx, cx
jne 0x403be6
mov dword [0x429de0], 1
cmp dword [eax], 0x43004e
jne 0x403c09
cmp dword [eax + 4], 0x430052
jne 0x403c09
movzx ecx, word [eax + 8]
cmp cx, dx
je 0x403c05
test cx, cx
jne 0x403c09
or dword [ebp + 0x74], 4
cmp dword [eax - 4], 0x2f0020
jne 0x403c1a
cmp dword [eax], 0x3d0044
je 0x403c36
push edi
push eax
call fcn.00405fd5
cmp word [eax], si
jne 0x403c28
inc eax
inc eax
movzx ecx, word [eax]
test cx, cx
jne 0x403ba6
jmp 0x403c4a
xor ecx, ecx
mov word [eax - 4], cx
add eax, 4
push eax
push 0x434800
call fcn.00406491
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, 0x436800
push esi
push 0x400
call edi
call fcn.0040398a
test eax, eax
jne 0x403cbc
push 0x3fb
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push esi
call sub.KERNEL32.dll_lstrcatW
call fcn.0040398a
test eax, eax
jne 0x403cbc
push esi
push 0x3fc
call edi
push 0x408594
push esi
call sub.KERNEL32.dll_lstrcatW
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push esi
push str.TEMP
call edi
push esi
push 0x408580
call edi
call fcn.0040398a
test eax, eax
je 0x403e5b
push 0x436000
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [ebp + 0x74]
call fcn.00403662
xor edi, edi
mov dword [ebp + 0x70], eax
cmp eax, edi
jne 0x403e5d
cmp dword [0x429d68], edi
je 0x403d43
push edi
push ebx
call fcn.00405fd5
mov edi, eax
jmp 0x403d02
cmp dword [edi], 0x5f0020
jne 0x403d00
cmp dword [edi + 4], 0x3d003f
je 0x403d06
dec edi
dec edi
cmp edi, ebx
jae 0x403cef
mov dword [ebp + 0x70], str.Error_launching_installer
cmp edi, ebx
jb 0x403d57
xor eax, eax
mov word [edi], ax
add edi, 8
push edi
call fcn.00406804
test eax, eax
je 0x403e5b
push edi
push 0x434800
call fcn.00406491
push edi
push 0x435000
call fcn.00406491
and dword [ebp + 0x70], 0
xor edi, edi
or dword [0x429dec], 0xffffffff
call fcn.00405b7a
mov dword [ebp + 0x68], eax
jmp 0x403e5d
call fcn.00406701
push 0x408574
push esi
mov dword [ebp + 0x74], eax
call sub.KERNEL32.dll_lstrcatW
cmp dword [ebp + 0x74], 0
je 0x403d7b
push 0x408570
push esi
call sub.KERNEL32.dll_lstrcatW
push str..tmp
push esi
call sub.KERNEL32.dll_lstrcatW
mov edi, 0x435800
push edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x403e5b
xor ebx, ebx
push esi
cmp dword [ebp + 0x74], ebx
je 0x403daa
call fcn.00405e53
jmp 0x403daf
call fcn.00405ed5
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp word [0x434800], bx
jne 0x403dca
push edi
push 0x434800
call fcn.00406491
push dword [ebp + 0x6c]
push section..ndata
call fcn.00406491
mov dword [0x42a800], 0x41
mov dword [ebp + 0x74], 0x1a
mov edi, 0x4209c8
mov eax, dword [0x429d0c]
push dword [eax + 0x120]
push edi
call fcn.0040688c
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x70], ebx
je 0x403e48
push 1
push edi
push 0x437800
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x403e48
push ebx
push edi
call fcn.00406c49
mov eax, dword [0x429d0c]
push dword [eax + 0x124]
push edi
call fcn.0040688c
push edi
call fcn.00405ef2
cmp eax, ebx
je 0x403e48
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x70], ebx
inc word [0x42a800]
dec dword [ebp + 0x74]
jne 0x403ded
push ebx
push esi
call fcn.00406c49
xor edi, edi
call fcn.004039bb
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [ebp + 0x70], edi
je 0x403e82
push 0x200010
push dword [ebp + 0x70]
call fcn.00405f6f
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp dword [0x429dd4], edi
je 0x403f00
lea eax, [ebp + 0x6c]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x403ed0
lea eax, [ebp + 0x5c]
push eax
push str.SeShutdownPrivilege
push edi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
push edi
push edi
push edi
lea eax, [ebp + 0x58]
push eax
push edi
push dword [ebp + 0x6c]
mov dword [ebp + 0x58], 1
mov dword [ebp + 0x64], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 4
call fcn.00406616
mov esi, 0x80040002
cmp eax, edi
je 0x403eec
push esi
push 0x25
push edi
push edi
push edi
call eax
test eax, eax
je 0x403ef9
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x403f00
push 9
call fcn.0040141a
mov eax, dword [0x429dec]
cmp eax, 0xffffffff
je 0x403f0d
mov dword [ebp + 0x68], eax
push dword [ebp + 0x68]
jmp 0x403e7c