Function at 0x1400e6a10
Capabilities:
Create thread

Disassembly:
push rbx
push rbp
push r12
sub rsp, 0x90
test byte [0x14018e190], 1
mov rbp, r9
mov r12, rdx
jne 0x1400e6ab9
lock bts qword [0x14018e190], 0x1f
jae 0x1400e6a54
test byte [0x14018e190], 1
jne 0x1400e6ab9
xor edx, edx
lea rcx, [0x14018e190]
call sym.ProcessHacker.exe_PhfWaitForEvent
jmp 0x1400e6ab9
mov ebx, 0x14
nop dword [rax]
mov rcx, qword [0x140196670]
mov edx, 4
lea r8d, [rdx + 0x3c]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
xor ecx, ecx
mov rdx, rax
mov qword [rax], rcx
mov qword [rax + 8], rcx
mov qword [rax + 0x10], rcx
mov qword [rax + 0x18], rcx
mov qword [rax + 0x20], rcx
mov qword [rax + 0x28], rcx
mov qword [rax + 0x30], rcx
mov qword [rax + 0x38], rcx
lea rcx, [0x140196450]
call qword [sym.imp.ntdll.dll_RtlInterlockedPushEntrySList]
sub rbx, 1
jne 0x1400e6a60
lea rcx, [0x14018e190]
call sym.ProcessHacker.exe_PhfSetEvent
lea rcx, [0x140196450]
call qword [sym.imp.ntdll.dll_RtlInterlockedPopEntrySList]
mov rbx, rax
test rax, rax
jne 0x1400e6ba0
mov rcx, qword [0x140193998]
lea rdx, [rsp + 0x60]
mov qword [rsp + 0x60], rcx
mov rax, rcx
mov dword [rsp + 0x7c], 2
lock cmpxchg qword [0x140193998], rdx
cmp rax, rcx
je 0x1400e6b1b
nop dword [rax]
mov rcx, rax
mov qword [rsp + 0x60], rax
lea rdx, [rsp + 0x60]
lock cmpxchg qword [0x140193998], rdx
cmp rax, rcx
jne 0x1400e6b00
lea rcx, [0x140196450]
call qword [sym.imp.ntdll.dll_RtlInterlockedPopEntrySList]
mov rbx, rax
test rax, rax
jne 0x1400e6b8f
lea rax, [rsp + 0x7c]
lock btr dword [rax], 1
jae 0x1400e6b6b
mov rcx, qword [0x140196248]
lea rdx, [rsp + 0x60]
xor r9d, r9d
xor r8d, r8d
call qword [sym.imp.ntdll.dll_NtWaitForKeyedEvent]
test eax, eax
js 0x1400e6b86
je 0x1400e6b6b
lea rdx, [rsp + 0x60]
lea rcx, [0x140193998]
call sym.ProcessHacker.exe_PhfSetWakeEvent
lea rcx, [0x140196450]
call qword [sym.imp.ntdll.dll_RtlInterlockedPopEntrySList]
mov rbx, rax
test rax, rax
je 0x1400e6ad2
jmp 0x1400e6ba0
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlRaiseStatus]
int3
lea rdx, [rsp + 0x60]
lea rcx, [0x140193998]
call sym.ProcessHacker.exe_PhfSetWakeEvent
cmp qword [rbx + 0x20], 0
mov qword [rsp + 0xb8], rdi
mov qword [rsp + 0x80], r15
jne 0x1400e6bde
mov r9d, 1
mov byte [rsp + 0x20], 0
xor r8d, r8d
lea rcx, [rbx + 0x20]
mov edx, 0x1f0003
call qword [sym.imp.ntdll.dll_NtCreateEvent]
mov edi, eax
test eax, eax
js 0x1400e6d18
cmp qword [rbx + 0x28], 0
mov qword [rsp + 0x88], r14
jne 0x1400e6c14
mov r9d, 1
mov byte [rsp + 0x20], 0
xor r8d, r8d
lea rcx, [rbx + 0x28]
mov edx, 0x1f0003
call qword [sym.imp.ntdll.dll_NtCreateEvent]
mov edi, eax
test eax, eax
js 0x1400e6d10
mov qword [rsp + 0xb0], rsi
lea rsi, [rbx + 0x30]
mov qword [rsp + 0xc0], r13
xor r13d, r13d
cmp qword [rsi], r13
jne 0x1400e6c99
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.ntdll.dll_NtClearEvent]
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.ntdll.dll_NtClearEvent]
lea rax, [rsp + 0x50]
xor r9d, r9d
mov qword [rsp + 0x48], rax
xor r8d, r8d
mov qword [rsp + 0x40], rsi
lea rax, [0x1400e69c0]
mov qword [rsp + 0x38], rbx
xor edx, edx
mov qword [rsp + 0x30], rax
or rcx, 0xffffffffffffffff
mov qword [rsp + 0x28], 0x8000
mov qword [rsp + 0x20], r13
call qword [sym.imp.ntdll.dll_RtlCreateUserThread]
mov edi, eax
test eax, eax
js 0x1400e6d00
mov rcx, qword [rbx + 0x28]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov rcx, qword [rbx + 0x20]
lea rax, [0x1400e6d60]
xor edx, edx
mov qword [rbx + 0x10], rax
mov qword [rbx + 0x18], r12
call qword [sym.imp.ntdll.dll_NtSetEvent]
mov rcx, qword [rbx + 0x28]
mov r8, rbp
xor edx, edx
call qword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov edi, eax
mov qword [rbx + 0x10], r13
lock or dword [rsp], r13d
mov qword [rbx + 0x18], r13
test eax, eax
je 0x1400e6d00
mov rcx, qword [rsi]
mov edi, 0xc0000001
mov edx, edi
call qword [sym.imp.ntdll.dll_NtTerminateThread]
mov rcx, qword [rsi]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov rcx, qword [rsi]
call qword [sym.imp.ntdll.dll_NtClose]
mov qword [rsi], r13
mov r13, qword [rsp + 0xc0]
mov rsi, qword [rsp + 0xb0]
mov r14, qword [rsp + 0x88]
mov rdx, rbx
lea rcx, [0x140196450]
call qword [sym.imp.ntdll.dll_RtlInterlockedPushEntrySList]
cmp qword [0x140193998], 0
mov r15, qword [rsp + 0x80]
je 0x1400e6d48
xor edx, edx
lea rcx, [0x140193998]
call sym.ProcessHacker.exe_PhfSetWakeEvent
mov eax, edi
mov rdi, qword [rsp + 0xb8]
add rsp, 0x90
pop r12
pop rbp
pop rbx
ret