Function at 0x14012c7c0
Capabilities:
Create thread

Disassembly:
push rbx
push rbp
push r12
sub rsp, 0x90
test byte [0x140210b50], 1
mov rbp, r9
mov r12, rdx
jne 0x14012c853
lock bts qword [0x140210b50], 0x1f
jb 0x14012c83c
mov ebx, 0x14
nop dword [rax]
mov rcx, qword [0x140213cd0]
mov edx, 4
lea r8d, [rdx + 0x3c]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
xorps xmm0, xmm0
lea rcx, [0x140216d70]
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.ntdll.dll_RtlInterlockedPushEntrySList]
sub rbx, 1
jne 0x14012c7f0
lea rcx, [0x140210b50]
call sym.ProcessHacker.exe_PhfSetEvent
jmp 0x14012c853
test byte [0x140210b50], 1
jne 0x14012c853
xor edx, edx
lea rcx, [0x140210b50]
call sym.ProcessHacker.exe_PhfWaitForEvent
lea rcx, [0x140216d70]
nop word [rax + rax]
call qword [sym.imp.ntdll.dll_RtlInterlockedPopEntrySList]
mov rbx, rax
test rax, rax
jne 0x14012c945
mov rax, qword [0x1402175a8]
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x7c], 2
lock cmpxchg qword [0x1402175a8], rcx
je 0x14012c8bb
nop word [rax + rax]
mov rcx, rax
mov qword [rsp + 0x60], rax
lea rdx, [rsp + 0x60]
lock cmpxchg qword [0x1402175a8], rdx
cmp rax, rcx
jne 0x14012c8a0
lea rcx, [0x140216d70]
call qword [sym.imp.ntdll.dll_RtlInterlockedPopEntrySList]
mov rbx, rax
test rax, rax
jne 0x14012c934
lea rax, [rsp + 0x7c]
lock btr dword [rax], 1
jae 0x14012c90b
mov rcx, qword [0x140216d20]
lea rdx, [rsp + 0x60]
xor r9d, r9d
xor r8d, r8d
call qword [sym.imp.ntdll.dll_NtWaitForKeyedEvent]
test eax, eax
js 0x14012c92b
je 0x14012c90b
lea rdx, [rsp + 0x60]
lea rcx, [0x1402175a8]
call sym.ProcessHacker.exe_PhfSetWakeEvent
lea rcx, [0x140216d70]
call qword [sym.imp.ntdll.dll_RtlInterlockedPopEntrySList]
mov rbx, rax
test rax, rax
je 0x14012c872
jmp 0x14012c945
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlRaiseStatus]
int3
lea rdx, [rsp + 0x60]
lea rcx, [0x1402175a8]
call sym.ProcessHacker.exe_PhfSetWakeEvent
cmp qword [rbx + 0x20], 0
mov qword [rsp + 0xb8], rdi
mov qword [rsp + 0x80], r15
jne 0x14012c988
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 0x14012caca
cmp qword [rbx + 0x28], 0
mov qword [rsp + 0x88], r14
jne 0x14012c9be
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 0x14012cac2
mov qword [rsp + 0xb0], rsi
lea rsi, [rbx + 0x30]
mov qword [rsp + 0xc0], r13
xor r13d, r13d
cmp qword [rsi], r13
jne 0x14012ca46
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, [0x14012c770]
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 0x14012cab2
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, [0x14012cb10]
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 0x14012cab2
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, [0x140216d70]
call qword [sym.imp.ntdll.dll_RtlInterlockedPushEntrySList]
cmp qword [0x1402175a8], 0
mov r15, qword [rsp + 0x80]
je 0x14012cafa
xor edx, edx
lea rcx, [0x1402175a8]
call sym.ProcessHacker.exe_PhfSetWakeEvent
mov eax, edi
mov rdi, qword [rsp + 0xb8]
add rsp, 0x90
pop r12
pop rbp
pop rbx
ret