Function at 0x140160e00
Capabilities:
Inject apc
Resume thread

Disassembly:
mov r11, rsp
push rbp
push rbx
push rdi
push r15
lea rbp, [r11 - 0x5f]
sub rsp, 0xf8
mov rax, qword [0x1402c0040]
xor rax, rsp
mov qword [rbp + 0xf], rax
mov rax, qword [rdx]
xor r15d, r15d
mov qword [r11 - 0x28], rsi
add rax, 2
mov qword [r11 - 0x38], r13
mov r13, r9
mov qword [r11 - 0x40], r14
mov rsi, r8
mov qword [rbp - 0x69], r15
mov r14, rdx
mov qword [rbp - 0x61], r15
mov rdi, rcx
mov qword [rbp - 0x59], r15
mov qword [rbp - 0x41], r15
mov qword [rbp - 0x51], r15
mov qword [rbp - 0x39], r15
mov qword [rbp - 0x31], r15
mov qword [rbp - 0x49], rax
test r8, r8
je 0x140160e73
mov rax, qword [r8]
add rax, 2
mov qword [rbp - 0x59], rax
mov r9d, 8
mov qword [rsp + 0x20], r15
lea r8, [rbp + 7]
mov edx, 0x1a
call qword [sym.imp.ntdll.dll_NtQueryInformationProcess]
mov ebx, eax
test eax, eax
js 0x1401610e1
cmp qword ds:[rbp + 7], r15
lea rax, [0x1402c6d88]
mov qword [rsp + 0xe8], r12
lea r15, [0x1402c6ec8]
setne r12b
test r12b, r12b
cmove r15, rax
lfence
xor r9d, r9d
lea rax, [rbp - 0x41]
mov qword [rsp + 0x28], r9
lea r8, str.RtlExitUserThread
mov rdx, r15
mov qword [rsp + 0x20], rax
mov rcx, rdi
call sym.SystemInformer.exe_PhGetProcedureAddressRemote
mov ebx, eax
test eax, eax
js 0x1401610d6
lfence
lea rdx, [r15 + 0x10]
xor r9d, r9d
lea rax, [rbp - 0x51]
xor r15d, r15d
mov qword [rsp + 0x28], r15
lea r8, str.SetEnvironmentVariableW
mov rcx, rdi
mov qword [rsp + 0x20], rax
call sym.SystemInformer.exe_PhGetProcedureAddressRemote
mov ebx, eax
test eax, eax
js 0x1401610d9
lfence
mov dword [rsp + 0x28], 4
lea r9, [rbp - 0x49]
xor r8d, r8d
mov dword [rsp + 0x20], 0x1000
lea rdx, [rbp - 0x69]
mov rcx, rdi
call qword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
mov ebx, eax
test eax, eax
js 0x1401610d9
lfence
mov r9, qword [r14]
mov rcx, rdi
mov r8, qword [r14 + 8]
mov rdx, qword [rbp - 0x69]
mov qword [rsp + 0x20], r15
call qword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
mov ebx, eax
test eax, eax
js 0x1401610d9
nop
test rsi, rsi
je 0x140160fdc
lfence
mov dword [rsp + 0x28], 4
lea r9, [rbp - 0x59]
xor r8d, r8d
mov dword [rsp + 0x20], 0x1000
lea rdx, [rbp - 0x61]
mov rcx, rdi
call qword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
mov ebx, eax
test eax, eax
js 0x1401610d9
lfence
mov r9, qword [rsi]
mov rcx, rdi
mov r8, qword [rsi + 8]
mov rdx, qword [rbp - 0x61]
mov qword [rsp + 0x20], r15
call qword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
mov ebx, eax
test eax, eax
js 0x1401610d9
cmp dword [0x1402c0f40], 0x3e
jb 0x140160ffe
lfence
lea rdx, [rbp - 0x31]
mov rcx, rdi
call fcn.14016eb20
mov ebx, eax
test eax, eax
js 0x1401610c6
lfence
mov qword [rsp + 0x48], r15
lea rax, [rbp - 0x39]
mov qword [rsp + 0x40], rax
mov r8d, 1
mov rax, qword [rbp - 0x41]
mov rcx, rdi
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
call fcn.140142ae0
mov rsi, qword [rbp - 0x39]
mov ebx, eax
test eax, eax
js 0x1401610b5
mov r9, qword [rbp - 0x61]
mov rcx, rsi
mov r8, qword [rbp - 0x69]
mov rdx, qword [rbp - 0x51]
mov qword [rsp + 0x20], r15
test r12b, r12b
je 0x140161062
call qword [sym.imp.ntdll.dll_RtlQueueApcWow64Thread]
nop
jmp 0x140161068
call qword [sym.imp.ntdll.dll_NtQueueApcThread]
mov ebx, eax
test eax, eax
js 0x1401610b5
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ntdll.dll_NtResumeThread]
mov ebx, eax
test eax, eax
js 0x1401610b5
mov r8, r13
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov ebx, eax
test eax, eax
js 0x1401610b5
mov r9d, 0x30
mov qword [rsp + 0x20], r15
lea r8, [rbp - 0x29]
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ntdll.dll_NtQueryInformationThread]
test eax, eax
mov ebx, eax
cmovns ebx, dword [rbp - 0x29]
test rsi, rsi
je 0x1401610c6
mov rcx, rsi
call qword [sym.imp.ntdll.dll_NtClose]
mov rcx, qword [rbp - 0x31]
test rcx, rcx
je 0x1401610d9
call fcn.14016ec20
jmp 0x1401610d9
xor r15d, r15d
mov r12, qword [rsp + 0xe8]
cmp qword ds:[rbp - 0x69], 0
mov r14, qword [rsp + 0xd8]
mov r13, qword [rsp + 0xe0]
mov rsi, qword [rsp + 0xf0]
je 0x14016111d
mov r9d, 0x8000
mov qword [rbp - 0x49], r15
lea r8, [rbp - 0x49]
mov rcx, rdi
lea rdx, [rbp - 0x69]
call qword [sym.imp.ntdll.dll_NtFreeVirtualMemory]
cmp qword [rbp - 0x61], 0
je 0x14016113f
mov r9d, 0x8000
mov qword [rbp - 0x59], r15
lea r8, [rbp - 0x59]
mov rcx, rdi
lea rdx, [rbp - 0x61]
call qword [sym.imp.ntdll.dll_NtFreeVirtualMemory]
mov eax, ebx
mov rcx, qword [rbp + 0xf]
xor rcx, rsp
call fcn.1401e5e20
add rsp, 0xf8
pop r15
pop rdi
pop rbx
pop rbp
ret