Function at 0x4039c8
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, 0x2cc
and dword [esp], 0
push ebx
push ebp
push esi
push edi
push 0x20
pop ebx
push 0x8001
mov edi, str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
call dword [sym.imp.KERNEL32.dll_GetVersion]
push 6
and eax, 0xbfffffff
pop ecx
mov dword [0x46b510], eax
cmp ax, cx
je 0x403a14
push ebp
call fcn.00406e29
test eax, eax
je 0x403a14
push 0xc00
call eax
mov esi, str.UXTHEME
push esi
call fcn.0040641a
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc esi
add esi, eax
cmp byte [esi], 0
jne 0x403a19
push 0xa
call fcn.00406e29
push 8
call fcn.00406e29
push 6
mov dword [0x46b514], eax
call fcn.00406e29
test eax, eax
je 0x403a5e
push 0x1e
call eax
test eax, eax
je 0x403a5e
or dword [0x46b510], 0x40000000
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
xor esi, esi
push esi
call dword [sym.imp.ole32.dll_OleInitialize]
push esi
push 0x2b4
mov dword [0x473580], eax
lea eax, [esp + 0x30]
push eax
push esi
push 0x40a2c0
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x46b520
call fcn.00407067
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
mov esi, 0x4c4000
push esi
call fcn.00407067
push 0x22
mov eax, esi
mov dword [0x46b518], 0x400000
pop esi
cmp word [0x4c4000], si
jne 0x403ac9
mov ebx, esi
mov eax, 0x4c4002
push ebx
push eax
call fcn.00406a17
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [esp + 0x14], eax
movzx ecx, word [eax]
test cx, cx
je 0x403b8e
push 0x20
pop ebx
cmp cx, bx
jne 0x403af7
add eax, 2
cmp word [eax], bx
je 0x403aef
mov edx, ebx
cmp word [eax], si
jne 0x403b03
add eax, 2
mov edx, esi
cmp word [eax], 0x2f
jne 0x403b5d
add eax, 2
cmp word [eax], 0x53
jne 0x403b2a
movzx ecx, word [eax + 2]
cmp cx, bx
je 0x403b20
test cx, cx
jne 0x403b2a
mov dword [0x473600], 1
cmp dword [eax], 0x43004e
jne 0x403b4c
cmp dword [eax + 4], 0x430052
jne 0x403b4c
movzx ecx, word [eax + 8]
cmp cx, bx
je 0x403b49
test cx, cx
jne 0x403b4c
or ebp, 4
cmp dword [eax - 4], 0x2f0020
jne 0x403b5d
cmp dword [eax], 0x3d0044
je 0x403b7a
push edx
push eax
call fcn.00406a17
cmp word [eax], si
jne 0x403b6c
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x403aea
jmp 0x403b8e
xor ecx, ecx
mov word [eax - 4], cx
add eax, 4
push eax
push 0x4c8000
call fcn.00407067
mov esi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ebx, 0x4d8000
push ebx
push 0x2000
call esi
call fcn.00403e7b
test eax, eax
jne 0x403c00
push 0x1ffb
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push ebx
call sub.KERNEL32.dll_lstrcatW
call fcn.00403e7b
test eax, eax
jne 0x403c00
push ebx
push 0x1ffc
call esi
push 0x40a2e8
push ebx
call sub.KERNEL32.dll_lstrcatW
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push ebx
push str.TEMP
call esi
push ebx
push 0x40a2fc
call esi
call fcn.00403e7b
test eax, eax
je 0x403db0
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x4d4000
call ebx
push ebp
call fcn.004036b2
mov edi, eax
test edi, edi
jne 0x403db0
cmp dword [0x473524], eax
je 0x403c84
push eax
mov ebp, 0x4c4000
push ebp
call fcn.00406a17
mov esi, eax
jmp 0x403c49
cmp dword [esi], 0x5f0020
jne 0x403c46
cmp dword [esi + 4], 0x3d003f
je 0x403c4d
sub esi, 2
cmp esi, ebp
jae 0x403c35
mov edi, str.Error_launching_installer
cmp esi, ebp
jb 0x403c9e
xor eax, eax
mov word [esi], ax
add esi, 8
push esi
call fcn.00406a4f
test eax, eax
je 0x403db0
push esi
push 0x4c8000
call fcn.00407067
push esi
push 0x4cc000
call fcn.00407067
xor edi, edi
or dword [0x47360c], 0xffffffff
call fcn.00405c4b
push 1
mov ebx, eax
call fcn.00406aff
jmp 0x403db4
call fcn.0040677e
push str.nsu
mov ebp, 0x4d8000
mov esi, eax
push ebp
call sub.KERNEL32.dll_lstrcatW
test esi, esi
je 0x403cc4
push 0x40a310
push ebp
call sub.KERNEL32.dll_lstrcatW
push 0x40a314
push ebp
call sub.KERNEL32.dll_lstrcatW
push 0x4d0000
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x403db0
push ebp
test esi, esi
je 0x403cef
call fcn.00406076
jmp 0x403cf4
call fcn.00406056
push ebp
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp word [0x4c8000], 0
jne 0x403d14
push 0x4d0000
push 0x4c8000
call fcn.00407067
push dword [esp + 0x14]
push section..ndata
call fcn.00407067
push 0x1a
mov dword [0x478000], 0x41
pop esi
mov eax, dword [0x473530]
push dword [eax + 0x120]
push 0x4341c0
call fcn.004060f4
push 0x4341c0
call ebx
test edi, edi
je 0x403d9d
push 1
push 0x4341c0
push 0x4e0000
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x403d9d
push 0
push 0x4341c0
call fcn.004064bb
mov eax, dword [0x473530]
push dword [eax + 0x124]
push 0x4341c0
call fcn.004060f4
push 0x4341c0
call fcn.00406bbb
test eax, eax
je 0x403d9d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
inc word [0x478000]
sub esi, 1
jne 0x403d2f
push esi
push ebp
call fcn.004064bb
mov ebx, dword [esp + 0x10]
call fcn.0040399e
call dword [sym.imp.ole32.dll_OleUninitialize]
test edi, edi
je 0x403dd6
push 0x200010
push edi
call fcn.00406ff5
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp dword [0x4735f4], 0
je 0x403e67
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 0x403e34
lea eax, [esp + 0x1c]
push eax
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
push 0
push 0
push 0
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 1
push eax
push 0
push dword [esp + 0x28]
mov dword [esp + 0x3c], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 4
call fcn.00406e29
mov esi, 0x80040002
test eax, eax
je 0x403e53
push esi
push 0x25
push 0
push 0
push 0
call eax
test eax, eax
je 0x403e60
push esi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x403e67
push 9
call fcn.004014e3
cmp dword [0x47360c], 0xffffffff
cmovne ebx, dword [0x47360c]
push ebx
jmp 0x403dd0