Function at 0x403cbf
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:
sub esp, 0x3ec
and dword [esp], 0
push ebx
push ebp
push esi
push edi
push 0x20
pop eax
push 0x8001
mov edi, str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
mov dword [esp + 0x1c], eax
xor ebp, ebp
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
and dword [esp + 0x40], ebp
lea eax, [esp + 0x2c]
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
xorps xmm0, xmm0
push eax
movlpd qword [esp + 0x144], xmm0
mov dword [esp + 0x30], 0x11c
call esi
test eax, eax
jne 0x403d48
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], 0x114
push eax
call esi
push 0x53
pop eax
mov dl, 4
mov byte [esp + 0x146], dl
cmp word [esp + 0x40], ax
jne 0x403d44
mov eax, dword [esp + 0x5a]
add eax, 0xffffffd0
mov word [esp + 0x140], ax
jmp 0x403d4f
xor eax, eax
jmp 0x403d3a
mov dl, byte [esp + 0x146]
cmp dword [esp + 0x30], 0xa
mov eax, dword [esp + 0x38]
jae 0x403d63
and eax, 0xffff
mov dword [esp + 0x38], eax
mov dword [0x7ef6f8], eax
mov esi, str.UXTHEME
movzx eax, byte [esp + 0x30]
shl ax, 8
movzx ecx, ax
movzx eax, byte [esp + 0x34]
or ecx, eax
movzx eax, byte [esp + 0x140]
shl ax, 8
shl ecx, 0x10
movzx eax, ax
or ecx, eax
movzx eax, dl
or ecx, eax
mov dword [0x7ef6fc], ecx
push esi
call fcn.004066ae
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc esi
add esi, eax
cmp byte [esi], 0
jne 0x403d9f
push 0xb
call fcn.00406e1f
push 9
call fcn.00406e1f
push 7
mov dword [0x7e75d0], eax
call fcn.00406e1f
test eax, eax
je 0x403de1
push 0x1e
call eax
test eax, eax
je 0x403de1
or byte [0x7ef6fc], 0x80
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
xor esi, esi
push esi
call dword [sym.imp.ole32.dll_OleInitialize]
push esi
push 0x2b4
mov dword [0x7ef664], eax
lea eax, [esp + 0x150]
push eax
push esi
push 0x4095d8
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x7e75e0
call fcn.0040705d
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
mov esi, 0x8400a0
push esi
call fcn.0040705d
push 0x22
mov eax, esi
mov dword [0x7e75d4], 0x400000
pop esi
cmp word [0x8400a0], si
jne 0x403e4f
mov ebx, esi
mov eax, 0x8400a2
push ebx
push eax
call fcn.00406b25
push eax
call dword [sym.imp.USER32.dll_CharNextW]
push 2
mov dword [esp + 0x18], eax
pop ebx
jmp 0x403eee
push 0x20
pop edx
cmp cx, dx
jne 0x403e78
add eax, ebx
cmp word [eax], dx
je 0x403e71
cmp word [eax], si
jne 0x403e81
add eax, ebx
mov edx, esi
cmp word [eax], 0x2f
jne 0x403ee0
add eax, ebx
push 0x53
pop ecx
cmp word [eax], cx
jne 0x403eab
movzx ecx, word [eax + 2]
cmp cx, word [esp + 0x18]
je 0x403ea1
test cx, cx
jne 0x403eab
mov dword [0x7ef6e0], 1
cmp dword [eax], 0x43004e
jne 0x403ecf
cmp dword [eax + 4], 0x430052
jne 0x403ecf
movzx ecx, word [eax + 8]
cmp cx, word [esp + 0x18]
je 0x403ecc
test cx, cx
jne 0x403ecf
or ebp, 4
cmp dword [eax - 4], 0x2f0020
jne 0x403ee0
cmp dword [eax], 0x3d0044
je 0x403efc
push edx
push eax
call fcn.00406b25
cmp word [eax], si
jne 0x403eee
add eax, ebx
movzx ecx, word [eax]
test cx, cx
jne 0x403e69
jmp 0x403f10
xor ecx, ecx
mov word [eax - 4], cx
add eax, 4
push eax
push 0x8440a8
call fcn.0040705d
mov esi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ebx, 0x8540c8
push ebx
push 0x2004
call esi
call fcn.004041f4
test eax, eax
jne 0x403f82
push 0x1fff
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push ebx
call sub.KERNEL32.dll_lstrcatW
call fcn.004041f4
test eax, eax
jne 0x403f82
push ebx
push 0x2000
call esi
push 0x409600
push ebx
call sub.KERNEL32.dll_lstrcatW
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push ebx
push str.TEMP
call esi
push ebx
push 0x409614
call esi
call fcn.004041f4
test eax, eax
je 0x404129
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x8500c0
call ebx
push ebp
call fcn.00403841
mov edi, eax
test edi, edi
jne 0x404129
cmp dword [0x7ef5f8], eax
je 0x404006
push eax
mov ebp, 0x8400a0
push ebp
call fcn.00406b25
mov esi, eax
jmp 0x403fcb
cmp dword [esi], 0x5f0020
jne 0x403fc8
cmp dword [esi + 4], 0x3d003f
je 0x403fcf
sub esi, 2
cmp esi, ebp
jae 0x403fb7
mov edi, str.Error_launching_installer
cmp esi, ebp
jb 0x404019
xor eax, eax
mov word [esi], ax
add esi, 8
push esi
call fcn.00406b5d
test eax, eax
je 0x404129
push esi
push 0x8440a8
call fcn.0040705d
push esi
push 0x8480b0
call fcn.0040705d
xor edi, edi
or dword [0x7ef6ec], 0xffffffff
call fcn.00405f22
mov ebx, eax
jmp 0x40412d
call fcn.00406a29
push str.nsu
mov ebp, 0x8540c8
mov esi, eax
push ebp
call sub.KERNEL32.dll_lstrcatW
test esi, esi
je 0x40403f
push 0x409628
push ebp
call sub.KERNEL32.dll_lstrcatW
push 0x40962c
push ebp
call sub.KERNEL32.dll_lstrcatW
push 0x84c0b8
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x404129
push ebp
test esi, esi
je 0x40406a
call fcn.00406339
jmp 0x40406f
call fcn.00406319
push ebp
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp word [0x8440a8], 0
jne 0x40408f
push 0x84c0b8
push 0x8440a8
call fcn.0040705d
push dword [esp + 0x14]
push section..ndata
call fcn.0040705d
push 0x1a
mov dword [0x7f4008], 0x41
pop esi
mov eax, dword [0x7ef604]
push dword [eax + 0x120]
push 0x7b1a28
call fcn.004063b7
push 0x7b1a28
call ebx
test edi, edi
je 0x404118
push 1
push 0x7b1a28
push 0x85c0d8
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x404118
push 0
push 0x7b1a28
call fcn.00406751
mov eax, dword [0x7ef604]
push dword [eax + 0x124]
push 0x7b1a28
call fcn.004063b7
push 0x7b1a28
call fcn.00406bfb
test eax, eax
je 0x404118
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
inc word [0x7f4008]
dec esi
jne 0x4040aa
push esi
push ebp
call fcn.00406751
mov ebx, dword [esp + 0x10]
call fcn.00403c95
call dword [sym.imp.ole32.dll_OleUninitialize]
test edi, edi
je 0x40414f
push 0x200010
push edi
call fcn.00406feb
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp dword [0x7ef6d4], 0
je 0x4041e0
lea eax, [esp + 0x14]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4041ad
lea eax, [esp + 0x20]
push eax
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
push 0
push 0
push 0
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 1
push eax
push 0
push dword [esp + 0x28]
mov dword [esp + 0x40], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 4
call fcn.00406e1f
mov esi, 0x80040002
test eax, eax
je 0x4041cc
push esi
push 0x25
push 0
push 0
push 0
call eax
test eax, eax
je 0x4041d9
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x4041e0
push 9
call fcn.00401539
cmp dword [0x7ef6ec], 0xffffffff
cmovne ebx, dword [0x7ef6ec]
push ebx
jmp 0x404149