Function at 0x403960
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
mov dword [0x7b8540], eax
cmp ax, 6
je 0x4039b0
push ebx
call fcn.004064a2
cmp eax, ebx
je 0x4039b0
push 0xc00
call eax
mov esi, str.UXTHEME
push esi
call fcn.00406432
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
cmp byte [esi], bl
jne 0x4039b5
push 0xa
call fcn.004064a2
push 8
call fcn.004064a2
push 6
mov dword [0x7b8544], eax
call fcn.004064a2
cmp eax, ebx
je 0x4039fa
push 0x1e
call eax
test eax, eax
je 0x4039fa
or dword [0x7b8540], 0x40000000
push ebp
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
push ebx
push 0x2b4
mov dword [0x7b8658], eax
lea eax, [esp + 0x38]
push eax
push ebx
push 0x4085c0
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x7b7540
call fcn.00406338
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
mov ebp, 0x7c3000
push ebp
call fcn.00406338
push 0x22
pop esi
mov dword [0x7b854c], 0x400000
mov eax, ebp
cmp word [0x7c3000], si
jne 0x403a64
mov edi, esi
mov eax, 0x7c3002
push edi
push eax
call fcn.00405e7a
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [esp + 0x18], eax
jmp 0x403afe
push 0x20
pop edi
cmp cx, di
jne 0x403a8a
inc eax
inc eax
cmp word [eax], di
je 0x403a83
mov edx, edi
cmp word [eax], si
jne 0x403a95
inc eax
inc eax
mov edx, esi
cmp word [eax], 0x2f
jne 0x403af0
inc eax
inc eax
cmp word [eax], 0x53
jne 0x403abb
movzx ecx, word [eax + 2]
cmp cx, di
je 0x403ab1
cmp cx, bx
jne 0x403abb
mov dword [0x7b8640], 1
cmp dword [eax], 0x43004e
jne 0x403adf
cmp dword [eax + 4], 0x430052
jne 0x403adf
movzx ecx, word [eax + 8]
cmp cx, di
je 0x403ada
cmp cx, bx
jne 0x403adf
or dword [esp + 0x1c], 4
cmp dword [eax - 4], 0x2f0020
jne 0x403af0
cmp dword [eax], 0x3d0044
je 0x403b0c
push edx
push eax
call fcn.00405e7a
cmp word [eax], si
jne 0x403afe
inc eax
inc eax
movzx ecx, word [eax]
cmp cx, bx
jne 0x403a7b
jmp 0x403b20
xor ecx, ecx
mov word [eax - 4], cx
add eax, 4
push eax
push 0x7c3800
call fcn.00406338
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, 0x7c5800
push esi
push 0x400
call edi
call fcn.00403905
test eax, eax
jne 0x403b92
push 0x3fb
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push esi
call sub.KERNEL32.dll_lstrcatW
call fcn.00403905
test eax, eax
jne 0x403b92
push esi
push 0x3fc
call edi
push 0x408594
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 0x408580
call edi
call fcn.00403905
test eax, eax
je 0x403c25
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x7c5000
call ebx
push dword [esp + 0x1c]
call fcn.004034f8
mov dword [esp + 0x10], eax
test eax, eax
jne 0x403c23
cmp dword [0x7b85b8], eax
je 0x403c13
push eax
push ebp
call fcn.00405e7a
mov edi, eax
jmp 0x403bd6
cmp dword [edi], 0x5f0020
jne 0x403bd4
cmp dword [edi + 4], 0x3d003f
je 0x403bda
dec edi
dec edi
cmp edi, ebp
jae 0x403bc3
mov dword [esp + 0x10], str.Error_launching_installer
cmp edi, ebp
jb 0x403c51
xor eax, eax
mov word [edi], ax
add edi, 8
push edi
call fcn.00406696
test eax, eax
je 0x403c23
push edi
push 0x7c3800
call fcn.00406338
push edi
push 0x7c4000
call fcn.00406338
and dword [esp + 0x10], 0
or dword [0x7b864c], 0xffffffff
call fcn.00405a1f
mov dword [esp + 0x14], eax
xor ebx, ebx
call fcn.00403936
call dword [sym.imp.ole32.dll_OleUninitialize]
pop ebp
cmp dword [esp + 0xc], ebx
je 0x403d4d
push 0x200010
push dword [esp + 0x10]
call fcn.00405e14
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.00406593
push 0x408574
push esi
mov edi, eax
call sub.KERNEL32.dll_lstrcatW
test edi, edi
je 0x403c72
push 0x408570
push esi
call sub.KERNEL32.dll_lstrcatW
push str..tmp
push esi
call sub.KERNEL32.dll_lstrcatW
mov ebp, 0x7c4800
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x403c23
push esi
test edi, edi
je 0x403c9a
call fcn.00405cf8
jmp 0x403c9f
call fcn.00405d7a
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp word [0x7c3800], 0
jne 0x403cbb
push ebp
push 0x7c3800
call fcn.00406338
push dword [esp + 0x18]
push section..ndata
call fcn.00406338
push 0x1a
mov dword [0x7b9800], 0x41
pop ebp
mov edi, 0x7af208
mov eax, dword [0x7b8550]
push dword [eax + 0x120]
push edi
call fcn.0040671e
push edi
call ebx
cmp dword [esp + 0x10], 0
je 0x403d37
push 1
push edi
push 0x7c6800
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x403d37
push 0
push edi
call fcn.00406b0d
mov eax, dword [0x7b8550]
push dword [eax + 0x124]
push edi
call fcn.0040671e
push edi
call fcn.00405d97
test eax, eax
je 0x403d37
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esp + 0x10], 0
inc word [0x7b9800]
dec ebp
jne 0x403cdb
push ebp
push esi
call fcn.00406b0d
jmp 0x403c23
cmp dword [0x7b8634], ebx
je 0x403dd1
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 0x403da1
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]
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.004064a2
mov esi, 0x80040002
cmp eax, ebx
je 0x403dbd
push esi
push 0x25
push ebx
push ebx
push ebx
call eax
test eax, eax
je 0x403dca
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x403dd1
push 9
call fcn.0040141a
mov eax, dword [0x7b864c]
cmp eax, 0xffffffff
je 0x403ddf
mov dword [esp + 0x10], eax
push dword [esp + 0x10]
jmp 0x403c4b