Function at 0x140122820
Capabilities:
Check processdebugport

Disassembly:
push rsi
push r12
push r13
sub rsp, 0xa0
mov r12, rdx
mov r13, rcx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ntdll.dll_RtlCreateQueryDebugBuffer]
mov rsi, rax
test rax, rax
jne 0x140122857
mov eax, 0xc0000001
add rsp, 0xa0
pop r13
pop r12
pop rsi
ret
mov r8, rsi
mov qword [rsp + 0xc0], rbx
mov edx, 0x204
mov rcx, r13
call qword [sym.imp.ntdll.dll_RtlQueryProcessDebugInformation]
mov ebx, eax
test eax, eax
jns 0x140122886
mov rcx, rsi
call qword [sym.imp.ntdll.dll_RtlDestroyQueryDebugBuffer]
mov eax, ebx
jmp 0x140122adf
mov rax, qword [rsi + 0x70]
test rax, rax
jne 0x1401228a5
mov rcx, rsi
call qword [sym.imp.ntdll.dll_RtlDestroyQueryDebugBuffer]
mov eax, 0xc0000001
jmp 0x140122adf
mov eax, dword [rax]
mov edx, 4
mov qword [rsp + 0x90], rdi
mov qword [rsp + 0x80], r15
lea rcx, [rax + rax*4]
lea rbx, [rcx*8 + 0x38]
mov rcx, qword [0x140213cd0]
mov r8, rbx
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
mov r15, rax
call fcn.140163170
mov rcx, qword [rsi + 0x70]
xor r8d, r8d
mov edi, r8d
mov edx, dword [rcx]
mov dword [r15], edx
mov rcx, qword [rsi + 0x98]
mov qword [r15 + 8], rcx
test edx, edx
je 0x140122aa7
mov qword [rsp + 0x98], rbp
mov qword [rsp + 0x88], r14
nop word [rax + rax]
mov edx, edi
lea rcx, [rsp + 0xd8]
imul r14, rdx, 0x58
lea rax, [rdx + rdx*4]
mov qword [rsp + 0x38], r13
add r14, qword [rsi + 0x70]
lea rbp, [r15 + rax*8]
cmp byte [0x1402130ef], 0
mov edx, 0x1010
mov qword [rsp + 0x40], r8
mov eax, dword [r14 + 0x10]
mov dword [rbp + 0x10], eax
mov dword [rbp + 0x14], 0xffffffff
mov eax, dword [r14 + 0x2c]
mov dword [rbp + 0x18], eax
mov rax, qword [r14 + 8]
mov qword [rbp + 0x20], rax
mov rax, qword [r14 + 0x18]
mov qword [rbp + 0x28], rax
mov rax, qword [r14 + 0x20]
mov qword [rbp + 0x30], rax
jne 0x1401229d3
mov qword [rsp + 0x50], r8
lea r9, [rsp + 0x38]
mov dword [rsp + 0x60], r8d
xorps xmm0, xmm0
mov qword [rsp + 0x58], r8
lea r8, [rsp + 0x48]
movdqu xmmword [rsp + 0x68], xmm0
mov dword [rsp + 0x48], 0x30
call qword [sym.imp.ntdll.dll_NtOpenProcess]
cmp eax, 0xc0000022
jne 0x1401229dd
cmp byte [0x1402130ef], 0
nop dword [rax]
je 0x140122a86
mov edx, 0x1010
lea rcx, [rsp + 0xd8]
lea r8, [rsp + 0x38]
call fcn.140123530
nop dword [rax]
test eax, eax
js 0x140122a86
mov rcx, qword [rsp + 0xd8]
lea r8, [rsp + 0x30]
mov ebx, 1
mov qword [rsp + 0x20], 0
lea r9d, [rbx + 7]
lea edx, [rbx + 0x19]
call qword [sym.imp.ntdll.dll_NtQueryInformationProcess]
test eax, eax
js 0x140122a1e
xor ebx, ebx
cmp qword [rsp + 0x30], rbx
sete bl
cmp dword [sym.ProcessHacker.exe_WindowsVersion], 0x3d
mov rax, qword [r14 + 8]
mov dword [rsp + 0xd0], 0xffffffff
jb 0x140122a74
mov rcx, qword ds:[rsp + 0xd8]
lea rdx, [rax + 8]
lea rdx, [rdx + rbx*8]
mov qword [rsp + 0x20], 0
mov r9d, 4
lea r8, [rsp + 0xd0]
call qword [sym.imp.ntdll.dll_NtReadVirtualMemory]
test eax, eax
js 0x140122a74
mov eax, dword [rsp + 0xd0]
mov dword [rbp + 0x14], eax
mov rcx, qword ds:[rsp + 0xd8]
call qword [sym.imp.ntdll.dll_NtClose]
inc edi
mov r8d, 0
cmp edi, dword [r15]
jb 0x140122920
mov r14, qword [rsp + 0x88]
mov rbp, qword [rsp + 0x98]
mov rdi, qword [rsp + 0x90]
test r12, r12
je 0x140122aba
mov qword [r12], r15
jmp 0x140122acc
mov rcx, qword [0x140213cd0]
mov r8, r15
xor edx, edx
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
mov rcx, rsi
call qword [sym.imp.ntdll.dll_RtlDestroyQueryDebugBuffer]
mov r15, qword [rsp + 0x80]
xor eax, eax
mov rbx, qword [rsp + 0xc0]
add rsp, 0xa0
pop r13
pop r12
pop rsi
ret