Function at 0x404163
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 0x4041ce
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 0x4041e2
movzx ecx, cx
mov dword [esp + 0x28], ecx
mov edi, dword [0x40b114]
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 0x404235
push 0
call fcn.00406f78
test eax, eax
je 0x404235
push 0xc00
call eax
mov esi, str.UXTHEME
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
call fcn.00408324
push esi
call edi
add esi, eax
inc esi
cmp byte [esi], 0
jne 0x404240
push 0xc
call fcn.00406f78
push 0xa
call fcn.00406f78
mov dword [0x440294], eax
push 8
call fcn.00406f78
test eax, eax
je 0x404280
push 0x1e
call eax
test eax, eax
je 0x404280
mov eax, dword [0x40b114]
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 [0x40b2c0]
mov dword [ecx], eax
lea eax, [esp + 0x138]
push ebx
push 0x2b4
push eax
push ebx
push 0x40b208
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
push str.NSIS_Error
push 0x440298
call fcn.0040746d
mov eax, dword [0x40ae14]
mov esi, dword [eax]
lea edi, [esi + 0x50000]
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
push edi
call fcn.0040746d
mov dword [esp + 4], 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x448298], eax
xor eax, eax
cmp word [esi + 0x50000], 0x22
mov dword [esp + 8], esi
lea ecx, [esi + 0x50002]
sete al
mov dword [esp + 0xc], edi
cmovne ecx, edi
lea eax, [eax + eax + 0x20]
push eax
push ecx
call fcn.00407585
push eax
call dword [sym.imp.USER32.dll_CharNextW]
mov dword [esp], eax
movzx edx, word [eax]
test dx, dx
je 0x404407
mov dword [esp + 4], 0
mov edi, 0x2f0020
mov eax, dword [esp]
mov ebp, 0x43004e
add eax, 2
cmp dx, 0x20
jne 0x404350
movzx edx, word [eax]
jmp 0x404342
movzx ecx, dx
cmp ecx, 0x22
jne 0x404361
movzx edx, word [eax]
mov cx, 0x22
jmp 0x404368
add eax, 0xfffffffe
mov cx, 0x20
cmp dx, 0x2f
jne 0x4043c9
cmp word [eax + 2], 0x53
jne 0x40438e
movzx edx, word [eax + 4]
test edx, 0xffdf
jne 0x40438e
mov edx, dword [0x40b114]
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 0x4043b4
movzx esi, word [eax + 0xa]
test esi, 0xffdf
jne 0x4043b4
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 0x4043ed
mov eax, edx
movzx ecx, cx
push ecx
push eax
call fcn.00407585
xor ecx, ecx
cmp word [eax], 0x22
sete cl
lea eax, [eax + ecx*2]
movzx edx, word [eax]
test dx, dx
jne 0x404342
jmp 0x404407
mov word [eax - 2], 0
mov ecx, dword [esp + 8]
add ecx, 0x54000
add eax, 6
push eax
push ecx
call fcn.0040746d
mov edi, dword [esp + 8]
lea ebx, [edi + 0x64000]
push ebx
push 0x2000
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
call fcn.00404124
test eax, eax
jne 0x40448a
push 0x1ffb
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.Temp
push ebx
call sub.KERNEL32.dll_lstrcatW
call fcn.00404124
test eax, eax
jne 0x40448a
push ebx
push 0x1ffc
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0x40b22c
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 0x40b23e
call esi
call fcn.00404124
test eax, eax
jne 0x40448a
xor ebx, ebx
mov dword [esp], 0x40b130
jmp 0x4046e4
mov dword [esp + 0x10], ebx
lea eax, [edi + 0x60000]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 4]
call fcn.00403ae5
xor ebx, ebx
test eax, eax
jne 0x4044da
mov eax, dword [0x40b2c4]
cmp dword [eax], 0
jne 0x4044e2
mov eax, dword [0x40b114]
mov dword [eax + 0x2c], 0xffffffff
call fcn.00404912
mov ebx, eax
push 1
call fcn.00408097
mov dword [esp], 0
jmp 0x4046e4
mov dword [esp], eax
jmp 0x4046e4
push 0
mov esi, dword [esp + 0x10]
push esi
call fcn.00407585
cmp eax, esi
mov ebp, dword [esp + 0x10]
jb 0x40451c
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 0x404693
add edi, 0xfffffffe
cmp edi, dword [esp + 0xc]
jae 0x404502
call fcn.00406f5e
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.0040746d
cmp word [esi + 0x54000], 0
jne 0x404557
lea eax, [esi + 0x54000]
lea ecx, [esi + 0x5c000]
push ecx
push eax
call fcn.0040746d
lea edi, [esi + 0x14000]
lea eax, [esi + 0x18000]
mov dword [esp + 0x14], eax
lea eax, [ebx*2]
add eax, ebp
add esi, 0x6c000
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.00407b7f
cmp dword [esp + 0xc], 0
je 0x4045be
mov ebp, dword [esp + 0x10]
push ebp
call fcn.00406eec
jmp 0x4045c8
mov ebp, dword [esp + 0x10]
push ebp
call fcn.00406f40
test eax, eax
je 0x404603
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
bt eax, 0xa
jb 0x404676
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x404676
push 1
push dword [esp + 0x14]
call fcn.0040713f
test bl, 1
mov ebx, 0
jne 0x404585
jmp 0x404676
push ebp
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0
push ebp
call fcn.004074ff
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 0x4046e2
mov ebp, esi
push 0
push edi
call fcn.004074ff
mov eax, dword [0x40a004]
mov eax, dword [eax]
push dword [eax + 0x124]
mov esi, dword [esp + 0x18]
push esi
call fcn.00407b7f
push esi
call fcn.00406fb1
test eax, eax
jne 0x4046d4
test bl, 1
je 0x4046e2
push edi
call fcn.0040752e
xor ebx, ebx
test eax, eax
mov esi, ebp
je 0x404585
jmp 0x4046e4
mov eax, dword [esp + 4]
inc eax
mov dword [esp + 4], eax
cmp eax, 0x10000
jne 0x404583
mov dword [esp], str.Error_launching_installer
jmp 0x4046e2
mov word [edi], 0
add edi, 8
push edi
call fcn.004073d2
mov dword [esp], str.Error_launching_installer
mov ebx, 0
test eax, eax
je 0x4046e4
mov esi, dword [esp + 8]
lea eax, [esi + 0x54000]
push edi
push eax
call fcn.0040746d
add esi, 0x58000
push edi
push esi
call fcn.0040746d
jmp 0x4044b4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp], 0
xor ebx, ebx
call fcn.004047c2
call dword [sym.imp.ole32.dll_OleUninitialize]
mov eax, dword [esp]
test eax, eax
jne 0x4047af
mov eax, dword [0x40b114]
cmp dword [eax + 0x14], 0
je 0x40479a
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 0x40475b
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.00406f78
test eax, eax
je 0x404782
sub esp, 0x14
movaps xmm0, xmmword [0x40b120]
movups xmmword [esp], xmm0
mov dword [esp + 0x10], 0x80040002
call eax
test eax, eax
je 0x404793
push 0x80040002
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x40479a
push 9
call fcn.0040372a
mov eax, dword [0x40b114]
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.00407054
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]