Function at 0x403a9f
Capabilities:
Accept command line arguments
Copy file
Delete file
Get common file path
Get file attributes
Get file system object information
Set current directory
Set environment variable
Shutdown system
Terminate process

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x3ec
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
xor esi, esi
lea edi, [esp + 0x1c]
mov dword [edi + 0x14], esi
mov dword [edi + 0x118], esi
mov dword [edi + 0x114], esi
mov dword [edi], 0x11c
push edi
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x403b0a
mov dword [esp + 0x1c], 0x114
push edi
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov byte [esp + 0x136], 4
movzx eax, word [esp + 0x4a]
add eax, 0xffffffd0
cmp word [esp + 0x30], 0x53
cmove esi, eax
mov word [esp + 0x130], si
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
cmp eax, 9
ja 0x403b1e
movzx ecx, cx
mov dword [esp + 0x28], ecx
mov edi, dword [0x40a3b4]
mov dword [edi + 0x38], ecx
movzx edx, byte [esp + 0x136]
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x130]
shl esi, 8
movzx esi, si
or esi, edx
shl eax, 0x18
movzx ecx, cl
shl ecx, 0x10
or ecx, eax
or esi, ecx
mov dword [edi + 0x3c], esi
cmp ecx, 0x6000000
je 0x403b6c
push 0
call fcn.0040679c
test eax, eax
je 0x403b6c
push 0xc00
call eax
mov esi, str.UXTHEME
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
call fcn.00407816
push esi
call edi
add esi, eax
inc esi
cmp byte [esi], 0
jne 0x403b77
push 0xc
call fcn.0040679c
push 0xa
call fcn.0040679c
mov dword [0x4375bc], eax
push 8
call fcn.0040679c
test eax, eax
je 0x403bb7
push 0x1e
call eax
test eax, eax
je 0x403bb7
mov eax, dword [0x40a3b4]
or byte [eax + 0x3c], 0x80
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
xor ebx, ebx
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
mov ecx, dword [0x40a55c]
mov dword [ecx], eax
lea eax, [esp + 0x138]
push ebx
push 0x2b4
push eax
push ebx
push 0x40a4a8
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x4375c0
call fcn.00406c2f
mov eax, dword [0x40a174]
mov esi, dword [eax]
lea edi, [esi + 0xa000]
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
push edi
call fcn.00406c2f
mov dword [esp + 4], 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x4385c0], eax
xor eax, eax
cmp word [esi + 0xa000], 0x22
mov dword [esp + 8], esi
lea ecx, [esi + 0xa002]
sete al
mov dword [esp + 0xc], edi
cmovne ecx, edi
lea eax, [eax + eax + 0x20]
push eax
push ecx
call fcn.00406d08
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [esp], eax
movzx edx, word [eax]
test dx, dx
je 0x403d3e
mov dword [esp + 4], 0
mov edi, 0x2f0020
mov eax, dword [esp]
mov ebp, 0x43004e
add eax, 2
cmp dx, 0x20
jne 0x403c87
movzx edx, word [eax]
jmp 0x403c79
movzx ecx, dx
cmp ecx, 0x22
jne 0x403c98
movzx edx, word [eax]
mov cx, 0x22
jmp 0x403c9f
add eax, 0xfffffffe
mov cx, 0x20
cmp dx, 0x2f
jne 0x403d00
lea edx, [eax + 2]
cmp word [eax + 2], 0x53
jne 0x403cc8
movzx esi, word [eax + 4]
test esi, 0xffdf
jne 0x403cc8
mov esi, dword [0x40a3b4]
mov dword [esi + 0x20], 1
mov esi, dword [edx + 4]
mov ebx, 0x430052
xor esi, ebx
mov ebx, dword [edx]
xor ebx, ebp
or ebx, esi
jne 0x403ceb
movzx esi, word [eax + 0xa]
test esi, 0xffdf
jne 0x403ceb
or dword [esp + 4], 4
mov esi, dword [eax + 2]
mov ebx, 0x3d0044
xor esi, ebx
mov ebx, dword [eax - 2]
xor ebx, edi
or ebx, esi
je 0x403d24
mov eax, edx
movzx ecx, cx
push ecx
push eax
call fcn.00406d08
xor ecx, ecx
cmp word [eax], 0x22
sete cl
lea eax, [eax + ecx*2]
movzx edx, word [eax]
test dx, dx
jne 0x403c79
jmp 0x403d3e
mov word [eax - 2], 0
mov ecx, dword [esp + 8]
add ecx, 0xa800
add eax, 6
push eax
push ecx
call fcn.00406c2f
mov edi, dword [esp + 8]
lea ebx, [edi + 0xc800]
push ebx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
call fcn.00403a60
test eax, eax
jne 0x403dc1
push 0x3fb
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push ebx
call sub.KERNEL32.dll_lstrcatW
call fcn.00403a60
test eax, eax
jne 0x403dc1
push ebx
push 0x3fc
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0x40a4cc
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 0x40a4de
call esi
call fcn.00403a60
test eax, eax
jne 0x403dc1
xor ebx, ebx
mov dword [esp], 0x40a3d0
jmp 0x404010
mov dword [esp + 0x10], ebx
lea eax, [edi + 0xc000]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 4]
call fcn.004034d8
xor ebx, ebx
test eax, eax
jne 0x403e0a
mov eax, dword [0x40a560]
cmp dword [eax], 0
jne 0x403e12
mov eax, dword [0x40a3b4]
mov dword [eax + 0x2c], 0xffffffff
mov dword [esp], 0
call fcn.004041f8
mov ebx, eax
jmp 0x404010
mov dword [esp], eax
jmp 0x404010
push 0
mov esi, dword [esp + 0x10]
push esi
call fcn.00406d08
cmp eax, esi
mov ebp, dword [esp + 0x10]
jb 0x403e4c
mov edi, eax
mov eax, 0x3d003f
mov ecx, 0x5f0020
mov edx, dword [edi + 4]
xor edx, eax
mov esi, dword [edi]
xor esi, ecx
or esi, edx
je 0x403fbf
add edi, 0xfffffffe
cmp edi, dword [esp + 0xc]
jae 0x403e32
call fcn.00406782
mov dword [esp + 0xc], eax
push ebp
call sub.KERNEL32.dll_lstrlenW
mov ebx, eax
push dword [esp]
mov esi, dword [esp + 0xc]
push esi
call fcn.00406c2f
cmp word [esi + 0xa800], 0
jne 0x403e87
lea eax, [esi + 0xa800]
lea ecx, [esi + 0xb800]
push ecx
push eax
call fcn.00406c2f
lea edi, [esi + 0x2800]
lea eax, [esi + 0x3000]
mov dword [esp + 0x14], eax
lea eax, [ebx*2]
add eax, ebp
add esi, 0xd800
mov dword [esp + 8], esi
mov esi, eax
xor eax, eax
inc eax
mov dword [esp + 4], eax
mov bl, 1
push dword [esp + 4]
push str.nsu_X.tmp
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
mov eax, dword [0x40a004]
mov eax, dword [eax]
push dword [eax + 0x120]
push edi
call fcn.004072ff
cmp dword [esp + 0xc], 0
je 0x403eee
mov ebp, dword [esp + 0x10]
push ebp
call fcn.00406710
jmp 0x403ef8
mov ebp, dword [esp + 0x10]
push ebp
call fcn.00406764
test eax, eax
je 0x403f33
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
bt eax, 0xa
jb 0x403fa2
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x403fa2
push 1
push dword [esp + 0x14]
call fcn.00406963
test bl, 1
mov ebx, 0
jne 0x403eb5
jmp 0x403fa2
push ebp
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0
push ebp
call fcn.00406c82
push 1
push edi
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x403fb6
mov dword [esp], str.Error_launching_installer
mov ebp, esi
push 0
push edi
call fcn.00406c82
mov eax, dword [0x40a004]
mov eax, dword [eax]
push dword [eax + 0x124]
mov esi, dword [esp + 0x18]
push esi
call fcn.004072ff
push esi
call fcn.004067d5
test eax, eax
jne 0x404000
test bl, 1
je 0x40400e
push edi
call fcn.00406cb1
xor ebx, ebx
test eax, eax
mov esi, ebp
je 0x403eb5
jmp 0x404010
mov eax, dword [esp + 4]
inc eax
mov dword [esp + 4], eax
cmp eax, 0x10000
jne 0x403eb3
mov dword [esp], str.Error_launching_installer
jmp 0x40400e
mov word [edi], 0
add edi, 8
push edi
call fcn.00406b94
mov dword [esp], str.Error_launching_installer
mov ebx, 0
test eax, eax
je 0x404010
mov esi, dword [esp + 8]
lea eax, [esi + 0xa800]
push edi
push eax
call fcn.00406c2f
add esi, 0xb000
push edi
push esi
call fcn.00406c2f
jmp 0x403deb
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp], 0
xor ebx, ebx
call fcn.004040ee
call dword [sym.imp.ole32.dll_OleUninitialize]
mov eax, dword [esp]
test eax, eax
jne 0x4040db
mov eax, dword [0x40a3b4]
cmp dword [eax + 0x14], 0
je 0x4040c6
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [esp + 0x18]
push ecx
push 0x28
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x404087
lea edi, [esp + 0x13c]
xor esi, esi
push edi
push str.SeShutdownPrivilege
push esi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov dword [edi - 4], 1
mov dword [edi + 8], 2
push esi
push esi
push esi
lea eax, [esp + 0x144]
push eax
push esi
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 4
call fcn.0040679c
test eax, eax
je 0x4040ae
sub esp, 0x14
movaps xmm0, xmmword [0x40a3c0]
movups xmmword [esp], xmm0
mov dword [esp + 0x10], 0x80040002
call eax
test eax, eax
je 0x4040bf
push 0x80040002
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x4040c6
push 9
call fcn.0040318e
mov eax, dword [0x40a3b4]
mov eax, dword [eax + 0x2c]
cmp eax, 0xffffffff
cmovne ebx, eax
push ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0x200010
push eax
call fcn.00406878
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]