Function at 0x140113540
Capabilities:
Create thread
Get windows directory from kuser_shared_data
Inject apc
Inject thread
Resume thread

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0xc8
mov rax, qword [0x140237008]
xor rax, rsp
mov qword [rbp + 7], rax
mov rax, qword [rdx]
xor r14d, r14d
add rax, 2
mov qword [rbp - 9], r9
mov qword [rbp - 0x31], rdx
mov r15, r8
mov qword [rbp - 0x49], r14
mov rdi, rcx
mov qword [rbp - 0x41], r14
mov r12d, r14d
mov qword [rbp - 0x39], r14
mov r13d, r14d
mov qword [rbp - 0x11], r14
mov esi, r14d
mov qword [rbp - 0x29], r14
mov qword [rbp - 0x51], r14
mov qword [rbp - 0x21], r14
mov qword [rbp - 0x19], rax
test r8, r8
je 0x1401135b8
mov rax, qword [r8]
add rax, 2
mov qword [rbp - 0x39], rax
mov r9d, 8
mov qword [rsp + 0x20], r14
lea r8, [rbp - 1]
lea edx, [r9 + 0x12]
call qword [sym.imp.ntdll.dll_NtQueryInformationProcess]
mov ebx, eax
test eax, eax
js 0x140113a0c
cmp qword [rbp - 1], rsi
setne al
mov byte [rbp - 0x59], al
lfence
mov rsi, qword [0x1402447d8]
test al, al
je 0x140113718
test rsi, rsi
je 0x140113605
mov r14, qword [0x1402447d0]
jmp 0x140113637
mov esi, 0x7ffe0030
mov ecx, esi
call sym.ProcessHacker.exe_PhCountStringZ
add rax, rax
cmp word [rax + 0x7ffe002e], 0x5c
lea r14, [rax - 2]
cmovne r14, rax
mov qword [0x1402447d0], r14
lock or dword [rsp], r12d
mov qword [0x1402447d8], rsi
mov rdx, qword [0x1402418e8]
lea rbx, [r14 + 0x26]
lea rcx, [rbx + 0x12]
call sym.ProcessHacker.exe_PhCreateObject
mov r12, rax
mov r8, r14
mov rdx, rsi
lea rcx, [rax + 0x10]
mov qword [rax], rbx
mov qword [rax + 8], rcx
xor eax, eax
mov word [rcx + rbx], ax
mov rcx, qword [r12 + 8]
call fcn.140188690
mov rcx, qword [r12 + 8]
lea rbx, [r14 + 0x2c]
movups xmm0, xmmword [str.SysWow64_ntdll.dll]
movups xmmword [rcx + r14], xmm0
movups xmm1, xmmword [0x1401f0b98]
movups xmmword [rcx + r14 + 0x10], xmm1
mov eax, dword [0x1401f0ba8]
mov dword [rcx + r14 + 0x20], eax
movzx eax, word [0x1401f0bac]
mov word [rcx + r14 + 0x24], ax
lea rcx, [rbx + 0x12]
mov rdx, qword [0x1402418e8]
call sym.ProcessHacker.exe_PhCreateObject
mov r13, rax
mov r8, r14
mov rdx, rsi
lea rcx, [rax + 0x10]
mov qword [rax], rbx
mov qword [rax + 8], rcx
xor eax, eax
mov word [rcx + rbx], ax
mov rcx, qword [r13 + 8]
call fcn.140188690
movups xmm0, xmmword [str.SysWow64kernel32.dll]
mov rcx, qword [r13 + 8]
movups xmmword [rcx + r14], xmm0
movups xmm1, xmmword [0x1401f0b58]
movups xmmword [rcx + r14 + 0x10], xmm1
movsd xmm0, qword [0x1401f0b68]
movsd qword [rcx + r14 + 0x20], xmm0
mov eax, dword [0x1401f0b70]
mov dword [rcx + r14 + 0x28], eax
jmp 0x14011382b
test rsi, rsi
je 0x140113726
mov r14, qword [0x1402447d0]
jmp 0x140113758
mov esi, 0x7ffe0030
mov ecx, esi
call sym.ProcessHacker.exe_PhCountStringZ
add rax, rax
cmp word [rax + 0x7ffe002e], 0x5c
lea r14, [rax - 2]
cmovne r14, rax
mov qword [0x1402447d0], r14
lock or dword [rsp], r12d
mov qword [0x1402447d8], rsi
mov rdx, qword [0x1402418e8]
lea rbx, [r14 + 0x26]
lea rcx, [rbx + 0x12]
call sym.ProcessHacker.exe_PhCreateObject
mov r12, rax
xor ecx, ecx
mov r8, r14
mov rdx, rsi
mov qword [rax], rbx
add rax, 0x10
mov qword [r12 + 8], rax
mov word [rax + rbx], cx
mov rcx, qword [r12 + 8]
call fcn.140188690
mov rcx, qword [r12 + 8]
lea rbx, [r14 + 0x2c]
movups xmm0, xmmword [str.System32_ntdll.dll]
add rcx, r14
movups xmmword [rcx], xmm0
movups xmm1, xmmword [0x1401dcd88]
movups xmmword [rcx + 0x10], xmm1
mov eax, dword [0x1401dcd98]
mov dword [rcx + 0x20], eax
movzx eax, word [0x1401dcd9c]
mov word [rcx + 0x24], ax
lea rcx, [rbx + 0x12]
mov rdx, qword [0x1402418e8]
call sym.ProcessHacker.exe_PhCreateObject
mov r13, rax
xor ecx, ecx
mov r8, r14
mov rdx, rsi
mov qword [rax], rbx
add rax, 0x10
mov qword [r13 + 8], rax
mov word [rax + rbx], cx
mov rcx, qword [r13 + 8]
call fcn.140188690
mov rcx, qword [r13 + 8]
movups xmm0, xmmword [str.System32kernel32.dll]
add rcx, r14
movups xmmword [rcx], xmm0
movups xmm1, xmmword [0x1401f0bc0]
movups xmmword [rcx + 0x10], xmm1
movsd xmm0, qword [0x1401f0bd0]
movsd qword [rcx + 0x20], xmm0
mov eax, dword [0x1401f0bd8]
mov dword [rcx + 0x28], eax
mov rdx, qword [r12 + 8]
lea rax, [rbp - 0x11]
xor r14d, r14d
lea r8, str.RtlExitUserThread
mov qword [rsp + 0x28], r14
xor r9d, r9d
mov rcx, rdi
mov qword [rsp + 0x20], rax
call sym.ProcessHacker.exe_PhGetProcedureAddressRemote
mov ebx, eax
test eax, eax
js 0x140113a08
lfence
mov rdx, qword [r13 + 8]
lea rax, [rbp - 0x29]
mov qword [rsp + 0x28], r14
lea r8, str.SetEnvironmentVariableW
xor r9d, r9d
mov qword [rsp + 0x20], rax
mov rcx, rdi
call sym.ProcessHacker.exe_PhGetProcedureAddressRemote
mov ebx, eax
test eax, eax
js 0x140113a08
lfence
mov dword [rsp + 0x28], 4
lea r9, [rbp - 0x19]
xor r8d, r8d
mov dword [rsp + 0x20], 0x1000
lea rdx, [rbp - 0x49]
mov rcx, rdi
call qword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
mov ebx, eax
test eax, eax
js 0x140113a08
lfence
mov r8, qword [rbp - 0x31]
mov rcx, rdi
mov rdx, qword [rbp - 0x49]
mov qword [rsp + 0x20], r14
mov r9, qword [r8]
mov r8, qword [r8 + 8]
call qword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
mov ebx, eax
test eax, eax
js 0x140113a08
test r15, r15
je 0x140113950
lfence
mov dword [rsp + 0x28], 4
lea r9, [rbp - 0x39]
xor r8d, r8d
mov dword [rsp + 0x20], 0x1000
lea rdx, [rbp - 0x41]
mov rcx, rdi
call qword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
mov ebx, eax
test eax, eax
js 0x140113a08
lfence
mov r9, qword [r15]
mov rcx, rdi
mov r8, qword [r15 + 8]
mov rdx, qword [rbp - 0x41]
mov qword [rsp + 0x20], r14
call qword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
mov ebx, eax
test eax, eax
js 0x140113a08
cmp dword [0x140237d34], 0x3e
jb 0x140113972
lfence
lea rdx, [rbp - 0x21]
mov rcx, rdi
call fcn.14011e1a0
mov ebx, eax
test eax, eax
js 0x140113a08
lfence
mov qword [rsp + 0x48], r14
lea rax, [rbp - 0x51]
mov qword [rsp + 0x40], rax
xor r9d, r9d
mov rax, qword [rbp - 0x11]
mov r8b, 1
mov qword [rsp + 0x38], r14
xor edx, edx
mov qword [rsp + 0x30], rax
mov rcx, rdi
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
call qword [sym.imp.ntdll.dll_RtlCreateUserThread]
mov ebx, eax
test eax, eax
js 0x140113a08
mov r9, qword [rbp - 0x41]
mov r8, qword [rbp - 0x49]
mov rdx, qword [rbp - 0x29]
mov rcx, qword [rbp - 0x51]
mov qword [rsp + 0x20], r14
cmp byte [rbp - 0x59], r14b
je 0x1401139d5
call qword [sym.imp.ntdll.dll_RtlQueueApcWow64Thread]
jmp 0x1401139db
call qword [sym.imp.ntdll.dll_NtQueueApcThread]
mov ebx, eax
test eax, eax
js 0x140113a08
mov rcx, qword [rbp - 0x51]
xor edx, edx
call qword [sym.imp.ntdll.dll_NtResumeThread]
mov ebx, eax
test eax, eax
js 0x140113a08
mov r8, qword [rbp - 9]
xor edx, edx
mov rcx, qword [rbp - 0x51]
call qword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov ebx, eax
mov rsi, qword [rbp - 0x21]
mov rcx, qword [rbp - 0x51]
test rcx, rcx
je 0x140113a1b
call qword [sym.imp.ntdll.dll_NtClose]
nop dword [rax + rax]
test rsi, rsi
je 0x140113a2d
mov rcx, rsi
call fcn.14011e2e0
cmp qword [rbp - 0x49], 0
je 0x140113a4f
mov r9d, 0x8000
mov qword [rbp - 0x19], r14
lea r8, [rbp - 0x19]
mov rcx, rdi
lea rdx, [rbp - 0x49]
call qword [sym.imp.ntdll.dll_NtFreeVirtualMemory]
cmp qword [rbp - 0x41], 0
je 0x140113a71
mov r9d, 0x8000
mov qword [rbp - 0x39], r14
lea r8, [rbp - 0x39]
mov rcx, rdi
lea rdx, [rbp - 0x41]
call qword [sym.imp.ntdll.dll_NtFreeVirtualMemory]
mov edi, 0xffffffff
test r12, r12
je 0x140113a91
lea rcx, [r12 - 0x10]
mov eax, edi
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x140113a91
call fcn.1400fbcc0
test r13, r13
je 0x140113aaa
lea rcx, ds:[r13 - 0x10]
lock xadd dword [rcx + 8], edi
cmp edi, 1
jne 0x140113aaa
call fcn.1400fbcc0
mov eax, ebx
mov rcx, qword [rbp + 7]
xor rcx, rsp
call fcn.1401848a0
add rsp, 0xc8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret