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

Disassembly:
sub esp, 0x3f8
push ebx
push esi
push edi
push 0x20
pop edi
xor ebx, ebx
push 0x8001
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
mov dword [esp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x14c], ebx
mov dword [esp + 0x150], ebx
mov dword [esp + 0x38], 0x11c
call esi
test eax, eax
jne 0x403a4b
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x38], 0x114
call esi
mov ax, word [esp + 0x48]
mov ecx, dword [esp + 0x62]
sub ax, 0x53
add ecx, 0xffffffd0
neg ax
mov byte [esp + 0x14e], 4
sbb eax, eax
not eax
and eax, ecx
mov word [esp + 0x148], ax
cmp dword [esp + 0x38], 0xa
jae 0x403a5a
and dword [esp + 0x40], 0xffff
mov eax, dword [esp + 0x40]
movzx ecx, byte [esp + 0x3c]
mov dword [0x42a658], eax
xor eax, eax
mov ah, byte [esp + 0x38]
movzx eax, ax
or eax, ecx
xor ecx, ecx
mov ch, byte [esp + 0x148]
shl eax, 0x10
movzx ecx, cx
or eax, ecx
movzx ecx, byte [esp + 0x14e]
or eax, ecx
mov dword [0x42a65c], eax
cmp word [0x42a65e], 0x600
je 0x403aaf
push ebx
call fcn.004065e3
cmp eax, ebx
je 0x403aaf
push 0xc00
call eax
mov esi, str.UXTHEME
push esi
call fcn.00406573
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
cmp byte [esi], bl
jne 0x403ab4
push 0xd
call fcn.004065e3
push 0xb
call fcn.004065e3
push 9
mov dword [0x42a560], eax
call fcn.004065e3
cmp eax, ebx
je 0x403af6
push 0x1e
call eax
test eax, eax
je 0x403af6
or byte [0x42a65c], 0x80
push ebp
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
push ebx
push 0x2b4
mov dword [0x42a660], eax
lea eax, [esp + 0x15c]
push eax
push ebx
push 0x4095d4
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x429560
call fcn.00406460
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
mov ebp, 0x435000
push ebp
call fcn.00406460
push 0x22
pop esi
cmp word [0x435000], si
mov dword [0x42a568], 0x400000
mov eax, ebp
jne 0x403b63
mov edi, esi
mov eax, 0x435002
push edi
push eax
call fcn.00405fa9
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [esp + 0x14], eax
jmp 0x403bfd
push 0x20
pop edi
cmp cx, di
jne 0x403b89
inc eax
inc eax
cmp word [eax], di
je 0x403b82
cmp word [eax], si
mov edx, edi
jne 0x403b94
inc eax
inc eax
mov edx, esi
cmp word [eax], 0x2f
jne 0x403bef
inc eax
inc eax
cmp word [eax], 0x53
jne 0x403bba
movzx ecx, word [eax + 2]
cmp cx, di
je 0x403bb0
cmp cx, bx
jne 0x403bba
mov dword [0x42a640], 1
cmp dword [eax], 0x43004e
jne 0x403bde
cmp dword [eax + 4], 0x430052
jne 0x403bde
movzx ecx, word [eax + 8]
cmp cx, di
je 0x403bd9
cmp cx, bx
jne 0x403bde
or dword [esp + 0x10], 4
cmp dword [eax - 4], 0x2f0020
jne 0x403bef
cmp dword [eax], 0x3d0044
je 0x403c0b
push edx
push eax
call fcn.00405fa9
cmp word [eax], si
jne 0x403bfd
inc eax
inc eax
movzx ecx, word [eax]
cmp cx, bx
jne 0x403b7a
jmp 0x403c1d
mov word [eax - 4], bx
add eax, 4
push eax
push 0x435800
call fcn.00406460
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, 0x437800
push esi
push 0x400
call edi
call fcn.00403964
test eax, eax
jne 0x403c8f
push 0x3fb
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push esi
call sub.KERNEL32.dll_lstrcatW
call fcn.00403964
test eax, eax
jne 0x403c8f
push esi
push 0x3fc
call edi
push 0x4095a8
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 0x409594
call edi
call fcn.00403964
test eax, eax
je 0x403dfc
push 0x437000
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 0x10]
call fcn.00403630
cmp eax, ebx
mov dword [esp + 0x18], eax
jne 0x403dfc
cmp dword [0x42a5c8], ebx
je 0x403d13
push ebx
push ebp
call fcn.00405fa9
mov edi, eax
jmp 0x403cd5
cmp dword [edi], 0x5f0020
jne 0x403cd3
cmp dword [edi + 4], 0x3d003f
je 0x403cd9
dec edi
dec edi
cmp edi, ebp
jae 0x403cc2
cmp edi, ebp
mov dword [esp + 0x18], str.Error_launching_installer
jb 0x403d28
mov word [edi], bx
add edi, 8
push edi
call fcn.004067f2
test eax, eax
je 0x403dfc
push edi
push 0x435800
call fcn.00406460
push edi
push 0x436000
call fcn.00406460
mov dword [esp + 0x18], ebx
or dword [0x42a64c], 0xffffffff
call fcn.00405b7b
mov dword [esp + 0x20], eax
jmp 0x403dfc
call fcn.004066f1
push esi
mov dword [esp + 0x20], eax
call sub.KERNEL32.dll_lstrlenW
push dword [esp + 0x14]
mov edi, eax
push section..ndata
call fcn.00406460
cmp word [0x435800], bx
jne 0x403d5f
push 0x436800
push 0x435800
call fcn.00406460
lea eax, [edi*2 + 0x437800]
mov dword [esp + 0x10], 1
mov dword [esp + 0x24], eax
mov edi, 0x42d800
mov ebx, 0x42e000
and dword [esp + 0x14], 0
movzx ebp, word [esp + 0x10]
push ebp
push str.nsu_X.tmp
push dword [esp + 0x2c]
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [0x42a56c]
add esp, 0xc
push dword [eax + 0x120]
push edi
call fcn.0040687a
cmp dword [esp + 0x1c], 0
push esi
je 0x403db9
call fcn.00405e51
jmp 0x403dbe
call fcn.00405eab
test eax, eax
je 0x403e28
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test ax, 0x400
jne 0x403dee
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x403dee
push 1
push esi
call fcn.00406c96
mov eax, dword [esp + 0x14]
inc dword [esp + 0x14]
test eax, eax
je 0x403d86
inc dword [esp + 0x10]
cmp word [esp + 0x10], 0
jne 0x403d7c
xor ebx, ebx
call fcn.00403995
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [esp + 0x18], ebx
pop ebp
je 0x403e9c
push 0x200010
push dword [esp + 0x18]
call fcn.00405f45
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0
push esi
call fcn.00406c6a
push 1
push edi
push 0x438800
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x403dfa
push 0
push edi
call fcn.00406c6a
mov eax, dword [0x42a56c]
push dword [eax + 0x124]
push ebx
call fcn.0040687a
push ebx
call fcn.00405ec8
test eax, eax
jne 0x403e8b
mov eax, dword [esp + 0x14]
inc dword [esp + 0x14]
test eax, eax
jne 0x403dfa
push edi
call fcn.0040654c
test eax, eax
je 0x403d86
jmp 0x403dfa
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esp + 0x18], 0
jmp 0x403dfa
cmp dword [0x42a634], ebx
je 0x403f20
lea eax, [esp + 0x18]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x403ef0
lea eax, [esp + 0x28]
push eax
push str.SeShutdownPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
push ebx
push ebx
push ebx
lea eax, [esp + 0x30]
push eax
push ebx
push dword [esp + 0x2c]
mov dword [esp + 0x3c], 1
mov dword [esp + 0x48], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 5
call fcn.004065e3
cmp eax, ebx
mov esi, 0x80040002
je 0x403f0c
push esi
push 0x25
push ebx
push ebx
push ebx
call eax
test eax, eax
je 0x403f19
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x403f20
push 9
call fcn.00401411
mov eax, dword [0x42a64c]
cmp eax, 0xffffffff
je 0x403f2e
mov dword [esp + 0x1c], eax
push dword [esp + 0x1c]
jmp 0x403e22