Function at 0x180016260
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push r14
lea rbp, [rsp - 0x20b0]
mov eax, 0x21b0
call fcn.180022e80
sub rsp, rax
mov rsi, rcx
mov ecx, 0x1002
call qword [sym.imp.msvcrt.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__]
mov r14, rax
mov qword [rbp - 0x80], rax
test rax, rax
je 0x1800162a1
mov word [rax + 0x1000], 0
mov rax, qword [0x18002a6a0]
test rax, rax
jne 0x1800162e4
mov rax, qword [0x18002a698]
test rax, rax
jne 0x1800162cd
lea rcx, str.psapi
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x18002a698], rax
lea rdx, str.EnumProcesses
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18002a6a0], rax
lea r8, [rsp + 0x40]
mov edx, 0x1000
mov rcx, r14
mov qword [rsp + 0x21d0], rbx
call rax
test eax, eax
jne 0x18001631c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test r14, r14
je 0x180016315
mov rcx, r14
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov eax, ebx
jmp 0x1800167e6
mov eax, dword [rsp + 0x40]
mov qword [rsp + 0x21a8], rdi
xor edi, edi
mov qword [rsp + 0x2198], r13
shr eax, 2
mov qword [rsp + 0x2190], r15
mov r15d, edi
lea r13d, [rdi + 0x20]
test eax, eax
jle 0x180016784
mov qword [rsp + 0x21a0], r12
mov r12, r14
mov r14, qword [rbp + 0x20d8]
lea ebx, [rdi + 1]
mov ecx, dword [r12]
test ecx, ecx
je 0x180016761
cmp ecx, 4
je 0x180016761
cmp ecx, 8
je 0x180016761
lea rdx, [rbp + 0x20e0]
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x180016761
mov eax, dword [rbp + 0x20e0]
cmp eax, r13d
jae 0x180016761
imul rax, rax, 0x38
cmp qword [rax + rsi + 8], 0
jne 0x180016761
mov r8d, dword [r12]
xor edx, edx
mov ecx, 0x2000000
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x58], rdi
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x1800166da
lea r8, [rsp + 0x48]
mov edx, 0x2000000
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1800166da
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x50]
mov r9d, ebx
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov edx, 0x2000000
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x1800166da
mov rax, qword [0x18002a8a0]
mov qword [rsp + 0x60], 0
test rax, rax
jne 0x180016472
mov rax, qword [0x18002a890]
test rax, rax
jne 0x18001645b
lea rcx, str.advapi32
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x18002a890], rax
lea rdx, str.ConvertStringSidToSidW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18002a8a0], rax
lea rdx, [rsp + 0x60]
lea rcx, str.S_1_16_12288
call rax
mov rcx, qword [rsp + 0x60]
mov dword [rbp - 0x20], r13d
mov qword [rbp - 0x28], rcx
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov rcx, qword [rsp + 0x50]
lea r8, [rbp - 0x28]
lea r9d, [rax + 0x10]
mov edx, 0x19
call qword [sym.imp.ADVAPI32.dll_SetTokenInformation]
mov rcx, qword [rsp + 0x48]
lea r11, [rbp + 0x20e8]
lea r8, [rbp + 0x90]
mov r9d, 0x2000
mov edx, ebx
mov qword [rsp + 0x20], r11
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x1800166da
mov rdx, qword [rbp + 0x90]
cmp byte [rdx], 1
jne 0x1800166da
cmp byte [rdx + 2], 0
jne 0x1800166da
cmp byte [rdx + 3], 0
jne 0x1800166da
cmp byte [rdx + 4], 0
jne 0x1800166da
cmp byte [rdx + 5], 0
jne 0x1800166da
cmp byte [rdx + 6], 0
jne 0x1800166da
cmp byte [rdx + 7], 5
jne 0x1800166da
cmp byte [rdx + 1], 5
jne 0x1800166da
cmp dword [rdx + 8], 0x15
jne 0x1800166da
mov eax, dword [rbp + 0x20e0]
lea r9, [rbp + 0x20e8]
xor ecx, ecx
imul rax, rax, 0x38
lea r8, [rax + rsi + 0x10]
lea rax, [rbp - 0x78]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x20e8]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x60]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
test eax, eax
je 0x1800166da
mov rax, qword [0x18002a8a8]
mov rbx, qword [rsp + 0x48]
test rax, rax
jne 0x1800165c5
mov rax, qword [0x18002a898]
test rax, rax
jne 0x1800165ae
lea rcx, str.userenv
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x18002a898], rax
lea rdx, str.CreateEnvironmentBlock
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18002a8a8], rax
lea rcx, [rsp + 0x58]
xor r8d, r8d
mov rdx, rbx
call rax
xor edx, edx
lea rcx, [rbp - 0x10]
lea r8d, [rdx + 0x68]
call fcn.18001ca58
mov eax, 1
lea rcx, [rsp + 0x68]
lea r8d, [rax + 0x17]
xor edx, edx
mov dword [rbp - 0x10], 0x68
mov dword [rbp + 0x2c], eax
mov word [rbp + 0x30], ax
call fcn.18001ca58
xor ebx, ebx
lea rcx, [rbp - 0x48]
mov qword [rbp - 0x40], rbx
mov qword [rbp - 0x30], rbx
mov qword [rbp - 0x38], rbx
mov dword [rbp - 0x48], ebx
call fcn.180014260
lea rcx, [rbp - 0x68]
mov edx, 0x1000
mov qword [rbp - 0x60], rbx
mov qword [rbp - 0x50], rbx
mov qword [rbp - 0x58], rbx
mov dword [rbp - 0x68], ebx
call fcn.180004470
mov eax, dword [r14 + 0x20]
mov r9, qword [r14 + 0x18]
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x68]
lea r8, [rbp - 0x70]
mov dword [rsp + 0x20], eax
mov qword [rbp - 0x70], rbx
call fcn.180007f80
test eax, eax
je 0x18001667c
mov rcx, qword [rsp + 0x68]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1800166b1
mov ecx, dword [rbp + 0x20e0]
mov eax, ecx
imul rax, rax, 0x38
mov dword [rax + rsi], ecx
mov ecx, dword [rbp + 0x20e0]
mov eax, dword [rsp + 0x78]
imul rcx, rcx, 0x38
mov dword [rcx + rsi + 4], eax
mov ecx, dword [rbp + 0x20e0]
mov rax, qword [rsp + 0x68]
imul rcx, rcx, 0x38
mov qword [rcx + rsi + 8], rax
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x60]
test rcx, rcx
je 0x1800166cb
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov rcx, qword [rbp - 0x40]
test rcx, rcx
je 0x1800166da
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov rbx, qword [rsp + 0x58]
test rbx, rbx
je 0x18001672c
mov rax, qword [0x18002a8b0]
test rax, rax
jne 0x180016727
mov rax, qword [0x18002a898]
test rax, rax
jne 0x180016710
lea rcx, str.userenv
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x18002a898], rax
lea rdx, str.DestroyEnvironmentBlock
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18002a8b0], rax
mov rcx, rbx
call rax
test rdi, rdi
je 0x18001673a
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x18001674a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x18001675a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 1
xor edi, edi
mov eax, dword [rsp + 0x40]
inc r15d
add r12, 4
shr eax, 2
cmp r15d, eax
jl 0x180016361
mov r14, qword [rbp - 0x80]
mov r12, qword [rsp + 0x21a0]
mov r15, qword [rsp + 0x2190]
lea rbx, [rsi + 8]
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800167bd
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x1800167bd
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rbx - 8], 0xffffffff
mov dword [rbx - 4], edi
mov qword [rbx], rdi
add rbx, 0x38
dec r13
jne 0x180016790
mov r13, qword [rsp + 0x2198]
mov rdi, qword [rsp + 0x21a8]
test r14, r14
je 0x1800167e4
mov rcx, r14
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
xor eax, eax
mov rbx, qword [rsp + 0x21d0]
add rsp, 0x21b0
pop r14
pop rsi
pop rbp
ret