Function at 0x40327d
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, 0x2d4
push ebp
push esi
push 0x20
xor ebp, ebp
pop esi
mov dword [esp + 0xc], ebp
push 0x8001
mov dword [esp + 0xc], str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
mov dword [esp + 0x18], ebp
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp ax, 6
je 0x4032c2
push ebp
call fcn.00406408
cmp eax, ebp
je 0x4032c2
push 0xc00
call eax
push ebx
push edi
push str.UXTHEME
call fcn.0040639c
push str.USERENV
call fcn.0040639c
push str.SETUPAPI
call fcn.0040639c
push 9
call fcn.00406408
push 7
call fcn.00406408
mov dword [0x7a8a44], eax
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push ebp
call dword [sym.imp.ole32.dll_OleInitialize]
mov dword [0x7a8af8], eax
push ebp
lea eax, [esp + 0x34]
push 0x2b4
push eax
push ebp
push 0x79ff00
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x7a7a40
call fcn.00406032
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov ebx, 0x7b3000
push eax
push ebx
call fcn.00406032
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp word [0x7b3000], 0x22
mov dword [0x7a8a40], eax
mov eax, ebx
jne 0x40335f
push 0x22
mov eax, 0x7b3002
pop esi
push esi
push eax
call fcn.00405a13
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov ecx, eax
mov dword [esp + 0x18], ecx
mov ax, word [ecx]
cmp ax, bp
je 0x403491
push 0x20
pop edx
cmp ax, dx
jne 0x40338e
inc ecx
inc ecx
cmp word [ecx], dx
je 0x403387
cmp word [ecx], 0x22
mov ebp, edx
jne 0x40339b
inc ecx
push 0x22
inc ecx
pop ebp
cmp word [ecx], 0x2f
jne 0x40345d
inc ecx
inc ecx
cmp word [ecx], 0x53
jne 0x4033c5
mov ax, word [ecx + 2]
cmp ax, dx
je 0x4033bb
test ax, ax
jne 0x4033c5
mov dword [0x7a8ae0], 1
movzx eax, word [0x40a2c2]
cdq
shld edx, eax, 0x10
shl eax, 0x10
mov edi, eax
xor esi, esi
movzx eax, word [0x40a2c0]
cdq
movzx edx, word [str.NCRC]
or edi, eax
movzx eax, word [0x40a2be]
shl eax, 0x10
or eax, edx
cdq
or esi, eax
mov eax, dword [ecx]
or edi, edx
cmp eax, esi
jne 0x40341b
mov eax, dword [ecx + 4]
cmp eax, edi
jne 0x40341b
mov ax, word [ecx + 8]
cmp ax, 0x20
je 0x403416
test ax, ax
jne 0x40341b
or dword [esp + 0x1c], 4
movzx eax, word [0x40a2b6]
cdq
shld edx, eax, 0x10
shl eax, 0x10
mov edi, eax
xor esi, esi
movzx eax, word [0x40a2b4]
cdq
movzx edx, word [str.__D]
or edi, eax
movzx eax, word [0x40a2b2]
shl eax, 0x10
or eax, edx
cdq
or esi, eax
mov eax, dword [ecx - 4]
or edi, edx
cmp eax, esi
jne 0x40345d
mov eax, dword [ecx]
cmp eax, edi
je 0x40347c
push ebp
push ecx
call fcn.00405a13
mov ecx, eax
cmp word [ecx], 0x22
jne 0x40346e
inc ecx
inc ecx
mov ax, word [ecx]
test ax, ax
jne 0x40337f
jmp 0x40348f
and word [ecx - 4], 0
add ecx, 4
push ecx
push 0x7b3800
call fcn.00406032
xor ebp, ebp
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, 0x7b5800
push esi
push 0x400
call edi
call fcn.0040324c
test eax, eax
jne 0x403503
push 0x3fb
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push esi
call sub.KERNEL32.dll_lstrcatW
call fcn.0040324c
test eax, eax
jne 0x403503
push esi
push 0x3fc
call edi
push 0x40a29c
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 0x40a288
call edi
call fcn.0040324c
test eax, eax
je 0x4035ce
push 0x7b5000
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 0x1c]
call fcn.00402dee
cmp eax, ebp
mov dword [esp + 0x10], eax
jne 0x4035ce
cmp dword [0x7a8a5c], ebp
je 0x4035be
push ebp
push ebx
call fcn.00405a13
mov edi, eax
cmp edi, ebx
jb 0x403588
movzx eax, word [0x40a282]
cdq
shld edx, eax, 0x10
shl eax, 0x10
mov ebp, eax
movzx eax, word [0x40a280]
movzx ecx, word [0x40a27c]
cdq
or ebp, eax
movzx eax, word [0x40a27e]
shl eax, 0x10
or eax, ecx
xor ecx, ecx
cdq
or ecx, eax
mov eax, ebp
or eax, edx
mov edx, dword [edi]
cmp edx, ecx
jne 0x403580
mov edx, dword [edi + 4]
cmp edx, eax
je 0x403586
dec edi
dec edi
cmp edi, ebx
jae 0x403573
xor ebp, ebp
cmp edi, ebx
mov dword [esp + 0x10], str.Error_launching_installer
jb 0x4035fb
mov word [edi], bp
add edi, 8
push edi
call fcn.00405aee
test eax, eax
je 0x4035ce
push edi
push 0x7b3800
call fcn.00406032
push edi
push 0x7b4000
call fcn.00406032
mov dword [esp + 0x10], ebp
or dword [0x7a8aec], 0xffffffff
call fcn.0040387b
mov dword [esp + 0x14], eax
call fcn.004037a1
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [esp + 0x10], ebp
pop edi
pop ebx
je 0x403705
push 0x200010
push dword [esp + 0xc]
call fcn.00405777
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.004056fa
push 0x40a270
push esi
mov edi, eax
call sub.KERNEL32.dll_lstrcatW
cmp edi, ebp
je 0x40361c
push 0x40a26c
push esi
call sub.KERNEL32.dll_lstrcatW
push str..tmp
push esi
call sub.KERNEL32.dll_lstrcatW
mov ebx, 0x7b4800
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4035ce
cmp edi, ebp
push esi
je 0x403644
call fcn.00405660
jmp 0x403649
call fcn.004056dd
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp word [0x7b3800], bp
jne 0x403664
push ebx
push 0x7b3800
call fcn.00406032
push dword [esp + 0x18]
push section..ndata
call fcn.00406032
movzx eax, word [0x40a25a]
movzx ecx, word [0x40a258]
shl eax, 0x10
or eax, ecx
push 0x1a
mov dword [0x7a9800], eax
pop ebx
mov edi, 0x79f700
mov eax, dword [0x7a8a50]
push dword [eax + 0x120]
push edi
call fcn.00406054
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esp + 0x10], ebp
je 0x4036ef
push 1
push edi
push 0x7b6800
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x4036ef
push ebp
push edi
call fcn.00405ed3
mov eax, dword [0x7a8a50]
push dword [eax + 0x124]
push edi
call fcn.00406054
push edi
call fcn.00405712
cmp eax, ebp
je 0x4036ef
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x10], ebp
inc word [0x7a9800]
dec ebx
jne 0x403692
push ebp
push esi
call fcn.00405ed3
jmp 0x4035ce
cmp dword [0x7a8ad4], ebp
je 0x403789
lea eax, [esp + 0x10]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x403759
lea eax, [esp + 0x1c]
push eax
push str.SeShutdownPrivilege
push ebp
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
push ebp
push ebp
lea eax, [esp + 0x20]
push ebp
push eax
push ebp
push dword [esp + 0x24]
mov dword [esp + 0x30], 1
mov dword [esp + 0x3c], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 4
call fcn.00406408
cmp eax, ebp
mov esi, 0x80040002
je 0x403775
push esi
push 0x25
push ebp
push ebp
push ebp
call eax
test eax, eax
je 0x403782
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x403789
push 9
call fcn.0040140b
mov eax, dword [0x7a8aec]
cmp eax, 0xffffffff
je 0x403797
mov dword [esp + 0xc], eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_ExitProcess]