Function at 0x403991
Capabilities:
Accept command line arguments
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]
mov esi, str.UXTHEME
push esi
call fcn.0040653b
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
cmp byte [esi], bl
jne 0x4039c5
push ebp
push 9
call fcn.004065ab
push 7
call fcn.004065ab
mov dword [0x4725d0], eax
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
push ebx
push 0x2b4
mov dword [0x4726b8], eax
lea eax, [esp + 0x38]
push eax
push ebx
push 0x409330
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x46a5c0
call fcn.00406297
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
mov ebp, 0x4c30a0
push ebp
call fcn.00406297
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x22
pop esi
cmp word [0x4c30a0], si
mov dword [0x4725d8], eax
mov eax, ebp
jne 0x403a59
mov edi, esi
mov eax, 0x4c30a2
push edi
push eax
call fcn.00405eb9
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [esp + 0x18], eax
jmp 0x403af3
push 0x20
pop edi
cmp cx, di
jne 0x403a7f
inc eax
inc eax
cmp word [eax], di
je 0x403a78
cmp word [eax], si
mov edx, edi
jne 0x403a8a
inc eax
inc eax
mov edx, esi
cmp word [eax], 0x2f
jne 0x403ae5
inc eax
inc eax
cmp word [eax], 0x53
jne 0x403ab0
movzx ecx, word [eax + 2]
cmp cx, di
je 0x403aa6
cmp cx, bx
jne 0x403ab0
mov dword [0x4726a0], 1
cmp dword [eax], 0x43004e
jne 0x403ad4
cmp dword [eax + 4], 0x430052
jne 0x403ad4
movzx ecx, word [eax + 8]
cmp cx, di
je 0x403acf
cmp cx, bx
jne 0x403ad4
or dword [esp + 0x1c], 4
cmp dword [eax - 4], 0x2f0020
jne 0x403ae5
cmp dword [eax], 0x3d0044
je 0x403b01
push edx
push eax
call fcn.00405eb9
cmp word [eax], si
jne 0x403af3
inc eax
inc eax
movzx ecx, word [eax]
cmp cx, bx
jne 0x403a70
jmp 0x403b13
mov word [eax - 4], bx
add eax, 4
push eax
push 0x4c70a8
call fcn.00406297
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, 0x4d70c8
push esi
push 0x2004
call edi
call fcn.0040391e
test eax, eax
jne 0x403b85
push 0x1fff
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push esi
call sub.KERNEL32.dll_lstrcatW
call fcn.0040391e
test eax, eax
jne 0x403b85
push esi
push 0x2000
call edi
push 0x409304
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 0x4092f0
call edi
call fcn.0040391e
test eax, eax
je 0x403c18
push 0x4d30c0
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 0x1c]
call fcn.00403683
cmp eax, ebx
mov dword [esp + 0x10], eax
jne 0x403c18
cmp dword [0x472624], ebx
je 0x403c01
push ebx
push ebp
call fcn.00405eb9
mov edi, eax
jmp 0x403bc7
cmp dword [edi], 0x5f0020
jne 0x403bc5
cmp dword [edi + 4], 0x3d003f
je 0x403bcb
dec edi
dec edi
cmp edi, ebp
jae 0x403bb4
cmp edi, ebp
mov dword [esp + 0x10], str.Error_launching_installer
jb 0x403c44
mov word [edi], bx
add edi, 8
push edi
call fcn.00406715
test eax, eax
je 0x403c18
push edi
push 0x4c70a8
call fcn.00406297
push edi
push 0x4cb0b0
call fcn.00406297
mov dword [esp + 0x10], ebx
or dword [0x4726ac], 0xffffffff
call fcn.00405a5c
push 1
mov dword [esp + 0x18], eax
call fcn.00406368
call fcn.0040394f
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [esp + 0x10], ebx
pop ebp
je 0x403d40
push 0x200010
push dword [esp + 0x10]
call fcn.00405e55
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.0040665a
push 0x4092e4
push esi
mov edi, eax
call sub.KERNEL32.dll_lstrcatW
cmp edi, ebx
je 0x403c65
push 0x4092e0
push esi
call sub.KERNEL32.dll_lstrcatW
push str..tmp
push esi
call sub.KERNEL32.dll_lstrcatW
mov ebp, 0x4cf0b8
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x403c18
cmp edi, ebx
push esi
je 0x403c8d
call fcn.00405d52
jmp 0x403c92
call fcn.00405dd3
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp word [0x4c70a8], bx
jne 0x403cad
push ebp
push 0x4c70a8
call fcn.00406297
push dword [esp + 0x18]
push section..ndata
call fcn.00406297
push 0x1a
mov dword [0x477008], 0x41
pop ebp
mov edi, 0x4331f8
mov eax, dword [0x4725dc]
push dword [eax + 0x120]
push edi
call fcn.0040679d
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esp + 0x10], ebx
je 0x403d2a
push 1
push edi
push 0x4df0d8
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x403d2a
push ebx
push edi
call fcn.00406b93
mov eax, dword [0x4725dc]
push dword [eax + 0x124]
push edi
call fcn.0040679d
push edi
call fcn.00405df0
cmp eax, ebx
je 0x403d2a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x10], ebx
inc word [0x477008]
dec ebp
jne 0x403ccd
push ebx
push esi
call fcn.00406b93
jmp 0x403c18
cmp dword [0x472694], ebx
je 0x403dc4
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 0x403d94
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.004065ab
cmp eax, ebx
mov esi, 0x80040002
je 0x403db0
push esi
push 0x25
push ebx
push ebx
push ebx
call eax
test eax, eax
je 0x403dbd
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x403dc4
push 9
call fcn.00401414
mov eax, dword [0x4726ac]
cmp eax, 0xffffffff
je 0x403dd2
mov dword [esp + 0x10], eax
push dword [esp + 0x10]
jmp 0x403c3e