Function at 0x403359
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 ebx
push esi
push edi
push 0x20
pop edi
xor ebx, ebx
push 0x8001
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
call dword [sym.imp.KERNEL32.dll_GetVersion]
and eax, 0xbfffffff
cmp ax, 6
mov dword [0x47020c], eax
je 0x4033a9
push ebx
call fcn.0040665e
cmp eax, ebx
je 0x4033a9
push 0xc00
call eax
mov esi, str.UXTHEME
push esi
call fcn.004065ee
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
cmp byte [esi], 0
jne 0x4033ae
push 0xa
call fcn.0040665e
push 8
call fcn.0040665e
push 6
mov dword [0x470204], eax
call fcn.0040665e
cmp eax, ebx
je 0x4033f1
push 0x1e
call eax
test eax, eax
je 0x4033f1
or byte [0x47020f], 0x40
push ebp
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
mov dword [0x4702d8], eax
push ebx
lea eax, [esp + 0x34]
push 0x2b4
push eax
push ebx
push 0x4366a8
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x468200
call fcn.00406284
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov ebp, 0x4c1000
push eax
push ebp
call fcn.00406284
cmp word [0x4c1000], 0x22
mov dword [0x470200], 0x400000
mov eax, ebp
jne 0x40345a
push 0x22
mov eax, 0x4c1002
pop edi
push edi
push eax
call fcn.00405b86
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov ecx, eax
mov dword [esp + 0x18], ecx
mov ax, word [ecx]
cmp ax, bx
je 0x40358b
push 0x20
pop ebx
cmp ax, bx
jne 0x403489
inc ecx
inc ecx
cmp word [ecx], bx
je 0x403482
cmp word [ecx], 0x22
jne 0x403494
inc ecx
push 0x22
inc ecx
pop ebx
cmp word [ecx], 0x2f
jne 0x403557
inc ecx
inc ecx
cmp word [ecx], 0x53
jne 0x4034bf
mov ax, word [ecx + 2]
cmp ax, 0x20
je 0x4034b5
test ax, ax
jne 0x4034bf
mov dword [0x4702c0], 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 0x403515
mov eax, dword [ecx + 4]
cmp eax, edi
jne 0x403515
mov ax, word [ecx + 8]
cmp ax, 0x20
je 0x403510
test ax, ax
jne 0x403515
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 0x403557
mov eax, dword [ecx]
cmp eax, edi
je 0x403576
push ebx
push ecx
call fcn.00405b86
mov ecx, eax
cmp word [ecx], 0x22
jne 0x403568
inc ecx
inc ecx
mov ax, word [ecx]
test ax, ax
jne 0x40347a
jmp 0x403589
and word [ecx - 4], 0
add ecx, 4
push ecx
push 0x4c5000
call fcn.00406284
xor ebx, ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov edi, 0x4d5000
push edi
push 0x2000
call esi
call fcn.00403328
test eax, eax
jne 0x4035fd
push 0x1ffb
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push edi
call sub.KERNEL32.dll_lstrcatW
call fcn.00403328
test eax, eax
jne 0x4035fd
push edi
push 0x1ffc
call esi
push 0x40a29c
push edi
call sub.KERNEL32.dll_lstrcatW
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push edi
push str.TEMP
call esi
push edi
push 0x40a288
call esi
call fcn.00403328
test eax, eax
je 0x4036c8
push 0x4d1000
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 0x1c]
call fcn.00402edd
cmp eax, ebx
mov dword [esp + 0x10], eax
jne 0x4036c8
cmp dword [0x470220], ebx
je 0x4036b8
push ebx
push ebp
call fcn.00405b86
mov esi, eax
cmp esi, ebp
jb 0x403682
movzx eax, word [0x40a282]
cdq
shld edx, eax, 0x10
shl eax, 0x10
mov ebx, eax
movzx eax, word [0x40a280]
movzx ecx, word [0x40a27c]
cdq
or ebx, eax
movzx eax, word [0x40a27e]
shl eax, 0x10
or eax, ecx
xor ecx, ecx
cdq
or ecx, eax
mov eax, ebx
or eax, edx
mov edx, dword [esi]
cmp edx, ecx
jne 0x40367a
mov edx, dword [esi + 4]
cmp edx, eax
je 0x403680
dec esi
dec esi
cmp esi, ebp
jae 0x40366d
xor ebx, ebx
cmp esi, ebp
mov dword [esp + 0x10], str.Error_launching_installer
jb 0x4036f4
mov word [esi], bx
add esi, 8
push esi
call fcn.00405c61
test eax, eax
je 0x4036c8
push esi
push 0x4c5000
call fcn.00406284
push esi
push 0x4c9000
call fcn.00406284
mov dword [esp + 0x10], ebx
or dword [0x4702cc], 0xffffffff
call fcn.00403974
mov dword [esp + 0x14], eax
call fcn.0040389a
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [esp + 0x10], ebx
pop ebp
je 0x4037fe
push 0x200010
push dword [esp + 0x10]
call fcn.004058ea
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.00405855
push 0x40a270
push edi
mov esi, eax
call sub.KERNEL32.dll_lstrcatW
cmp esi, ebx
je 0x403715
push 0x40a26c
push edi
call sub.KERNEL32.dll_lstrcatW
push str..tmp
push edi
call sub.KERNEL32.dll_lstrcatW
mov ebp, 0x4cd000
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4036c8
cmp esi, ebx
push edi
je 0x40373d
call fcn.004057bb
jmp 0x403742
call fcn.00405838
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp word [0x4c5000], bx
jne 0x40375d
push ebp
push 0x4c5000
call fcn.00406284
push dword [esp + 0x18]
push section..ndata
call fcn.00406284
movzx eax, word [0x40a25a]
movzx ecx, word [0x40a258]
shl eax, 0x10
or eax, ecx
push 0x1a
mov dword [0x475000], eax
pop ebp
mov esi, 0x4326a8
mov eax, dword [0x470214]
push dword [eax + 0x120]
push esi
call fcn.004062a6
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esp + 0x10], ebx
je 0x4037e8
push 1
push esi
push 0x4dd000
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x4037e8
push ebx
push esi
call fcn.0040604a
mov eax, dword [0x470214]
push dword [eax + 0x124]
push esi
call fcn.004062a6
push esi
call fcn.0040586d
cmp eax, ebx
je 0x4037e8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x10], ebx
inc word [0x475000]
dec ebp
jne 0x40378b
push ebx
push edi
call fcn.0040604a
jmp 0x4036c8
cmp dword [0x4702b4], ebx
je 0x403882
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 0x403852
lea eax, [esp + 0x20]
push eax
push str.SeShutdownPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
push ebx
push ebx
lea eax, [esp + 0x24]
push ebx
push eax
push ebx
push dword [esp + 0x28]
mov dword [esp + 0x34], 1
mov dword [esp + 0x40], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 4
call fcn.0040665e
cmp eax, ebx
mov esi, 0x80040002
je 0x40386e
push esi
push 0x25
push ebx
push ebx
push ebx
call eax
test eax, eax
je 0x40387b
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x403882
push 9
call fcn.0040140b
mov eax, dword [0x4702cc]
cmp eax, 0xffffffff
je 0x403890
mov dword [esp + 0x10], eax
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_ExitProcess]