Function at 0x140007f10
Capabilities:
Check os version

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
sub rsp, 0x160
xor eax, eax
mov rbp, rcx
lea rcx, [rsp + 0x20]
mov dword [rsp + 0x20], eax
mov dword [rsp + 0x24], eax
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x2c], eax
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x34], eax
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x3c], eax
call fcn.1400072b0
test eax, eax
js 0x140007f88
mov esi, dword [rbp]
mov ebx, dword [rsp + 0x24]
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
add rax, rbx
mov rdi, rax
cmp qword [rax + 8], rax
lea rcx, [rax + 8]
je 0x140007f88
mov edx, dword [rsp + 0x20]
sub rdi, rbx
cmp dword [rdx + rdi], esi
je 0x140007fa0
mov rdi, qword [rcx]
cmp qword [rdi + 8], rax
lea rcx, [rdi + 8]
jne 0x140007f73
mov eax, 0xc0000001
mov rbx, qword [rsp + 0x180]
add rsp, 0x160
pop rdi
pop rsi
pop rbp
ret
xor eax, eax
lea rcx, [rsp + 0x44]
xor ebx, ebx
xor edx, edx
mov r8d, 0x118
mov esi, 0xc0000001
mov word [rsp + 0x20], bx
mov qword [rsp + 0x22], rax
mov dword [rsp + 0x2a], eax
mov word [rsp + 0x2e], ax
mov dword [rsp + 0x40], 0x11c
call fcn.14000aca0
lea rdx, str.RtlGetVersion
lea rcx, [rsp + 0x20]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea rcx, [rsp + 0x20]
call qword [sym.imp.ntoskrnl.exe_MmGetSystemRoutineAddress]
test rax, rax
je 0x1400080ac
lea rcx, [rsp + 0x40]
call rax
mov esi, eax
test eax, eax
js 0x1400080cc
mov eax, dword [rsp + 0x4c]
mov qword [rsp + 0x190], rbx
cmp eax, 0xa28
je 0x14000816d
cmp eax, 0xece
jne 0x1400080d3
cmp dword [rsp + 0x44], 5
jne 0x14000816d
cmp dword [rsp + 0x48], 2
jne 0x14000816d
mov rdi, qword [rdi + 0x1f0]
mov rcx, rdi
call qword [sym.imp.ntoskrnl.exe_MmIsAddressValid]
test al, al
je 0x140007f88
mov rdi, qword [rdi + 0x28]
mov rcx, rdi
call qword [sym.imp.ntoskrnl.exe_MmIsAddressValid]
test al, al
je 0x140007f88
mov rcx, qword [rdi]
call qword [sym.imp.ntoskrnl.exe_MmIsAddressValid]
test al, al
je 0x140007f88
mov rcx, qword [rdi]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntoskrnl.exe_MmIsAddressValid]
test al, al
je 0x140007f88
mov rax, qword [rdi]
mov rbx, qword [rax + 0x30]
mov qword [rsp + 0x190], rbx
jmp 0x14000816d
lea r8, [rsp + 0x4c]
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x44]
xor r9d, r9d
call qword [sym.imp.ntoskrnl.exe_PsGetVersion]
test al, al
jne 0x14000800d
mov eax, esi
jmp 0x140007f8d
cmp eax, 0x1770
jb 0x14000816d
cmp dword [rsp + 0x44], 6
jb 0x14000816d
lea rdx, [rsp + 0x188]
lea rcx, str.ntoskrnl.exe
call fcn.140007100
test rax, rax
jne 0x140008138
lea rdx, [rsp + 0x188]
lea rcx, str.ntkrnlpa.exe
call fcn.140007100
test rax, rax
jne 0x140008138
lea rdx, [rsp + 0x188]
lea rcx, str.ntkrpamp.exe
call fcn.140007100
test rax, rax
je 0x140007f88
lea rdx, str.PsReferenceProcessFilePointer
mov rcx, rax
call fcn.140007200
test rax, rax
je 0x140007f88
lea rdx, [rsp + 0x190]
mov rcx, rdi
call rax
test eax, eax
js 0x140007f88
mov rbx, qword [rsp + 0x190]
mov rcx, rbx
call qword [sym.imp.ntoskrnl.exe_MmIsAddressValid]
test al, al
je 0x140007f88
mov rcx, qword [rsp + 0x190]
cmp word [rcx + 0x58], 0
je 0x140007f88
cmp word [rcx + 0x5a], 0
je 0x140007f88
mov rcx, qword [rcx + 0x60]
call qword [sym.imp.ntoskrnl.exe_MmIsAddressValid]
test al, al
je 0x140007f88
mov r8, qword [rsp + 0x190]
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rbp + 0x108]
repne scasw ax, word [rdi]
movzx eax, word [r8 + 0x5a]
not rcx
add rcx, rcx
cmp rcx, rax
ja 0x140007f88
mov r8, qword [r8 + 0x60]
lea rdx, [rbp + 0x108]
nop word [rax + rax]
movzx eax, word [rdx]
add r8, 2
add rdx, 2
mov word [r8 - 2], ax
test ax, ax
jne 0x1400081f0
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rbp + 0x108]
repne scasw ax, word [rdi]
mov rax, qword [rsp + 0x190]
not rcx
dec rcx
add cx, cx
mov word [rax + 0x58], cx
xor eax, eax
jmp 0x140007f8d