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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x308
mov ecx, 0x8001
call qword [sym.imp.KERNEL32.dll_SetErrorMode]
call qword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x0043e2a0], eax
cmp ax, 6
je 0x4042d6
xor ecx, ecx
call fcn.0040847a
test rax, rax
je 0x4042d6
mov ecx, 0xc00
call rax
mov rsi, qword [sym.imp.KERNEL32.dll_lstrlenA]
lea rbx, str.UXTHEME
mov rcx, rbx
call fcn.004083ef
mov rcx, rbx
call rsi
inc eax
cdqe
add rbx, rax
cmp byte [rbx], 0
jne 0x4042e4
mov ecx, 7
lea rdi, [rsp + 0x48]
call fcn.0040847a
mov ecx, 5
call fcn.0040847a
mov qword [0x0043e2a8], rax
call qword [sym.imp.COMCTL32.dll_InitCommonControls]
xor ecx, ecx
call qword [sym.imp.ole32.dll_OleInitialize]
mov rdx, qword [0x0040d100]
mov r8, rdi
mov r9d, 0x2b8
lea rcx, [0x0040c0da]
mov dword [rdx], eax
xor edx, edx
mov dword [rsp + 0x20], 0
call qword [sym.imp.SHELL32.dll_SHGetFileInfoW]
lea rdx, str.NSIS_Error
lea rcx, [0x0043e2c0]
call fcn.004078b1
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rdx, rax
mov rax, qword [0x0040d150]
mov rbx, qword [rax]
lea rsi, [rbx + 0x50000]
mov rcx, rsi
call fcn.004078b1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
movzx edx, word [rbx + 0x50000]
lea rcx, [rbx + 0x50002]
mov qword [0x0043e2b0], rax
cmp dx, 0x22
je 0x4043b4
mov rcx, rsi
mov edx, 0x20
call fcn.00407247
xor r15d, r15d
movabs r12, 0x4300520043004e
movabs r13, 0x3d0044002f0020
mov rcx, rax
call qword [sym.imp.USER32.dll_CharNextW]
mov rbp, qword [0x0040d0b0]
mov qword [rsp + 0x38], rax
mov rcx, rax
cmp word [rcx], 0
je 0x404484
movzx edx, word [rcx]
cmp dx, 0x20
jne 0x404401
add rcx, 2
jmp 0x4043f2
cmp dx, 0x22
jne 0x40440d
add rcx, 2
jmp 0x404412
mov edx, 0x20
cmp word [rcx], 0x2f
jne 0x404469
cmp word [rcx + 2], 0x53
lea rax, [rcx + 2]
jne 0x404432
test word [rcx + 4], 0xffdf
jne 0x404432
mov dword [rbp + 0x20], 1
cmp qword [rcx + 2], r12
jne 0x404448
test word [rcx + 0xa], 0xffdf
mov r8d, 4
cmove r15d, r8d
cmp qword [rcx - 2], r13
jne 0x404466
mov word [rcx - 2], 0
lea rdx, [rcx + 6]
lea rcx, [rbx + 0x54000]
call fcn.004078b1
jmp 0x404484
mov rcx, rax
call fcn.00407247
cmp word [rax], 0x22
mov rcx, rax
jne 0x4043e8
add rcx, 2
jmp 0x4043e8
lea r12, [rbx + 0x64000]
mov ecx, 0x2000
mov rbp, qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov rdx, r12
call rbp
call fcn.004041f0
test rax, rax
je 0x4044cf
lea rcx, [rbx + 0x60000]
mov rbp, qword [sym.imp.KERNEL32.dll_DeleteFileW]
xor r14d, r14d
call rbp
mov ecx, r15d
call fcn.00403f1f
mov r13, rax
test rax, rax
jne 0x404734
jmp 0x40454b
mov edx, 0x1ffb
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea rdx, str.Temp
mov rcx, r12
call sub.KERNEL32.dll_lstrcatW
call fcn.004041f0
test rax, rax
jne 0x4044a6
mov rdx, r12
mov ecx, 0x1ffc
lea r13, str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
xor r14d, r14d
call rbp
lea rdx, [0x0040c0fe]
mov rcx, r12
call sub.KERNEL32.dll_lstrcatW
mov rbp, qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rdx, r12
lea rcx, str.TEMP
call rbp
mov rdx, r12
lea rcx, [0x0040c110]
call rbp
call fcn.004041f0
test rax, rax
jne 0x4044a6
jmp 0x404734
mov rax, qword [0x0040d120]
cmp dword [rax], 0
je 0x404714
xor edx, edx
mov rcx, rsi
call fcn.00407247
movabs rdx, 0x3d003f005f0020
cmp rsi, rax
ja 0x4045c3
cmp qword [rax], rdx
je 0x40457f
sub rax, 2
jmp 0x40456f
mov word [rax], 0
lea r12, [rax + 8]
mov rcx, r12
call fcn.004080a8
test eax, eax
jne 0x4045a0
lea r13, str.Error_launching_installer
jmp 0x40470f
lea rcx, [rbx + 0x54000]
mov rdx, r12
call fcn.004078b1
lea rcx, [rbx + 0x58000]
mov rdx, r12
call fcn.004078b1
jmp 0x404714
call fcn.004084da
lea rdx, str.nsu
mov rcx, r12
mov esi, eax
call sub.KERNEL32.dll_lstrcatW
test esi, esi
je 0x4045ec
lea rdx, [0x0040c122]
mov rcx, r12
call sub.KERNEL32.dll_lstrcatW
lea rdx, str..tmp
mov rcx, r12
lea r13, [rbx + 0x5c000]
call sub.KERNEL32.dll_lstrcatW
mov rdx, r13
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x404594
mov rcx, r12
test esi, esi
je 0x404620
call fcn.00407070
jmp 0x404625
call fcn.00407103
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp word [rbx + 0x54000], 0
jne 0x404647
lea rcx, [rbx + 0x54000]
mov rdx, r13
call fcn.004078b1
mov rdx, qword [rsp + 0x38]
mov rcx, rbx
mov esi, 0x1a
lea r13, str.Error_launching_installer
call fcn.004078b1
mov r14, qword [0x0040d0f0]
mov dword [rbx + 0x4000], 0x41
mov r15, qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [r14]
lea rcx, [0x004462c0]
mov edx, dword [rax + 0x140]
call fcn.00407a1f
lea rcx, [0x004462c0]
call rbp
test r13, r13
je 0x4046f6
lea rcx, [rbx + 0x6c000]
mov r8d, 1
lea rdx, [0x004462c0]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x4046f6
xor edx, edx
lea rcx, [0x004462c0]
call fcn.0040762f
mov rax, qword [r14]
lea rcx, [0x004462c0]
mov edx, dword [rax + 0x144]
call fcn.00407a1f
lea rcx, [0x004462c0]
call fcn.00407125
mov rcx, rax
test rax, rax
je 0x4046f6
call r15
xor r13d, r13d
inc word [rbx + 0x4000]
dec esi
jne 0x404678
xor edx, edx
mov rcx, r12
call fcn.0040762f
xor r14d, r14d
jmp 0x404734
mov rax, qword [0x0040d0b0]
mov dword [rax + 0x2c], 0xffffffff
call fcn.00405d9a
mov ecx, 1
mov r14d, eax
call fcn.00407d24
call fcn.0040424c
call qword [sym.imp.ole32.dll_OleUninitialize]
test r13, r13
mov rbx, qword [sym.imp.KERNEL32.dll_ExitProcess]
je 0x404762
mov rcx, r13
mov edx, 0x200010
call fcn.004071d3
mov ecx, 2
jmp 0x404830
mov rsi, qword [0x0040d0b0]
cmp dword [rsi + 0x14], 0
je 0x404823
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x40]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4047d9
lea r8, [rsp + 0x4c]
lea rdx, str.SeShutdownPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov rcx, qword [rsp + 0x40]
xor r9d, r9d
mov r8, rdi
mov dword [rsp + 0x48], 1
xor edx, edx
mov dword [rsp + 0x54], 2
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov ecx, 1
call fcn.0040847a
test rax, rax
jne 0x4047fe
mov edx, 0x80040002
mov ecx, 2
call qword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
je 0x404819
jmp 0x404823
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], 0x80040002
mov r9d, 0x25
call rax
test eax, eax
jne 0x4047e8
mov ecx, 9
call fcn.00403b56
mov eax, dword [rsi + 0x2c]
cmp eax, 0xffffffff
cmovne r14d, eax
mov ecx, r14d
call rbx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop