Function at 0x140001400
Capabilities:
Get system information on windows
Make suspicious ntquerysysteminformation call

Disassembly:
push rbx
push rsi
push r13
push r15
sub rsp, 0x78
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov r13d, r8d
mov qword [rsp + 0x48], rcx
mov r15, rdx
mov ebx, 0x400
xor esi, esi
nop dword [rax]
add ebx, ebx
mov rcx, rsi
mov edx, ebx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov rsi, rax
test rax, rax
je 0x1400016bc
xor r9d, r9d
mov r8d, ebx
mov rdx, rax
lea ecx, [r9 + 0x10]
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
je 0x140001430
test eax, eax
je 0x1400014d6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x30], 0
mov r9d, 0x800
mov ebx, eax
mov dword [rsp + 0x28], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x48], 0
mov r8d, ebx
mov qword [rsp + 0x20], rax
xor edx, edx
mov ecx, 0x1300
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
mov r9, qword [rsp + 0x48]
lea rdx, [0x140003388]
mov r8d, ebx
lea rcx, str.____The_function__S_failed_with_error_code__d____S
call fcn.140001010
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
jmp 0x14000165b
mov qword [rsp + 0xb8], rbp
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x68], r12
mov r12d, dword [rsi]
mov qword [rsp + 0x60], r14
xor r14d, r14d
test r12d, r12d
je 0x1400016a0
lea rbp, [rsi + 0xe]
movzx r8d, word [rbp - 6]
cmp r8d, dword [r15]
je 0x140001690
xor edx, edx
lea ecx, [rdx + 0x40]
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x140001690
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
movzx edx, word [rbp]
lea r9, [rsp + 0x40]
mov dword [rsp + 0x30], 0
mov r8, rax
mov dword [rsp + 0x28], 0
mov rcx, rbx
mov dword [rsp + 0x20], r13d
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x14000156c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140001690
mov ecx, 0x400
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x140001598
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140001690
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x50]
mov r9d, 0x400
mov qword [rsp + 0x20], rax
mov r8, rdi
mov edx, 2
call qword [sym.imp.ntdll.dll_NtQueryObject]
test eax, eax
jne 0x140001673
mov rdx, qword [rdi + 8]
xor eax, eax
nop dword [rax]
lea rcx, str.Process
movzx ecx, word [rcx + rax*2]
inc rax
cmp cx, word [rdx + rax*2 - 2]
jne 0x140001673
cmp rax, 8
jne 0x1400015d0
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetProcessId]
cmp eax, dword [r15]
jne 0x14000157f
mov rax, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
mov qword [rax], rcx
call qword [sym.imp.KERNEL32.dll_GetProcessId]
mov edx, eax
lea rcx, str.___Process_handle_to_PID__d_with_the_desired_permissions_duplicated_successfully_n
call fcn.140001010
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, 1
mov r12, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x70]
mov rbp, qword [rsp + 0xb8]
mov r14, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400020f0
add rsp, 0x78
pop r15
pop r13
pop rsi
pop rbx
ret
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc r14d
add rbp, 0x18
cmp r14d, r12d
jb 0x140001500
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edx, dword [r15]
lea rcx, str.____No_open_handles_with_the_desired_permissions_to_PID__d_found._n
call fcn.140001010
xor eax, eax
jmp 0x140001644
lea rcx, str.____Failed_to_realloc__n
call fcn.140001010
xor eax, eax
jmp 0x14000165b