Function at 0x140004353
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, 0x438
mov ecx, 0x8001
call qword [sym.imp.KERNEL32.dll_SetErrorMode]
lea rcx, [rsp + 0x5c]
mov dword [rsp + 0x5c], 0x11c
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
mov rbp, qword [0x14000d0e0]
mov eax, dword [rsp + 0x68]
mov edx, dword [rsp + 0x60]
mov dword [rbp + 0x38], eax
movzx eax, byte [rsp + 0x64]
shl edx, 8
or eax, edx
movzx edx, byte [rsp + 0x170]
shl eax, 0x10
shl edx, 8
mov ecx, edx
movzx edx, byte [rsp + 0x176]
or edx, ecx
movzx edx, dx
or eax, edx
mov dword [rbp + 0x3c], eax
shr eax, 0x10
cmp ax, 0x600
je 0x1400043de
xor ecx, ecx
call fcn.140008344
test rax, rax
je 0x1400043de
mov ecx, 0xc00
call rax
mov rsi, qword [sym.imp.KERNEL32.dll_lstrlenA]
lea rbx, str.UXTHEME
mov rcx, rbx
call fcn.1400082b9
mov rcx, rbx
call rsi
inc eax
cdqe
add rbx, rax
cmp byte [rbx], 0
jne 0x1400043ec
mov ecx, 8
call fcn.140008344
mov ecx, 6
call fcn.140008344
mov qword [0x1403b2ae8], rax
call qword [sym.imp.COMCTL32.dll_InitCommonControls]
xor ecx, ecx
call qword [sym.imp.ole32.dll_OleInitialize]
mov rdx, qword [0x14000d130]
mov r9d, 0x2b8
lea rcx, [0x14000c0da]
mov dword [rdx], eax
lea rax, [rsp + 0x178]
xor edx, edx
mov r8, rax
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.SHELL32.dll_SHGetFileInfoW]
lea rdx, str.NSIS_Error
lea rcx, [0x1403b2b00]
call fcn.140007a17
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rdx, rax
mov rax, qword [0x14000d180]
mov rbx, qword [rax]
lea rdi, [rbx + 0x28000]
mov rcx, rdi
call fcn.140007a17
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
movzx edx, word [rbx + 0x28000]
lea rcx, [rbx + 0x28002]
mov qword [0x1403b2af0], rax
cmp dx, 0x22
je 0x1400044c4
mov rcx, rdi
mov edx, 0x20
call fcn.1400073ad
xor r15d, r15d
movabs rsi, 0x4300520043004e
movabs r12, 0x3d0044002f0020
mov rcx, rax
call qword [sym.imp.USER32.dll_CharNextW]
mov r14, rax
mov rcx, rax
cmp word [rcx], 0
je 0x14000458b
movzx edx, word [rcx]
cmp dx, 0x20
jne 0x140004508
add rcx, 2
jmp 0x1400044f9
cmp dx, 0x22
jne 0x140004514
add rcx, 2
jmp 0x140004519
mov edx, 0x20
cmp word [rcx], 0x2f
jne 0x140004570
cmp word [rcx + 2], 0x53
lea rax, [rcx + 2]
jne 0x140004539
test word [rcx + 4], 0xffdf
jne 0x140004539
mov dword [rbp + 0x20], 1
cmp qword [rcx + 2], rsi
jne 0x14000454f
test word [rcx + 0xa], 0xffdf
mov r8d, 4
cmove r15d, r8d
cmp qword [rcx - 2], r12
jne 0x14000456d
mov word [rcx - 2], 0
lea rdx, [rcx + 6]
lea rcx, [rbx + 0x2a000]
call fcn.140007a17
jmp 0x14000458b
mov rcx, rax
call fcn.1400073ad
cmp word [rax], 0x22
mov rcx, rax
jne 0x1400044ef
add rcx, 2
jmp 0x1400044ef
lea rsi, [rbx + 0x32000]
mov ecx, 0x1000
mov r12, qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov rdx, rsi
call r12
call fcn.1400042b0
test rax, rax
je 0x1400045d4
lea rcx, [rbx + 0x30000]
xor r12d, r12d
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, r15d
call fcn.140003fd4
mov r13, rax
test rax, rax
jne 0x14000487a
jmp 0x140004653
mov edx, 0xffb
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea rdx, str.Temp
mov rcx, rsi
call sub.KERNEL32.dll_lstrcatW
call fcn.1400042b0
test rax, rax
jne 0x1400045ae
mov rdx, rsi
mov ecx, 0xffc
lea r13, str.Error_writing_temporary_file._Make_sure_your_temp_folder_is_valid.
call r12
lea rdx, [0x14000c0fe]
mov rcx, rsi
call sub.KERNEL32.dll_lstrcatW
mov r12, qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rdx, rsi
lea rcx, str.TEMP
call r12
mov rdx, rsi
lea rcx, [0x14000c110]
call r12
xor r12d, r12d
call fcn.1400042b0
test rax, rax
jne 0x1400045ae
jmp 0x14000487a
mov rax, qword [0x14000d150]
cmp dword [rax], 0
je 0x140004861
xor edx, edx
mov rcx, rdi
call fcn.1400073ad
movabs rdx, 0x3d003f005f0020
cmp rdi, rax
ja 0x1400046cb
cmp qword [rax], rdx
je 0x140004687
sub rax, 2
jmp 0x140004677
mov word [rax], 0
lea r12, [rax + 8]
mov rcx, r12
call fcn.140007f72
test eax, eax
jne 0x1400046a8
lea r13, str.Error_launching_installer
jmp 0x14000482a
lea rcx, [rbx + 0x2a000]
mov rdx, r12
call fcn.140007a17
lea rcx, [rbx + 0x2c000]
mov rdx, r12
call fcn.140007a17
jmp 0x140004861
call fcn.1400083a4
mov rcx, rsi
lea rdi, [rbx + 0xa000]
lea r15, [rbx + 0xc000]
mov dword [rsp + 0x44], eax
call sub.KERNEL32.dll_lstrlenW
mov rdx, r14
mov rcx, rbx
movsxd r12, eax
call fcn.140007a17
cmp word [rbx + 0x2a000], 0
jne 0x140004715
lea rdx, [rbx + 0x2e000]
lea rcx, [rbx + 0x2a000]
call fcn.140007a17
lea rax, [rbx + r12*2 + 0x32000]
mov word [rsp + 0x42], 1
xor r12d, r12d
mov r14, qword [0x14000d120]
mov qword [rsp + 0x38], rax
mov rax, qword [sym.imp.USER32.dll_wsprintfW]
mov qword [rsp + 0x48], rax
movzx r8d, word [rsp + 0x42]
mov rcx, qword [rsp + 0x38]
lea rdx, str.nsu_X.tmp
mov rax, qword [rsp + 0x48]
call rax
mov rax, qword [r14]
mov rcx, rdi
mov edx, dword [rax + 0x140]
call fcn.1400083cd
cmp dword [rsp + 0x44], 0
mov rcx, rsi
je 0x14000477a
call fcn.140007200
jmp 0x14000477f
call fcn.140007269
test eax, eax
je 0x1400047c8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
bt eax, 0xa
jb 0x14000484e
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x14000484e
mov edx, 1
mov rcx, rsi
call fcn.140008027
test r12d, r12d
jne 0x14000484e
mov r12d, 1
jmp 0x14000473f
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor edx, edx
mov rcx, rsi
call fcn.140007795
lea rcx, [rbx + 0x36000]
mov r8d, 1
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x14000469c
xor edx, edx
mov rcx, rdi
call fcn.140007795
mov rax, qword [r14]
mov rcx, r15
mov edx, dword [rax + 0x144]
call fcn.1400083cd
mov rcx, r15
call fcn.14000728b
mov rcx, rax
test rax, rax
je 0x14000482f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r12d, r12d
jmp 0x14000487a
test r12d, r12d
jne 0x14000469c
mov rcx, rdi
call fcn.140007f44
test rax, rax
je 0x1400047bd
jmp 0x14000469c
inc word [rsp + 0x42]
je 0x14000469c
xor r12d, r12d
jmp 0x14000473f
mov dword [rbp + 0x2c], 0xffffffff
call fcn.140005f0f
mov ecx, 1
mov r12d, eax
call fcn.140007b85
call fcn.14000430c
call qword [sym.imp.ole32.dll_OleUninitialize]
test r13, r13
mov rbx, qword [sym.imp.KERNEL32.dll_ExitProcess]
je 0x1400048a8
mov rcx, r13
mov edx, 0x200010
call fcn.140007339
mov ecx, 2
jmp 0x14000497a
cmp dword [rbp + 0x14], 0
je 0x14000496d
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x50]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140004923
lea r8, [rsp + 0x17c]
lea rdx, str.SeShutdownPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov r8, qword [rsp + 0x30]
xor r9d, r9d
xor edx, edx
mov dword [rsp + 0x178], 1
mov rcx, qword [rsp + 0x50]
mov dword [rsp + 0x184], 2
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov ecx, 1
call fcn.140008344
test rax, rax
jne 0x140004948
mov edx, 0x80040002
mov ecx, 2
call qword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
je 0x140004963
jmp 0x14000496d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], 0x80040002
mov r9d, 0x25
call rax
test eax, eax
jne 0x140004932
mov ecx, 9
call fcn.140003c0b
mov eax, dword [rbp + 0x2c]
cmp eax, 0xffffffff
cmovne r12d, eax
mov ecx, r12d
call rbx
nop
nop
nop
nop