Function at 0x403e51
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 0x403edd
lea eax, [ebp - 0xc4]
push eax
mov dword [ebp - 0xc4], 0x114
call esi
mov ax, word [ebp - 0xb0]
mov ecx, dword [ebp - 0x96]
sub ax, 0x53
add ecx, 0xffffffd0
neg ax
mov byte [ebp + 0x56], 4
sbb eax, eax
not eax
and eax, ecx
mov word [ebp + 0x50], ax
cmp dword [ebp - 0xc0], 0xa
jae 0x403ef0
and dword [ebp - 0xb8], 0xffff
mov eax, dword [ebp - 0xb8]
movzx ecx, byte [ebp - 0xbc]
mov dword [0x4736d8], eax
xor eax, eax
mov ah, byte [ebp - 0xc0]
mov esi, str.UXTHEME
movzx eax, ax
or eax, ecx
xor ecx, ecx
mov ch, byte [ebp + 0x50]
shl eax, 0x10
movzx ecx, cx
or eax, ecx
movzx ecx, byte [ebp + 0x56]
or eax, ecx
mov dword [0x4736dc], eax
push esi
call fcn.00406cf1
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
cmp byte [esi], bl
jne 0x403f2c
push 0xb
call fcn.00406d61
push 9
call fcn.00406d61
push 7
mov dword [0x4735f0], eax
call fcn.00406d61
cmp eax, ebx
je 0x403f6e
push 0x1e
call eax
test eax, eax
je 0x403f6e
or byte [0x4736dc], 0x80
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
push ebx
push 0x2b4
mov dword [0x4736e0], eax
lea eax, [ebp - 0x378]
push eax
push ebx
push 0x40a2e0
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x46b5e0
call fcn.0040698c
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
mov ebx, 0x4c40a0
push ebx
call fcn.0040698c
push 0x22
pop esi
cmp word [0x4c40a0], si
mov dword [0x4735f8], 0x400000
mov eax, ebx
jne 0x403fd9
mov edi, esi
mov eax, 0x4c40a2
push edi
push eax
call fcn.004064d5
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [ebp + 0x6c], eax
jmp 0x404071
push 0x20
pop edx
cmp cx, dx
jne 0x403ffe
inc eax
inc eax
cmp word [eax], dx
je 0x403ff7
cmp word [eax], si
mov edi, edx
jne 0x404009
inc eax
inc eax
mov edi, esi
cmp word [eax], 0x2f
jne 0x404063
inc eax
inc eax
cmp word [eax], 0x53
jne 0x40402f
movzx ecx, word [eax + 2]
cmp cx, dx
je 0x404025
test cx, cx
jne 0x40402f
mov dword [0x4736c0], 1
cmp dword [eax], 0x43004e
jne 0x404052
cmp dword [eax + 4], 0x430052
jne 0x404052
movzx ecx, word [eax + 8]
cmp cx, dx
je 0x40404e
test cx, cx
jne 0x404052
or dword [ebp + 0x74], 4
cmp dword [eax - 4], 0x2f0020
jne 0x404063
cmp dword [eax], 0x3d0044
je 0x40407f
push edi
push eax
call fcn.004064d5
cmp word [eax], si
jne 0x404071
inc eax
inc eax
movzx ecx, word [eax]
test cx, cx
jne 0x403fef
jmp 0x404092
and word [eax - 4], 0
add eax, 4
push eax
push 0x4c80a8
call fcn.0040698c
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, 0x4d80c8
push esi
push 0x2004
call edi
call fcn.00403df6
test eax, eax
jne 0x404104
push 0x1fff
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push esi
call sub.KERNEL32.dll_lstrcatW
call fcn.00403df6
test eax, eax
jne 0x404104
push esi
push 0x2000
call edi
push 0x40a2b4
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 0x40a2a0
call edi
call fcn.00403df6
test eax, eax
je 0x4042a9
push 0x4d40c0
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [ebp + 0x74]
call fcn.00403acf
xor edi, edi
cmp eax, edi
mov dword [ebp + 0x70], eax
jne 0x4042ab
cmp dword [0x473648], edi
je 0x40418a
push edi
push ebx
call fcn.004064d5
mov edi, eax
jmp 0x40414a
cmp dword [edi], 0x5f0020
jne 0x404148
cmp dword [edi + 4], 0x3d003f
je 0x40414e
dec edi
dec edi
cmp edi, ebx
jae 0x404137
cmp edi, ebx
mov dword [ebp + 0x70], str.Error_launching_installer
jb 0x4041a5
and word [edi], 0
add edi, 8
push edi
call fcn.00406f4d
test eax, eax
je 0x4042a9
push edi
push 0x4c80a8
call fcn.0040698c
push edi
push 0x4cc0b0
call fcn.0040698c
and dword [ebp + 0x70], 0
xor edi, edi
or dword [0x4736cc], 0xffffffff
call fcn.00406060
push 1
mov dword [ebp + 0x68], eax
call fcn.00406a78
jmp 0x4042ab
call fcn.00406e4c
push 0x40a294
push esi
mov dword [ebp + 0x74], eax
call sub.KERNEL32.dll_lstrcatW
cmp dword [ebp + 0x74], 0
je 0x4041c9
push 0x40a290
push esi
call sub.KERNEL32.dll_lstrcatW
push str..tmp
push esi
call sub.KERNEL32.dll_lstrcatW
mov edi, 0x4d00b8
push edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4042a9
xor ebx, ebx
cmp dword [ebp + 0x74], ebx
push esi
je 0x4041f8
call fcn.00406356
jmp 0x4041fd
call fcn.004063d7
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp word [0x4c80a8], bx
jne 0x404218
push edi
push 0x4c80a8
call fcn.0040698c
push dword [ebp + 0x6c]
push section..ndata
call fcn.0040698c
mov dword [0x478008], 0x41
mov dword [ebp + 0x74], 0x1a
mov edi, 0x434210
mov eax, dword [0x4735fc]
push dword [eax + 0x120]
push edi
call fcn.00406fd5
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x70], ebx
je 0x404296
push 1
push edi
push 0x4e00d8
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x404296
push ebx
push edi
call fcn.00407394
mov eax, dword [0x4735fc]
push dword [eax + 0x124]
push edi
call fcn.00406fd5
push edi
call fcn.004063f4
cmp eax, ebx
je 0x404296
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x70], ebx
inc word [0x478008]
dec dword [ebp + 0x74]
jne 0x40423b
push ebx
push esi
call fcn.00407394
xor edi, edi
call fcn.00403e27
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [ebp + 0x70], edi
je 0x4042d0
push 0x200010
push dword [ebp + 0x70]
call fcn.00406471
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp dword [0x4736b4], edi
je 0x40434e
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 0x40431e
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.00406d61
cmp eax, edi
mov esi, 0x80040002
je 0x40433a
push esi
push 0x25
push edi
push edi
push edi
call eax
test eax, eax
je 0x404347
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x40434e
push 9
call fcn.00401414
mov eax, dword [0x4736cc]
cmp eax, 0xffffffff
je 0x40435b
mov dword [ebp + 0x68], eax
push dword [ebp + 0x68]
jmp 0x4042ca