Function at 0x403390
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:
push ebp
mov ebp, esp
sub esp, 0x220
push esi
push edi
xor edi, edi
push 0x8001
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
mov dword [ebp - 8], edi
mov byte [ebp - 0xc], 0x20
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea eax, [ebp - 0xc0]
push eax
mov dword [ebp - 0xac], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0xc0], 0x9c
call esi
test eax, eax
jne 0x403421
lea eax, [ebp - 0xc0]
mov dword [ebp - 0xc0], 0x94
push eax
call esi
cmp dword [ebp - 0xb0], 2
jne 0x403428
movsx cx, byte [ebp - 0x9f]
mov al, byte [ebp - 0xac]
sub ecx, 0x30
sub al, 0x53
mov byte [ebp - 0x26], 4
neg al
sbb eax, eax
not eax
and eax, ecx
mov word [ebp - 0x2c], ax
cmp dword [ebp - 0xb0], 2
jae 0x40344c
and byte [ebp - 0x26], 0
cmp byte [ebp - 0xab], 0x41
jl 0x403448
movsx ax, byte [ebp - 0xab]
sub eax, 0x40
mov word [ebp - 0x2c], ax
jmp 0x40344c
mov word [ebp - 0x2c], di
cmp dword [ebp - 0xbc], 0xa
jae 0x40345d
and word [ebp - 0xb2], 0
mov eax, dword [ebp - 0xb4]
movzx ecx, byte [ebp - 0xb8]
mov dword [0x7c6018], eax
xor eax, eax
mov ah, byte [ebp - 0xbc]
movzx eax, ax
or eax, ecx
xor ecx, ecx
mov ch, byte [ebp - 0x2c]
movzx ecx, cx
shl eax, 0x10
or eax, ecx
movzx ecx, byte [ebp - 0x26]
or eax, ecx
mov dword [0x7c601c], eax
cmp word [0x7c601e], 0x600
je 0x4034b0
push edi
call fcn.00406640
cmp eax, edi
je 0x4034b0
push 0xc00
call eax
mov esi, str.UXTHEME
push esi
call fcn.004065d2
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
cmp byte [esi], 0
jne 0x4034b5
push 0xb
call fcn.00406640
push 9
call fcn.00406640
push 7
mov dword [0x7c5f64], eax
call fcn.00406640
cmp eax, edi
je 0x4034f8
push 0x1e
call eax
test eax, eax
je 0x4034f8
or byte [0x7c601c], 0x80
push ebx
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push edi
call dword [sym.imp.ole32.dll_OleInitialize]
mov dword [0x7c6020], eax
push edi
lea eax, [ebp - 0x220]
push 0x160
push eax
push edi
push 0x7a8d28
call dword [sym.imp.SHELL32.dll_SHGetFileInfoA]
push str.NSIS_Error
push 0x7c1f60
call fcn.00406234
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov ebx, 0x7ef000
push eax
push ebx
call fcn.00406234
cmp byte [0x7ef000], 0x22
mov dword [0x7c5f60], 0x400000
mov eax, ebx
jne 0x403563
mov byte [ebp - 0xc], 0x22
mov eax, 0x7ef001
push dword [ebp - 0xc]
push eax
call fcn.00405bf1
push eax
call dword [sym.imp.USER32.dll_CharNextA]
mov dword [ebp - 0x14], eax
jmp 0x403637
cmp cl, 0x20
jne 0x403586
inc eax
cmp byte [eax], 0x20
je 0x403580
cmp byte [eax], 0x22
mov byte [ebp - 0xc], 0x20
jne 0x403594
inc eax
mov byte [ebp - 0xc], 0x22
cmp byte [eax], 0x2f
jne 0x403628
inc eax
cmp byte [eax], 0x53
jne 0x4035b9
mov cl, byte [eax + 1]
cmp cl, 0x20
je 0x4035af
test cl, cl
jne 0x4035b9
mov dword [0x7c6000], 1
movsx ecx, byte [0x40a183]
movsx edx, byte [0x40a182]
shl ecx, 8
or ecx, edx
movsx edx, byte [0x40a181]
shl ecx, 8
or ecx, edx
movsx edx, byte [str.NCRC]
shl ecx, 8
or ecx, edx
cmp dword [eax], ecx
jne 0x4035f8
mov cl, byte [eax + 4]
cmp cl, 0x20
je 0x4035f4
test cl, cl
jne 0x4035f8
or dword [ebp - 8], 4
movsx ecx, byte [0x40a17b]
movsx edx, byte [0x40a17a]
shl ecx, 8
or ecx, edx
movsx edx, byte [0x40a179]
shl ecx, 8
or ecx, edx
movsx edx, byte [0x40a178]
shl ecx, 8
or ecx, edx
cmp dword [eax - 2], ecx
je 0x403643
push dword [ebp - 0xc]
push eax
call fcn.00405bf1
cmp byte [eax], 0x22
jne 0x403637
inc eax
mov cl, byte [eax]
test cl, cl
jne 0x40357b
jmp 0x403655
and byte [eax - 2], 0
add eax, 2
push eax
push 0x7f1000
call fcn.00406234
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov esi, 0x7f9000
push esi
push 0x2000
call edi
call fcn.0040335f
test eax, eax
jne 0x4036c7
push 0x1ffb
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.Temp
push esi
call sub.KERNEL32.dll_lstrcatA
call fcn.0040335f
test eax, eax
jne 0x4036c7
push esi
push 0x1ffc
call edi
push 0x40a16c
push esi
call sub.KERNEL32.dll_lstrcatA
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push esi
push str.TEMP
call edi
push esi
push 0x40a160
call edi
call fcn.0040335f
test eax, eax
je 0x403772
push 0x7f7000
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 8]
call fcn.00402f0c
test eax, eax
mov dword [ebp - 4], eax
jne 0x403772
cmp dword [0x7c5f7c], eax
je 0x403763
push eax
push ebx
call fcn.00405bf1
mov edi, eax
cmp edi, ebx
jb 0x40372e
movsx eax, byte [0x40a15b]
movsx ecx, byte [0x40a15a]
shl eax, 8
or eax, ecx
movsx ecx, byte [0x40a159]
shl eax, 8
or eax, ecx
movsx ecx, byte [0x40a158]
shl eax, 8
or eax, ecx
cmp dword [edi], eax
je 0x40372e
dec edi
cmp edi, ebx
jae 0x403725
cmp edi, ebx
mov dword [ebp - 4], str.Error_launching_installer
jb 0x40379e
and byte [edi], 0
add edi, 4
push edi
call fcn.00405cb4
test eax, eax
je 0x403772
push edi
push 0x7f1000
call fcn.00406234
push edi
push 0x7f3000
call fcn.00406234
and dword [ebp - 4], 0
or dword [0x7c600c], 0xffffffff
call fcn.00403a1a
mov dword [ebp - 0x10], eax
call fcn.00403940
call dword [sym.imp.ole32.dll_OleUninitialize]
xor edi, edi
pop ebx
cmp dword [ebp - 4], edi
je 0x4038ac
push 0x200010
push dword [ebp - 4]
call fcn.0040594a
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.004058b5
push str.nsu
push esi
mov ebx, eax
call sub.KERNEL32.dll_lstrcatA
test ebx, ebx
je 0x4037bf
push 0x40a14c
push esi
call sub.KERNEL32.dll_lstrcatA
push str..tmp
push esi
call sub.KERNEL32.dll_lstrcatA
mov edi, 0x7f5000
push edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x403772
test ebx, ebx
push esi
je 0x4037e7
call fcn.0040581b
jmp 0x4037ec
call fcn.00405898
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp byte [0x7f1000], 0
jne 0x403807
push edi
push 0x7f1000
call fcn.00406234
push dword [ebp - 0x14]
push section..ndata
call fcn.00406234
movsx cx, byte [0x40a140]
xor eax, eax
mov dword [ebp - 8], 0x1a
mov ah, byte [0x40a141]
mov edi, 0x7a6d28
or eax, ecx
mov word [0x7c9000], ax
mov eax, dword [0x7c5f70]
push dword [eax + 0x120]
push edi
call fcn.004062c7
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor ebx, ebx
cmp dword [ebp - 4], ebx
je 0x403895
push 1
push edi
push 0x7fd000
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x403895
push ebx
push edi
call fcn.0040600d
mov eax, dword [0x7c5f70]
push dword [eax + 0x124]
push edi
call fcn.004062c7
push edi
call fcn.004058cd
cmp eax, ebx
je 0x403895
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], ebx
inc byte [0x7c9000]
dec dword [ebp - 8]
jne 0x403838
push ebx
push esi
call fcn.0040600d
jmp 0x403772
cmp dword [0x7c5ff4], edi
je 0x40392a
lea eax, [ebp - 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 0x4038fa
lea eax, [ebp - 0x20]
push eax
push str.SeShutdownPrivilege
push edi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
push edi
push edi
lea eax, [ebp - 0x24]
push edi
push eax
push edi
push dword [ebp - 0x14]
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x18], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 4
call fcn.00406640
cmp eax, edi
mov esi, 0x80040002
je 0x403916
push esi
push 0x25
push edi
push edi
push edi
call eax
test eax, eax
je 0x403923
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x40392a
push 9
call fcn.0040140b
mov eax, dword [0x7c600c]
cmp eax, 0xffffffff
je 0x403937
mov dword [ebp - 0x10], eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ExitProcess]