Function at 0x404031
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
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov edi, str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
push 0x8001
mov dword [esp + 0x14], ebx
mov ebp, ebx
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea eax, [esp + 0x2c]
xorps xmm0, xmm0
mov dword [esp + 0x40], ebx
push eax
movlpd qword [esp + 0x144], xmm0
mov dword [esp + 0x30], 0x11c
call esi
test eax, eax
jne 0x4040b3
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 0x4040af
mov eax, dword [esp + 0x5a]
add eax, 0xffffffd0
mov word [esp + 0x140], ax
jmp 0x4040ba
xor eax, eax
jmp 0x4040a5
mov dl, byte [esp + 0x146]
cmp dword [esp + 0x30], 0xa
jae 0x4040cc
movzx eax, word [esp + 0x38]
mov dword [esp + 0x38], eax
jmp 0x4040d0
mov eax, dword [esp + 0x38]
mov dword [0x473658], eax
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 eax, 0x600
mov dword [0x47365c], ecx
sar ecx, 0x10
cmp cx, ax
je 0x404125
push ebx
call fcn.004075a4
test eax, eax
je 0x404125
push 0xc00
call eax
mov esi, str.UXTHEME
push esi
call fcn.00406b9c
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc esi
add esi, eax
cmp byte [esi], bl
jne 0x40412a
push 0xb
call fcn.004075a4
push 9
call fcn.004075a4
push 7
mov dword [0x46b550], eax
call fcn.004075a4
test eax, eax
je 0x40416b
push 0x1e
call eax
test eax, eax
je 0x40416b
or byte [0x47365c], 0x80
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
push ebx
push 0x2b4
mov dword [0x4735c0], eax
lea eax, [esp + 0x150]
push eax
push ebx
push 0x40a2fc
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x46b560
call fcn.004077d8
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
push 0x4c4000
call fcn.004077d8
movzx ecx, word [0x4c4000]
mov edx, 0x4c4002
push 0x22
pop esi
push 0x20
pop ebx
cmp cx, si
mov dword [0x46b554], 0x400000
mov eax, esi
mov dword [esp + 0x18], esi
cmovne eax, ebx
movzx eax, ax
push eax
mov eax, 0x4c4000
cmove eax, edx
push eax
call fcn.0040718c
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov ecx, eax
mov dword [esp + 0x14], ecx
movzx eax, word [ecx]
test ax, ax
je 0x4042df
mov esi, eax
movzx eax, si
cmp si, bx
jne 0x40421f
add ecx, 2
movzx eax, word [ecx]
cmp ax, bx
je 0x404214
movzx esi, ax
movzx edx, ax
cmp ax, word [esp + 0x18]
jne 0x404235
movzx edx, word [ecx + 2]
push 0x22
pop eax
mov ebx, eax
cmp si, word [esp + 0x18]
lea eax, [ecx + 2]
cmovne eax, ecx
cmp dx, 0x2f
jne 0x40429f
push 0x53
add eax, 2
pop ecx
push 0x20
pop edx
cmp word [eax], cx
jne 0x40426c
movzx ecx, word [eax + 2]
cmp cx, dx
je 0x404262
test cx, cx
jne 0x40426c
mov dword [0x473640], 1
cmp dword [eax], 0x43004e
jne 0x40428e
cmp dword [eax + 4], 0x430052
jne 0x40428e
movzx ecx, word [eax + 8]
cmp cx, dx
je 0x40428b
test cx, cx
jne 0x40428e
or ebp, 4
cmp dword [eax - 4], 0x2f0020
jne 0x40429f
cmp dword [eax], 0x3d0044
je 0x4042cb
push ebx
push eax
call fcn.0040718c
mov ecx, eax
push 0x22
pop ebx
movzx eax, word [ecx]
mov edx, eax
cmp ax, bx
jne 0x4042bb
add ecx, 2
movzx edx, word [ecx]
movzx esi, dx
test dx, dx
je 0x4042df
push 0x20
pop ebx
jmp 0x40420c
xor ecx, ecx
mov word [eax - 4], cx
add eax, 4
push eax
push 0x4c8000
call fcn.004077d8
mov esi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ebx, 0x4d8000
push ebx
push 0x2000
call esi
call fcn.004045e1
test eax, eax
jne 0x404351
push 0x1ffb
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push ebx
call sub.KERNEL32.dll_lstrcatW
call fcn.004045e1
test eax, eax
jne 0x404351
push ebx
push 0x1ffc
call esi
push 0x40a324
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 0x40a338
call esi
call fcn.004045e1
test eax, eax
je 0x404520
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x4d4000
call ebx
push ebp
call fcn.00403bd4
mov edi, eax
xor ebp, ebp
test edi, edi
jne 0x404522
cmp dword [0x47356c], ebp
je 0x4043db
push ebp
push 0x4c4000
call fcn.0040718c
mov esi, eax
mov eax, 0x4c4000
jmp 0x4043a0
cmp dword [esi], 0x5f0020
jne 0x40439d
cmp dword [esi + 4], 0x3d003f
je 0x4043a4
sub esi, 2
cmp esi, eax
jae 0x40438c
mov edi, str.Error_launching_installer
cmp esi, eax
jb 0x4043f5
xor eax, eax
mov word [esi], ax
add esi, 8
push esi
call fcn.004071ce
test eax, eax
je 0x40451c
push esi
push 0x4c8000
call fcn.004077d8
push esi
push 0x4cc000
call fcn.004077d8
mov edi, ebp
or dword [0x47364c], 0xffffffff
call fcn.00406412
push 1
mov ebx, eax
call fcn.0040727e
jmp 0x404526
call fcn.00406efa
push str.nsu
push 0x4d8000
mov esi, eax
call sub.KERNEL32.dll_lstrcatW
test esi, esi
je 0x40441e
push 0x40a34c
push 0x4d8000
call sub.KERNEL32.dll_lstrcatW
push 0x40a350
push 0x4d8000
call sub.KERNEL32.dll_lstrcatW
push 0x4d0000
push 0x4d8000
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x40451c
push 0x4d8000
test esi, esi
je 0x404455
call fcn.0040683d
jmp 0x40445a
call fcn.0040681d
push 0x4d8000
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp word [0x4c8000], bp
jne 0x40447d
push 0x4d0000
push 0x4c8000
call fcn.004077d8
push dword [esp + 0x14]
push section..ndata
call fcn.004077d8
push 0x1a
mov dword [0x478000], 0x41
pop esi
mov eax, dword [0x473578]
push dword [eax + 0x120]
push 0x434200
call fcn.004068b9
push 0x434200
call ebx
test edi, edi
je 0x404505
push 1
push 0x434200
push 0x4e0000
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x404505
push ebp
push 0x434200
call fcn.00406c3b
mov eax, dword [0x473578]
push dword [eax + 0x124]
push 0x434200
call fcn.004068b9
push 0x434200
call fcn.0040733a
test eax, eax
je 0x404505
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, ebp
inc word [0x478000]
sub esi, 1
jne 0x404498
push ebp
push 0x4d8000
call fcn.00406c3b
mov ebx, ebp
jmp 0x404526
xor ebp, ebp
mov ebx, dword [esp + 0x10]
call fcn.00403fef
call dword [sym.imp.ole32.dll_OleUninitialize]
test edi, edi
je 0x404548
push 0x200010
push edi
call fcn.00407766
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp dword [0x473634], 0
je 0x4045cd
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 0x40459d
lea eax, [esp + 0x20]
push eax
push str.SeShutdownPrivilege
push ebp
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
push ebp
push ebp
push ebp
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 1
push eax
push ebp
push dword [esp + 0x28]
mov dword [esp + 0x40], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 4
call fcn.004075a4
mov esi, 0x80040002
test eax, eax
je 0x4045b9
push esi
push 0x25
push ebp
push ebp
push ebp
call eax
test eax, eax
je 0x4045c6
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x4045cd
push 9
call fcn.0040153c
cmp dword [0x47364c], 0xffffffff
cmovne ebx, dword [0x47364c]
push ebx
jmp 0x404542