Function at 0x140020184
Capabilities:
Acquire debug privileges

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x78
xor esi, esi
mov rbx, rcx
lea rcx, [rax - 0x70]
mov r12d, 1
mov dword [rsp + 0x30], esi
mov dword [rax + 0x20], esi
mov dword [rsp + 0x34], esi
mov dword [rsp + 0x38], esi
mov qword [rax - 0x78], r12
call fcn.140057154
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov rdx, qword [rsp + 0xc8]
lea r8, [rsp + 0x48]
xor r9d, r9d
mov rcx, rbx
mov dword [rsp + 0x50], eax
mov byte [rsp + 0x20], r12b
call fcn.14006a8f4
mov r11, qword [rsp + 0x48]
lea eax, [rsi + 0x2d]
mov r14b, sil
mov qword [rsp + 0xc8], r11
mov cl, 0x2a
mov bpl, sil
mov r15b, sil
mov byte [rsp + 0xd0], sil
cmp ax, word [r11]
jne 0x140020219
mov cl, byte [r11]
movzx edi, cl
mov r13d, 4
cmp di, word [r11]
jne 0x140020478
lea ebx, [r13 + 5]
add r11, 2
mov qword [rsp + 0xc8], r11
je 0x140020398
lea rdx, [rsp + 0xc8]
lea rcx, [0x1400f1b2c]
mov r8d, 5
call fcn.14005992c
cmp al, sil
je 0x140020269
or r14b, r12b
jmp 0x140020386
mov rdx, qword [rsp + 0xc8]
lea rcx, str.svr2
mov r8d, r13d
call fcn.140050a6c
cmp al, sil
jne 0x1400203e8
mov rdx, qword [rsp + 0xc8]
lea rcx, str.exitcode
mov r8d, ebx
call qword [sym.imp.SHLWAPI.dll_StrCmpNIW]
cmp eax, esi
jne 0x1400202f7
mov rax, qword [rsp + 0xc8]
mov dword [rsp + 0x3c], esi
lea rdx, [rsp + 0x3c]
add rax, 0x14
mov qword [rsp + 0xc8], rax
movzx ecx, word [rax]
sub cx, 0x30
cmp cx, bx
lea rcx, [rsp + 0xc8]
setbe bl
call fcn.14006556c
cmp bl, sil
mov ebx, 9
je 0x140020386
mov eax, dword [rsp + 0x3c]
mov dword [rsp + 0x30], eax
jmp 0x140020386
lea rdx, [rsp + 0xc8]
lea rcx, str.explorer
mov r8d, 8
call fcn.14005992c
cmp al, sil
je 0x14002031d
mov dword [rsp + 0x30], r12d
jmp 0x140020386
lea rdx, [rsp + 0xc8]
lea rcx, [0x1400f1afc]
mov r8d, 3
call fcn.14005992c
cmp al, sil
je 0x140020341
mov bpl, r12b
jmp 0x140020386
lea rdx, [rsp + 0xc8]
lea rcx, str.tree
mov r8d, r13d
call fcn.14005992c
cmp al, sil
je 0x140020362
mov r15b, 0xc0
jmp 0x140020386
lea rdx, [rsp + 0xc8]
lea rcx, [0x1400f1af0]
mov r8d, r12d
call fcn.14005992c
cmp al, sil
je 0x1400203dd
mov byte [rsp + 0xd0], r12b
mov r11, qword [rsp + 0xc8]
cmp di, word [r11]
je 0x140020230
cmp bpl, sil
je 0x140020478
mov rax, qword [str.26:INDATA]
lea rcx, [rsp + 0x58]
lea rdx, [rsp + 0x58]
mov qword [rcx], rax
mov rax, qword [0x1400f1ae0]
mov qword [rcx + 8], rax
mov rax, qword [0x1400f1ae8]
mov qword [rcx + 0x10], rax
mov rcx, qword [rsp + 0xc0]
call fcn.140042ff4
jmp 0x1400206f5
sub qword [rsp + 0xc8], 2
jmp 0x140020398
lea rbp, [0x14010ce50]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, 2
lea rcx, str.SeShutdownPrivilege
lea r8d, [rdx + 6]
call fcn.14001945c
mov al, byte [0x14010ced4]
mov bl, sil
lea r12, str.SeDebugPrivilege
test r13b, al
jne 0x14002043c
xor r8d, r8d
or al, r13b
mov rcx, r12
lea edx, [r8 + 2]
mov bl, 1
mov byte [0x14010ced4], al
call fcn.14001945c
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_AbortSystemShutdownW]
cmp bl, sil
je 0x14002045e
and byte [0x14010ced4], 0xfb
xor r8d, r8d
mov edx, r13d
mov rcx, r12
call fcn.14001945c
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea rcx, [rsp + 0x48]
call fcn.14004f564
xor eax, eax
jmp 0x140020702
lea rbp, [0x14010ce50]
mov rcx, rbp
mov rbx, rbp
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r13d, 0x8000
mov dil, sil
lea r12, str.SeDebugPrivilege
cmp r14b, sil
je 0x1400204c6
mov al, byte [0x14010ced4]
test al, 4
jne 0x1400204c6
xor r8d, r8d
or al, 4
mov rcx, r12
lea edx, [r8 + 2]
mov dil, 1
mov byte [0x14010ced4], al
call fcn.14001945c
jmp 0x1400204d2
mov rcx, rbp
mov rbx, rsi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsp + 0xc8]
mov eax, 0x2a
cmp ax, word [rcx]
jne 0x140020589
add rcx, 2
lea rdx, [rsp + 0xd8]
mov qword [rsp + 0xc8], rcx
lea rcx, [rsp + 0xc8]
call fcn.14006556c
cmp eax, esi
jg 0x140020542
cmp dil, sil
je 0x140020528
and byte [0x14010ced4], 0xfb
xor r8d, r8d
mov rcx, r12
lea edx, [r8 + 4]
call fcn.14001945c
cmp rbx, rsi
je 0x140020536
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rsi, 0xffffffff80070057
jmp 0x1400206f5
mov ecx, dword [rsp + 0xd8]
mov r14d, dword [rsp + 0x30]
mov dword [rsp + 0x34], ecx
cmp r15b, sil
je 0x140020574
lea rax, [0x1400ee4c4]
or r15b, 1
mov qword [rsp + 0xc8], rax
mov bpl, byte [rsp + 0xc8]
jmp 0x1400205d5
mov qword [rsp + 0xc8], rsi
mov bpl, byte [rsp + 0xc8]
jmp 0x140020657
call fcn.140016268
mov rcx, rax
call fcn.140018fa4
mov qword [rsp + 0xc8], rax
cmp word [rax], si
je 0x14002050d
mov edx, 0x5c
mov rcx, rax
call qword [sym.imp.SHLWAPI.dll_StrChrW]
mov ecx, dword [rsp + 0xd8]
mov r14d, dword [rsp + 0x30]
neg rax
sbb bpl, bpl
and bpl, 0x20
cmp qword [rsp + 0xc8], rsi
je 0x14002062f
mov al, r15b
movsx edx, bpl
neg al
movzx eax, r15b
sbb ecx, ecx
or edx, eax
mov eax, dword [rsp + 0x34]
and ecx, r14d
or edx, 0x10
xor r9d, r9d
mov r8d, ecx
mov rcx, qword [rsp + 0xc8]
mov dword [rsp + 0x20], eax
call fcn.14001f6dc
mov rcx, rax
mov dword [rsp + 0xd8], eax
mov eax, dword [rsp + 0x34]
cmp eax, esi
je 0x14002062f
lea r8, [rsp + 0x40]
mov edx, r14d
mov ecx, eax
call fcn.140017520
mov ecx, dword [rsp + 0xd8]
cmp r15b, sil
je 0x140020651
cmp ecx, esi
mov rax, rsi
sete al
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0xc8], rsi
je 0x1400206c7
cmp ecx, esi
je 0x1400206c7
jmp 0x14002066f
cmp dword [rsp + 0x50], ecx
je 0x14002066f
cmp ecx, esi
je 0x14002066f
lea r8, [rsp + 0x40]
mov edx, r14d
call fcn.140017520
mov ecx, dword [rsp + 0xd8]
cmp byte [rsp + 0xd0], sil
jne 0x1400206c7
cmp qword [rsp + 0xc8], rsi
je 0x1400206c7
cmp ecx, esi
je 0x1400206c7
cmp dword [rsp + 0x38], ecx
jne 0x1400206ab
mov rcx, qword [rsp + 0xc0]
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
call fcn.14001bffc
mov ecx, dword [rsp + 0xd8]
cmp r15b, sil
mov eax, ecx
cmovne eax, esi
cmp ecx, esi
mov dword [rsp + 0x38], eax
jle 0x1400206c7
dec r13d
cmp r13d, esi
jg 0x1400205cb
cmp dil, sil
je 0x1400206e2
and byte [0x14010ced4], 0xfb
xor r8d, r8d
mov rcx, r12
lea edx, [r8 + 4]
call fcn.14001945c
cmp rbx, rsi
je 0x1400206f0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rsi, qword [rsp + 0x40]
lea rcx, [rsp + 0x48]
call fcn.14004f564
mov rax, rsi
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret