Function at 0x140160180
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 [0x1402bf040]
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 0x1401601f3
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 0x140160461
cmp qword ds:[rbp + 7], r15
lea rax, [0x1402c5e48]
mov qword [rsp + 0xe8], r12
lea r15, [0x1402c5f88]
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 0x140160456
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 0x140160459
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 0x140160459
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 0x140160459
nop
test rsi, rsi
je 0x14016035c
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 0x140160459
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 0x140160459
cmp dword [0x1402bff40], 0x3e
jb 0x14016037e
lfence
lea rdx, [rbp - 0x31]
mov rcx, rdi
call fcn.14016dea0
mov ebx, eax
test eax, eax
js 0x140160446
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.140142780
mov rsi, qword [rbp - 0x39]
mov ebx, eax
test eax, eax
js 0x140160435
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 0x1401603e2
call qword [sym.imp.ntdll.dll_RtlQueueApcWow64Thread]
nop
jmp 0x1401603e8
call qword [sym.imp.ntdll.dll_NtQueueApcThread]
mov ebx, eax
test eax, eax
js 0x140160435
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ntdll.dll_NtResumeThread]
mov ebx, eax
test eax, eax
js 0x140160435
mov r8, r13
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov ebx, eax
test eax, eax
js 0x140160435
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 0x140160446
mov rcx, rsi
call qword [sym.imp.ntdll.dll_NtClose]
mov rcx, qword [rbp - 0x31]
test rcx, rcx
je 0x140160459
call fcn.14016dfa0
jmp 0x140160459
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 0x14016049d
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 0x1401604bf
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.1401e4a20
add rsp, 0xf8
pop r15
pop rdi
pop rbx
pop rbp
ret