Function at 0x7ff7c00ec7c0
Capabilities:
Create thread

Disassembly:
push rbx
push rbp
push r12
sub rsp, 0x90
test byte [0x7ff7c01d0b50], 1
mov rbp, r9
mov r12, rdx
jne 0x7ff7c00ec853
lock bts qword [0x7ff7c01d0b50], 0x1f
jb 0x7ff7c00ec83c
mov ebx, 0x14
nop dword [rax]
mov rcx, qword [0x7ff7c01d3cd0]
mov edx, 4
lea r8d, [rdx + 0x3c]
call qword [sym.imp.kernel32.dll_HeapAlloc_1]
xorps xmm0, xmm0
lea rcx, [0x7ff7c01d6d70]
mov rdx, rax
movaps xmmword [rax], xmm0
movaps xmmword [rax + 0x10], xmm0
movaps xmmword [rax + 0x20], xmm0
movaps xmmword [rax + 0x30], xmm0
call qword [sym.imp.kernel32.dll_InterlockedPushEntrySList]
sub rbx, 1
jne 0x7ff7c00ec7f0
lea rcx, [0x7ff7c01d0b50]
call sym.ProcessHacker.exe_PhfSetEvent
jmp 0x7ff7c00ec853
test byte [0x7ff7c01d0b50], 1
jne 0x7ff7c00ec853
xor edx, edx
lea rcx, [0x7ff7c01d0b50]
call sym.ProcessHacker.exe_PhfWaitForEvent
lea rcx, [0x7ff7c01d6d70]
nop word [rax + rax]
call qword [sym.imp.kernel32.dll_InterlockedPopEntrySList]
mov rbx, rax
test rax, rax
jne 0x7ff7c00ec945
mov rax, qword [0x7ff7c01d75a8]
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x7c], 2
lock cmpxchg qword [0x7ff7c01d75a8], rcx
je 0x7ff7c00ec8bb
nop word [rax + rax]
mov rcx, rax
mov qword [rsp + 0x60], rax
lea rdx, [rsp + 0x60]
lock cmpxchg qword [0x7ff7c01d75a8], rdx
cmp rax, rcx
jne 0x7ff7c00ec8a0
lea rcx, [0x7ff7c01d6d70]
call qword [sym.imp.kernel32.dll_InterlockedPopEntrySList]
mov rbx, rax
test rax, rax
jne 0x7ff7c00ec934
lea rax, [rsp + 0x7c]
lock btr dword [rax], 1
jae 0x7ff7c00ec90b
mov rcx, qword [0x7ff7c01d6d20]
lea rdx, [rsp + 0x60]
xor r9d, r9d
xor r8d, r8d
call qword [sym.imp.ntdll.dll_NtWaitForKeyedEvent]
test eax, eax
js 0x7ff7c00ec92b
je 0x7ff7c00ec90b
lea rdx, [rsp + 0x60]
lea rcx, [0x7ff7c01d75a8]
call sym.ProcessHacker.exe_PhfSetWakeEvent
lea rcx, [0x7ff7c01d6d70]
call qword [sym.imp.kernel32.dll_InterlockedPopEntrySList]
mov rbx, rax
test rax, rax
je 0x7ff7c00ec872
jmp 0x7ff7c00ec945
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlRaiseStatus]
int3
lea rdx, [rsp + 0x60]
lea rcx, [0x7ff7c01d75a8]
call sym.ProcessHacker.exe_PhfSetWakeEvent
cmp qword [rbx + 0x20], 0
mov qword [rsp + 0xb8], rdi
mov qword [rsp + 0x80], r15
jne 0x7ff7c00ec988
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 0x7ff7c00ecaca
cmp qword [rbx + 0x28], 0
mov qword [rsp + 0x88], r14
jne 0x7ff7c00ec9be
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 0x7ff7c00ecac2
mov qword [rsp + 0xb0], rsi
lea rsi, [rbx + 0x30]
mov qword [rsp + 0xc0], r13
xor r13d, r13d
cmp qword [rsi], r13
jne 0x7ff7c00eca46
mov rcx, qword ds:[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 edx, edx
mov qword [rsp + 0x48], rax
xor r9d, r9d
mov qword [rsp + 0x40], rsi
lea rax, [0x7ff7c00ec770]
mov qword [rsp + 0x38], rbx
xor r8d, r8d
mov qword [rsp + 0x30], rax
lea rcx, [rdx - 1]
mov qword [rsp + 0x28], 0x8000
mov qword [rsp + 0x20], r13
call qword [sym.imp.ntdll.dll_RtlCreateUserThread]
mov edi, eax
test eax, eax
js 0x7ff7c00ecab2
mov rcx, qword ds:[rbx + 0x28]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov rcx, qword ds:[rbx + 0x20]
lea rax, [0x7ff7c00ecb10]
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 0x7ff7c00ecab2
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, [0x7ff7c01d6d70]
call qword [sym.imp.kernel32.dll_InterlockedPushEntrySList]
cmp qword [0x7ff7c01d75a8], 0
mov r15, qword [rsp + 0x80]
je 0x7ff7c00ecafa
xor edx, edx
lea rcx, [0x7ff7c01d75a8]
call sym.ProcessHacker.exe_PhfSetWakeEvent
mov eax, edi
mov rdi, qword [rsp + 0xb8]
add rsp, 0x90
pop r12
pop rbp
pop rbx
ret