Function at 0x1401585c0
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 [0x1402b5020]
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 0x140158633
mov rax, qword [r8]
add rax, 2
mov qword [rbp - 0x59], rax
mov r9d, 8
mov qword [rsp + 0x20], r15
lea r8, [rbp + 7]
lea edx, [r9 + 0x12]
call qword [sym.imp.ntdll.dll_NtQueryInformationProcess]
mov ebx, eax
test eax, eax
js 0x1401588a1
cmp qword ds:[rbp + 7], r15
lea rax, [0x1402bbac8]
mov qword [rsp + 0xe8], r12
lea r15, [0x1402bbc08]
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 0x140158896
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 0x140158899
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 0x140158899
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 0x140158899
nop
test rsi, rsi
je 0x14015879c
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 0x140158899
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 0x140158899
cmp dword [0x1402b5e88], 0x3e
jb 0x1401587be
lfence
lea rdx, [rbp - 0x31]
mov rcx, rdi
call fcn.140165700
mov ebx, eax
test eax, eax
js 0x140158886
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.14013dba0
mov rsi, qword [rbp - 0x39]
mov ebx, eax
test eax, eax
js 0x140158875
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 0x140158822
call qword [sym.imp.ntdll.dll_RtlQueueApcWow64Thread]
nop
jmp 0x140158828
call qword [sym.imp.ntdll.dll_NtQueueApcThread]
mov ebx, eax
test eax, eax
js 0x140158875
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ntdll.dll_NtResumeThread]
mov ebx, eax
test eax, eax
js 0x140158875
mov r8, r13
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov ebx, eax
test eax, eax
js 0x140158875
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 0x140158886
mov rcx, rsi
call qword [sym.imp.ntdll.dll_NtClose]
mov rcx, qword [rbp - 0x31]
test rcx, rcx
je 0x140158899
call fcn.140165800
jmp 0x140158899
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 0x1401588dd
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 0x1401588ff
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.1401dd6a0
add rsp, 0xf8
pop r15
pop rdi
pop rbx
pop rbp
ret