Function at 0x1400031f0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get system information on windows
Make suspicious ntquerysysteminformation call

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x68
lea rbp, [rsp + 0x60]
mov qword [rbp], 0xfffffffffffffffe
mov r13, rcx
lea r9, [rbp - 4]
mov dword [r9], 0
xor ebx, ebx
mov ecx, 0x40
xor edx, edx
xor r8d, r8d
call sub.ntdll.dll_NtQuerySystemInformation
cmp eax, 0xc0000004
jne 0x1400034f3
xor edi, edi
mov r15, qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rbx, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
lea rsi, [rbp - 4]
mov rcx, rdi
xor edx, edx
mov r8d, 0x8000
call r15
mov edx, dword [rbp - 4]
xor ecx, ecx
mov r8d, 0x3000
mov r9d, 4
call rbx
mov rdi, rax
mov r8d, dword [rbp - 4]
mov ecx, 0x40
mov rdx, rax
mov r9, rsi
call sub.ntdll.dll_NtQuerySystemInformation
cmp eax, 0xc0000004
je 0x14000324b
test eax, eax
js 0x14000348c
test rdi, rdi
je 0x14000348c
cmp qword [rdi], 0
je 0x140003491
mov rax, rdi
add rax, 0x10
mov qword [rbp - 0x10], rax
mov ebx, 1
xor eax, eax
xor esi, esi
mov r14, rsi
lea rax, [rax + rax*4]
mov rcx, qword [rbp - 0x10]
mov rsi, qword [rcx + rax*8]
mov r12, qword [rcx + rax*8 + 8]
mov r15, qword [rcx + rax*8 + 0x10]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
cmp r12, rcx
cmovne rsi, r14
xor eax, eax
cmp r15, r13
sete al
cmovne rsi, r14
shl eax, 2
cmp r12, rcx
mov ecx, 6
cmovne eax, ecx
cmp eax, 6
je 0x140003304
test eax, eax
jne 0x14000330d
mov eax, ebx
inc ebx
cmp qword [rdi], rax
ja 0x1400032b9
xor ebx, ebx
mov rcx, rdi
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
test rsi, rsi
je 0x1400034f3
lea rdx, [rbp - 0x40]
mov qword [rdx], 0
add rsi, 8
mov r9d, 8
mov rcx, r13
mov r8, rsi
call fcn.140004198
test al, al
je 0x1400034a6
mov r8, qword [rbp - 0x40]
test r8, r8
je 0x1400034a6
lea rdx, [rbp - 0x38]
mov qword [rdx], 0
add r8, 8
mov r9d, 8
mov rcx, r13
call fcn.140004198
test al, al
je 0x1400034b6
mov r8, qword [rbp - 0x38]
test r8, r8
je 0x1400034b6
lea rdx, [rbp - 0x18]
mov qword [rdx], 0
add r8, 0x28
mov r9d, 8
mov rcx, r13
call fcn.140004198
test al, al
je 0x1400034c6
mov r8, qword [rbp - 0x18]
test r8, r8
je 0x1400034c6
xorps xmm0, xmm0
lea rdx, [rbp - 0x30]
movaps xmmword [rdx], xmm0
add r8, 0x58
mov r9d, 0x10
mov rcx, r13
call fcn.140004198
test al, al
je 0x1400034d6
movzx edi, word [rbp - 0x30]
test rdi, rdi
je 0x1400034d6
mov esi, edi
and esi, 0xfffffffe
add rsi, 2
mov rcx, rsi
call fcn.1400128c4
mov rbx, rax
mov rcx, rax
xor edx, edx
mov r8, rsi
call fcn.140018940
movzx r9d, di
mov r8, qword [rbp - 0x28]
mov rcx, r13
mov qword [rbp - 0x10], rbx
mov rdx, rbx
call fcn.140004198
test al, al
je 0x140003506
lea r8, [rbp - 0x30]
mov word [r8], 0
mov rdx, qword [rbp - 0x18]
add rdx, 0x58
mov r9d, 0x10
mov rcx, r13
call fcn.140004198
test al, al
je 0x140003523
lea rcx, [0x140060d00]
lea rdx, str.___MmUnloadedDrivers_Cleaned:
call fcn.140001c6b
mov rsi, rax
mov rcx, rax
mov rdx, qword [rbp - 0x10]
call fcn.140001c6b
mov bl, 1
mov rcx, rsi
call fcn.14000165c
jmp 0x140003540
test rdi, rdi
je 0x1400034f1
xor ebx, ebx
mov rcx, rdi
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x1400034f3
lea rcx, [0x140060d00]
lea rdx, str.____Failed_to_find_device_object
jmp 0x1400034e4
lea rcx, [0x140060d00]
lea rdx, str.____Failed_to_find_driver_object
jmp 0x1400034e4
lea rcx, [0x140060d00]
lea rdx, str.____Failed_to_find_driver_section
jmp 0x1400034e4
lea rcx, [0x140060d00]
lea rdx, str.____Failed_to_find_driver_name
call fcn.140001c6b
mov rcx, rax
call fcn.14000165c
xor ebx, ebx
mov eax, ebx
add rsp, 0x68
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea rcx, [0x140060d00]
lea rdx, str.____Failed_to_read_driver_name
call fcn.140001c6b
mov rcx, rax
call fcn.14000165c
jmp 0x14000353e
lea rcx, [0x140060d00]
lea rdx, str.____Failed_to_write_driver_name_length
call fcn.140001c6b
mov rcx, rax
call fcn.14000165c
xor ebx, ebx
mov rcx, qword [rbp - 0x10]
call fcn.140012890
jmp 0x1400034f3