Function at 0x403c17
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 0x403c82
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 0x403c96
movzx ecx, cx
mov dword [esp + 0x28], ecx
mov edi, dword [0x40a474]
mov dword [edi + 0x38], ecx
movzx edx, byte [esp + 0x136]
mov ecx, dword [esp + 0x130]
shl ecx, 8
mov esi, 0xffff
and ecx, esi
or ecx, edx
movzx edx, byte [esp + 0x24]
shl eax, 8
and eax, esi
or eax, edx
mov edx, eax
shl edx, 0x10
or edx, ecx
mov dword [edi + 0x3c], edx
cmp eax, 0x600
je 0x403ce9
push 0
call fcn.0040692c
test eax, eax
je 0x403ce9
push 0xc00
call eax
mov esi, str.UXTHEME
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
call fcn.004079aa
push esi
call edi
add esi, eax
inc esi
cmp byte [esi], 0
jne 0x403cf4
push 0xc
call fcn.0040692c
push 0xa
call fcn.0040692c
mov dword [0x42da90], eax
push 8
call fcn.0040692c
test eax, eax
je 0x403d34
push 0x1e
call eax
test eax, eax
je 0x403d34
mov eax, dword [0x40a474]
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 [0x40a620]
mov dword [ecx], eax
lea eax, [esp + 0x138]
push ebx
push 0x2b4
push eax
push ebx
push 0x40a568
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x42da94
call fcn.00406dbf
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.00406dbf
mov dword [esp + 4], 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x42ea94], 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.00406e98
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [esp], eax
movzx edx, word [eax]
test dx, dx
je 0x403ebb
mov dword [esp + 4], 0
mov edi, 0x2f0020
mov eax, dword [esp]
mov ebp, 0x43004e
add eax, 2
cmp dx, 0x20
jne 0x403e04
movzx edx, word [eax]
jmp 0x403df6
movzx ecx, dx
cmp ecx, 0x22
jne 0x403e15
movzx edx, word [eax]
mov cx, 0x22
jmp 0x403e1c
add eax, 0xfffffffe
mov cx, 0x20
cmp dx, 0x2f
jne 0x403e7d
cmp word [eax + 2], 0x53
jne 0x403e42
movzx edx, word [eax + 4]
test edx, 0xffdf
jne 0x403e42
mov edx, dword [0x40a474]
mov dword [edx + 0x20], 1
lea edx, [eax + 2]
mov esi, dword [edx + 4]
mov ebx, 0x430052
xor esi, ebx
mov ebx, dword [edx]
xor ebx, ebp
or ebx, esi
jne 0x403e68
movzx esi, word [eax + 0xa]
test esi, 0xffdf
jne 0x403e68
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 0x403ea1
mov eax, edx
movzx ecx, cx
push ecx
push eax
call fcn.00406e98
xor ecx, ecx
cmp word [eax], 0x22
sete cl
lea eax, [eax + ecx*2]
movzx edx, word [eax]
test dx, dx
jne 0x403df6
jmp 0x403ebb
mov word [eax - 2], 0
mov ecx, dword [esp + 8]
add ecx, 0xa800
add eax, 6
push eax
push ecx
call fcn.00406dbf
mov edi, dword [esp + 8]
lea ebx, [edi + 0xc800]
push ebx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
call fcn.00403bd8
test eax, eax
jne 0x403f3e
push 0x3fb
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push ebx
call sub.KERNEL32.dll_lstrcatW
call fcn.00403bd8
test eax, eax
jne 0x403f3e
push ebx
push 0x3fc
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0x40a58c
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 0x40a59e
call esi
call fcn.00403bd8
test eax, eax
jne 0x403f3e
xor ebx, ebx
mov dword [esp], 0x40a490
jmp 0x404191
mov dword [esp + 0x10], ebx
lea eax, [edi + 0xc000]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 4]
call fcn.00403599
xor ebx, ebx
test eax, eax
jne 0x403f87
mov eax, dword [0x40a624]
cmp dword [eax], 0
jne 0x403f8f
mov eax, dword [0x40a474]
mov dword [eax + 0x2c], 0xffffffff
mov dword [esp], 0
call fcn.00404394
mov ebx, eax
jmp 0x404191
mov dword [esp], eax
jmp 0x404191
push 0
mov esi, dword [esp + 0x10]
push esi
call fcn.00406e98
cmp eax, esi
mov ebp, dword [esp + 0x10]
jb 0x403fc9
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 0x404140
add edi, 0xfffffffe
cmp edi, dword [esp + 0xc]
jae 0x403faf
call fcn.00406912
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.00406dbf
cmp word [esi + 0xa800], 0
jne 0x404004
lea eax, [esi + 0xa800]
lea ecx, [esi + 0xb800]
push ecx
push eax
call fcn.00406dbf
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.00407492
cmp dword [esp + 0xc], 0
je 0x40406b
mov ebp, dword [esp + 0x10]
push ebp
call fcn.004068a0
jmp 0x404075
mov ebp, dword [esp + 0x10]
push ebp
call fcn.004068f4
test eax, eax
je 0x4040b0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
bt eax, 0xa
jb 0x404123
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x404123
push 1
push dword [esp + 0x14]
call fcn.00406af3
test bl, 1
mov ebx, 0
jne 0x404032
jmp 0x404123
push ebp
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0
push ebp
call fcn.00406e12
push 1
push edi
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov dword [esp], str.Error_launching_installer
test eax, eax
je 0x40418f
mov ebp, esi
push 0
push edi
call fcn.00406e12
mov eax, dword [0x40a004]
mov eax, dword [eax]
push dword [eax + 0x124]
mov esi, dword [esp + 0x18]
push esi
call fcn.00407492
push esi
call fcn.00406965
test eax, eax
jne 0x404181
test bl, 1
je 0x40418f
push edi
call fcn.00406e41
xor ebx, ebx
test eax, eax
mov esi, ebp
je 0x404032
jmp 0x404191
mov eax, dword [esp + 4]
inc eax
mov dword [esp + 4], eax
cmp eax, 0x10000
jne 0x404030
mov dword [esp], str.Error_launching_installer
jmp 0x40418f
mov word [edi], 0
add edi, 8
push edi
call fcn.00406d24
mov dword [esp], str.Error_launching_installer
mov ebx, 0
test eax, eax
je 0x404191
mov esi, dword [esp + 8]
lea eax, [esi + 0xa800]
push edi
push eax
call fcn.00406dbf
add esi, 0xb000
push edi
push esi
call fcn.00406dbf
jmp 0x403f68
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp], 0
xor ebx, ebx
call fcn.0040426f
call dword [sym.imp.ole32.dll_OleUninitialize]
mov eax, dword [esp]
test eax, eax
jne 0x40425c
mov eax, dword [0x40a474]
cmp dword [eax + 0x14], 0
je 0x404247
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 0x404208
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.0040692c
test eax, eax
je 0x40422f
sub esp, 0x14
movaps xmm0, xmmword [0x40a480]
movups xmmword [esp], xmm0
mov dword [esp + 0x10], 0x80040002
call eax
test eax, eax
je 0x404240
push 0x80040002
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x404247
push 9
call fcn.004031e0
mov eax, dword [0x40a474]
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.00406a08
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]