Function at 0x140004250
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 r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x448
mov ecx, 0x8001
call qword [sym.imp.KERNEL32.dll_SetErrorMode]
lea rcx, [rsp + 0x6c]
mov dword [rsp + 0x6c], 0x11c
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
mov rdi, qword [0x14000d0b0]
mov eax, dword [rsp + 0x78]
movzx edx, byte [rsp + 0x74]
movzx ecx, byte [rsp + 0x186]
mov dword [rdi + 0x38], eax
movzx eax, byte [rsp + 0x70]
shl eax, 8
or eax, edx
mov edx, dword [rsp + 0x180]
shl eax, 0x10
shl edx, 8
or edx, ecx
movzx edx, dx
or eax, edx
mov dword [rdi + 0x3c], eax
shr eax, 0x10
cmp ax, 0x600
je 0x1400042d9
xor ecx, ecx
call fcn.140008100
test rax, rax
je 0x1400042d9
mov ecx, 0xc00
call rax
mov rsi, qword [sym.imp.KERNEL32.dll_lstrlenA]
lea rbx, str.UXTHEME
cmp byte [rbx], 0
je 0x140004302
mov rcx, rbx
call fcn.140008077
mov rcx, rbx
call rsi
inc eax
cdqe
add rbx, rax
jmp 0x1400042e7
mov ecx, 8
call fcn.140008100
mov ecx, 6
call fcn.140008100
mov qword [0x1400432a8], rax
call qword [sym.imp.COMCTL32.dll_InitCommonControls]
xor ecx, ecx
call qword [sym.imp.ole32.dll_OleInitialize]
mov rdx, qword [0x14000d100]
mov r9d, 0x2b8
lea rcx, [0x14000c0da]
mov dword [rdx], eax
lea rax, [rsp + 0x188]
xor edx, edx
mov r8, rax
mov dword [rsp + 0x20], edx
xor edx, edx
mov qword [rsp + 0x48], rax
call qword [sym.imp.SHELL32.dll_SHGetFileInfoW]
lea rdx, str.NSIS_Error
lea rcx, [0x1400432c0]
call fcn.140007861
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rdx, rax
mov rax, qword [0x14000d150]
mov rbx, qword [rax]
lea r14, [rbx + 0x50000]
mov rcx, r14
call fcn.140007861
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
movzx edx, word [rbx + 0x50000]
lea rcx, [rbx + 0x50002]
mov qword [0x1400432b0], rax
cmp dx, 0x22
je 0x1400043bf
mov rcx, r14
mov edx, 0x20
call main
xor r15d, r15d
movabs rsi, 0x4300520043004e
movabs r12, 0x3d0044002f0020
mov rcx, rax
call qword [sym.imp.USER32.dll_CharNextW]
mov rbp, rax
mov rcx, rax
cmp word [rcx], 0
je 0x140004486
movzx edx, word [rcx]
cmp dx, 0x20
jne 0x140004403
add rcx, 2
jmp 0x1400043f4
cmp dx, 0x22
jne 0x14000440f
add rcx, 2
jmp 0x140004414
mov edx, 0x20
cmp word [rcx], 0x2f
jne 0x14000446b
cmp word [rcx + 2], 0x53
lea rax, [rcx + 2]
jne 0x140004434
test word [rcx + 4], 0xffdf
jne 0x140004434
mov dword [rdi + 0x20], 1
cmp qword [rcx + 2], rsi
jne 0x14000444a
test word [rcx + 0xa], 0xffdf
mov r8d, 4
cmove r15d, r8d
cmp qword [rcx - 2], r12
jne 0x140004468
mov word [rcx - 2], 0
lea rdx, [rcx + 6]
lea rcx, [rbx + 0x54000]
call fcn.140007861
jmp 0x140004486
mov rcx, rax
call main
cmp word [rax], 0x22
mov rcx, rax
jne 0x1400043ea
add rcx, 2
jmp 0x1400043ea
lea rax, [rbx + 0x64000]
mov ecx, 0x2000
mov rsi, qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov rdx, rax
mov qword [rsp + 0x30], rax
call rsi
call fcn.1400041b0
test rax, rax
je 0x1400044d6
lea rcx, [rbx + 0x60000]
xor r12d, r12d
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, r15d
call fcn.140003ede
mov rsi, rax
test rax, rax
jne 0x1400047a7
jmp 0x14000455e
mov rcx, qword [rsp + 0x30]
mov edx, 0x1ffb
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov rcx, qword [rsp + 0x30]
lea rdx, str.Temp
call sub.KERNEL32.dll_lstrcatW
call fcn.1400041b0
test rax, rax
jne 0x1400044ad
mov rdx, qword [rsp + 0x30]
mov ecx, 0x1ffc
xor r12d, r12d
call rsi
mov rcx, qword [rsp + 0x30]
lea rdx, [0x14000c0fe]
call sub.KERNEL32.dll_lstrcatW
mov rsi, qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rdx, qword [rsp + 0x30]
lea rcx, str.TEMP
call rsi
mov rdx, qword [rsp + 0x30]
lea rcx, [0x14000c110]
call rsi
lea rsi, str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
call fcn.1400041b0
test rax, rax
jne 0x1400044ad
jmp 0x1400047a7
mov rax, qword [0x14000d120]
cmp dword [rax], 0
je 0x14000478e
xor edx, edx
mov rcx, r14
call main
movabs rdx, 0x3d003f005f0020
cmp rax, r14
jb 0x1400045d6
cmp qword [rax], rdx
je 0x140004592
sub rax, 2
jmp 0x140004582
mov word [rax], 0
lea rbp, [rax + 8]
mov rcx, rbp
call fcn.140007d42
test eax, eax
jne 0x1400045b3
lea rsi, str.Error_launching_installer
jmp 0x140004746
lea rcx, [rbx + 0x54000]
mov rdx, rbp
call fcn.140007861
lea rcx, [rbx + 0x58000]
mov rdx, rbp
call fcn.140007861
jmp 0x14000478e
call fcn.14000815a
mov rcx, qword [rsp + 0x30]
mov r13d, eax
call sub.KERNEL32.dll_lstrlenW
mov rdx, rbp
mov rcx, rbx
movsxd r12, eax
lea rax, [rbx + 0x14000]
mov qword [rsp + 0x38], rax
lea rax, [rbx + 0x18000]
mov qword [rsp + 0x40], rax
call fcn.140007861
cmp word [rbx + 0x54000], 0
jne 0x14000462b
lea rdx, [rbx + 0x5c000]
lea rcx, [rbx + 0x54000]
call fcn.140007861
lea rax, [rbx + r12*2 + 0x64000]
mov r15, qword [sym.imp.USER32.dll_wsprintfW]
mov ebp, 1
mov r14, qword [0x14000d0f0]
mov qword [rsp + 0x50], rax
jmp 0x140004754
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
bt eax, 0xa
jb 0x14000474b
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x14000474b
mov rcx, qword [rsp + 0x30]
mov edx, 1
call fcn.140007de4
test r12d, r12d
jne 0x14000474b
mov r12d, 1
mov r8d, dword [rsp + 0x5c]
mov rcx, qword [rsp + 0x50]
lea rdx, str.nsu_X.tmp
call r15
mov rax, qword [r14]
mov rcx, qword [rsp + 0x38]
mov edx, dword [rax + 0x140]
call fcn.14000817f
mov rcx, qword [rsp + 0x30]
test r13d, r13d
je 0x140004763
call fcn.140007080
test eax, eax
jne 0x140004650
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov rcx, qword [rsp + 0x30]
xor edx, edx
call fcn.1400075f4
mov rdx, qword [rsp + 0x38]
lea rcx, [rbx + 0x6c000]
mov r8d, 1
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x1400045a7
mov rcx, qword [rsp + 0x38]
xor edx, edx
call fcn.1400075f4
mov rax, qword [r14]
mov rcx, qword [rsp + 0x40]
mov edx, dword [rax + 0x144]
call fcn.14000817f
mov rcx, qword [rsp + 0x40]
call fcn.140007107
mov rcx, rax
test rax, rax
je 0x14000476d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r12d, r12d
jmp 0x1400047a7
inc bp
je 0x1400045a7
movzx eax, bp
xor r12d, r12d
mov dword [rsp + 0x5c], eax
jmp 0x140004696
call fcn.1400070e5
jmp 0x1400046d0
test r12d, r12d
jne 0x1400045a7
mov rcx, qword [rsp + 0x38]
call fcn.140007d13
test rax, rax
je 0x140004690
jmp 0x1400045a7
mov dword [rdi + 0x2c], 0xffffffff
call fcn.140005dca
mov ecx, 1
mov r12d, eax
call fcn.1400079bf
call fcn.140004209
call qword [sym.imp.ole32.dll_OleUninitialize]
test rsi, rsi
mov rbx, qword [sym.imp.KERNEL32.dll_ExitProcess]
je 0x1400047d5
mov rcx, rsi
mov edx, 0x200010
call fcn.1400071a9
mov ecx, 2
jmp 0x14000489e
cmp dword [rdi + 0x14], 0
je 0x140004894
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x60]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x14000484a
lea r8, [rsp + 0x18c]
lea rdx, str.SeShutdownPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
xor eax, eax
mov r8, qword [rsp + 0x48]
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov rcx, qword [rsp + 0x60]
xor edx, edx
mov dword [rsp + 0x188], 1
mov dword [rsp + 0x194], 2
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov ecx, 1
call fcn.140008100
test rax, rax
jne 0x14000486f
mov edx, 0x80040002
mov ecx, 2
call qword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
je 0x14000488a
jmp 0x140004894
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], 0x80040002
mov r9d, 0x25
call rax
test eax, eax
jne 0x140004859
mov ecx, 9
call fcn.140003b3b
mov ecx, dword [rdi + 0x2c]
cmp ecx, 0xffffffff
cmove ecx, r12d
call rbx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop