Function at 0x40338f
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 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 0x40340d
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 0x403409
mov eax, dword [esp + 0x5a]
add eax, 0xffffffd0
mov word [esp + 0x140], ax
jmp 0x403414
xor eax, eax
jmp 0x4033ff
mov dl, byte [esp + 0x146]
cmp dword [esp + 0x30], 0xa
jae 0x403426
movzx eax, word [esp + 0x38]
mov dword [esp + 0x38], eax
jmp 0x40342a
mov eax, dword [esp + 0x38]
mov dword [0x4782f8], 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 [0x4782fc], ecx
sar ecx, 0x10
cmp cx, ax
je 0x40347f
push ebx
call fcn.00405767
test eax, eax
je 0x40347f
push 0xc00
call eax
mov esi, str.UXTHEME
push esi
call fcn.004051d7
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc esi
add esi, eax
cmp byte [esi], bl
jne 0x403484
push 0xb
call fcn.00405767
push 9
call fcn.00405767
push 7
mov dword [0x4701f0], eax
call fcn.00405767
test eax, eax
je 0x4034c5
push 0x1e
call eax
test eax, eax
je 0x4034c5
or byte [0x4782fc], 0x80
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
push ebx
push 0x2b4
mov dword [0x478260], eax
lea eax, [esp + 0x150]
push eax
push ebx
push 0x407594
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x470200
call fcn.0040599b
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
push 0x4c9000
call fcn.0040599b
movzx ecx, word [0x4c9000]
mov edx, 0x4c9002
push 0x22
pop esi
push 0x20
pop ebx
cmp cx, si
mov dword [0x4701f4], 0x400000
mov eax, esi
mov dword [esp + 0x14], esi
cmovne eax, ebx
movzx eax, ax
push eax
mov eax, 0x4c9000
cmove eax, edx
push eax
call fcn.004054a0
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov ecx, eax
mov dword [esp + 0x18], ecx
movzx eax, word [ecx]
test ax, ax
je 0x40361a
mov esi, eax
movzx eax, si
cmp si, bx
jne 0x403579
add ecx, 2
movzx eax, word [ecx]
cmp ax, bx
je 0x40356e
push 0x20
movzx ebx, ax
pop esi
movzx edx, ax
cmp ax, word [esp + 0x14]
jne 0x403592
movzx edx, word [ecx + 2]
push 0x22
pop eax
mov esi, eax
cmp bx, word [esp + 0x14]
lea eax, [ecx + 2]
cmovne eax, ecx
cmp dx, 0x2f
jne 0x4035da
add eax, 2
push 0x53
pop ecx
cmp word [eax], cx
jne 0x4035c9
movzx ecx, word [eax + 2]
push 0x20
pop edx
cmp cx, dx
je 0x4035bf
test cx, cx
jne 0x4035c9
mov dword [0x4782e0], 1
cmp dword [eax - 4], 0x2f0020
jne 0x4035da
cmp dword [eax], 0x3d0044
je 0x403606
push esi
push eax
call fcn.004054a0
mov ecx, eax
push 0x22
pop ebx
movzx eax, word [ecx]
mov edx, eax
cmp ax, bx
jne 0x4035f6
add ecx, 2
movzx edx, word [ecx]
movzx esi, dx
test dx, dx
je 0x40361a
push 0x20
pop ebx
jmp 0x403566
xor ecx, ecx
mov word [eax - 4], cx
add eax, 4
push eax
push 0x4cd000
call fcn.0040599b
mov esi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ebx, 0x4dd000
push ebx
push 0x2000
call esi
call fcn.004038f5
test eax, eax
jne 0x40368c
push 0x1ffb
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push ebx
call sub.KERNEL32.dll_lstrcatW
call fcn.004038f5
test eax, eax
jne 0x40368c
push ebx
push 0x1ffc
call esi
push 0x4075bc
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 0x4075d0
call esi
call fcn.004038f5
test eax, eax
je 0x40371e
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x4d9000
call ebx
xor esi, esi
push esi
call fcn.004030aa
mov edi, eax
test edi, edi
jne 0x40371e
cmp dword [0x478204], esi
je 0x403710
push esi
push 0x4c9000
call fcn.004054a0
mov esi, eax
mov eax, 0x4c9000
jmp 0x4036d7
cmp dword [esi], 0x5f0020
jne 0x4036d4
cmp dword [esi + 4], 0x3d003f
je 0x4036db
sub esi, 2
cmp esi, eax
jae 0x4036c3
mov edi, str.Error_launching_installer
cmp esi, eax
jb 0x403744
xor eax, eax
mov word [esi], ax
add esi, 8
push esi
call fcn.004054e2
test eax, eax
je 0x40371e
push esi
push 0x4cd000
call fcn.0040599b
push esi
push 0x4d1000
call fcn.0040599b
xor eax, eax
mov edi, eax
or dword [0x4782ec], 0xffffffff
call fcn.00404abf
mov ebp, eax
call fcn.0040334d
call dword [sym.imp.ole32.dll_OleUninitialize]
test edi, edi
je 0x40385a
push 0x200010
push edi
call fcn.00405929
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.004053a6
push str.nsu
push 0x4dd000
mov esi, eax
call sub.KERNEL32.dll_lstrcatW
test esi, esi
je 0x40376d
push 0x4075e4
push 0x4dd000
call sub.KERNEL32.dll_lstrcatW
push 0x4075e8
push 0x4dd000
call sub.KERNEL32.dll_lstrcatW
push 0x4d5000
push 0x4dd000
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x40371e
push 0x4dd000
test esi, esi
je 0x4037a0
call fcn.00404e77
jmp 0x4037a5
call fcn.00404e57
push 0x4dd000
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor eax, eax
cmp word [0x4cd000], ax
jne 0x4037ca
push 0x4d5000
push 0x4cd000
call fcn.0040599b
push dword [esp + 0x18]
push section..gdata
call fcn.0040599b
push 0x1a
mov dword [0x47d000], 0x41
xor ebp, ebp
pop esi
mov eax, dword [0x478210]
push dword [eax + 0x94]
push 0x43ad48
call fcn.00404ef3
push 0x43ad48
call ebx
test edi, edi
je 0x403849
push 1
push 0x43ad48
push 0x4e5000
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x403849
mov eax, dword [0x478210]
push dword [eax + 0x98]
push 0x43ad48
call fcn.00404ef3
push 0x43ad48
call fcn.00405580
test eax, eax
je 0x403849
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, ebp
inc word [0x47d000]
sub esi, 1
jne 0x4037e7
jmp 0x40371e
cmp dword [0x4782d4], 0
je 0x4038e1
lea eax, [esp + 0x10]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
xor ebx, ebx
test eax, eax
je 0x4038b1
lea eax, [esp + 0x20]
push eax
push str.SeShutdownPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
push ebx
push ebx
push ebx
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 1
push eax
push ebx
push dword [esp + 0x24]
mov dword [esp + 0x40], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 4
call fcn.00405767
mov esi, 0x80040002
test eax, eax
je 0x4038cd
push esi
push 0x25
push ebx
push ebx
push ebx
call eax
test eax, eax
je 0x4038da
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x4038e1
push 8
call fcn.0040133a
cmp dword [0x4782ec], 0xffffffff
cmovne ebp, dword [0x4782ec]
push ebp
jmp 0x40373e