Function at 0x140045010
Capabilities:
Create pipe
Write file on windows

Disassembly:
sub rsp, 0xa8
test byte [0x140155830], 1
jne 0x14004530e
lock bts qword [0x140155830], 0x1f
jae 0x140045052
test byte [0x140155830], 1
jne 0x14004530e
xor edx, edx
lea rcx, [0x140155830]
add rsp, 0xa8
jmp sym.ProcessHacker.exe_PhfWaitForEvent
mov qword [rsp + 0xa0], rbx
lea rcx, [rsp + 0xb8]
xor r9d, r9d
mov qword [rsp + 0x98], rdi
xor r8d, r8d
mov byte [rsp + 0x20], 0
mov edx, 0x1f0003
call qword [sym.imp.ntdll.dll_NtCreateEvent]
xor edi, edi
test eax, eax
js 0x14004510b
mov r8, qword [rsp + 0xb8]
lea rdx, [0x140044f50]
xor ecx, ecx
call sym.ProcessHacker.exe_PhCreateThread
mov rbx, rax
test rax, rax
je 0x1400450fd
mov rcx, rax
call fcn.140044e30
test al, al
je 0x1400450e4
lea r9d, [rdi + 0x10]
mov qword [rsp + 0x20], rdi
lea r8, [rsp + 0x50]
mov rcx, rbx
lea edx, [rdi + 0x15]
call qword [sym.imp.ntdll.dll_NtQueryInformationThread]
movzx ecx, word [0x140153da8]
test eax, eax
cmovns cx, word [rsp + 0x58]
mov word [0x140153da8], cx
mov rcx, qword [rsp + 0xb8]
xor edx, edx
call qword [sym.imp.ntdll.dll_NtSetEvent]
mov rcx, rbx
call qword [sym.imp.ntdll.dll_NtClose]
mov rcx, qword [rsp + 0xb8]
call qword [sym.imp.ntdll.dll_NtClose]
xor r9d, r9d
mov byte [rsp + 0x20], dil
xor r8d, r8d
lea rcx, [rsp + 0xb8]
mov edx, 0x1f0003
call qword [sym.imp.ntdll.dll_NtCreateEvent]
test eax, eax
js 0x1400451b5
mov r8, qword [rsp + 0xb8]
lea rdx, [0x140044f80]
xor ecx, ecx
call sym.ProcessHacker.exe_PhCreateThread
mov rbx, rax
test rax, rax
je 0x1400451a7
mov rcx, rax
call fcn.140044e30
test al, al
je 0x14004518e
mov r9d, 0x10
mov qword [rsp + 0x20], rdi
lea r8, [rsp + 0x60]
mov rcx, rbx
lea edx, [r9 + 5]
call qword [sym.imp.ntdll.dll_NtQueryInformationThread]
movzx ecx, word [0x1401539d8]
test eax, eax
cmovns cx, word [rsp + 0x68]
mov word [0x1401539d8], cx
mov rcx, qword [rsp + 0xb8]
xor edx, edx
call qword [sym.imp.ntdll.dll_NtSetEvent]
mov rcx, rbx
call qword [sym.imp.ntdll.dll_NtClose]
mov rcx, qword [rsp + 0xb8]
call qword [sym.imp.ntdll.dll_NtClose]
xor r9d, r9d
lea rdx, [rsp + 0xc8]
xor r8d, r8d
lea rcx, [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x1400452a8
mov r8, qword [rsp + 0xc0]
lea rdx, [0x140044fc0]
xor ecx, ecx
call sym.ProcessHacker.exe_PhCreateThread
mov rbx, rax
test rax, rax
je 0x14004528c
mov rcx, rax
mov dword [rsp + 0xb0], edi
call fcn.140044e30
test al, al
je 0x140045241
mov r9d, 0x10
mov qword [rsp + 0x20], rdi
lea r8, [rsp + 0x70]
mov rcx, rbx
lea edx, [r9 + 5]
call qword [sym.imp.ntdll.dll_NtQueryInformationThread]
movzx ecx, word [0x140153c98]
test eax, eax
cmovns cx, word [rsp + 0x78]
mov word [0x140153c98], cx
mov rcx, qword [rsp + 0xc8]
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x40], rdi
xor r9d, r9d
mov qword [rsp + 0x38], rdi
xor r8d, r8d
mov dword [rsp + 0x30], 4
xor edx, edx
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtWriteFile]
mov rcx, rbx
call qword [sym.imp.ntdll.dll_NtClose]
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.ntdll.dll_NtClose]
mov rcx, qword [rsp + 0xc8]
call qword [sym.imp.ntdll.dll_NtClose]
lock bts qword [0x140155830], 0
jb 0x1400452fe
mov rbx, qword [0x140155838]
test rbx, rbx
je 0x1400452cb
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ntdll.dll_NtSetEvent]
mov rax, 0xfffffffffffffffe
lock xadd qword [0x140155830], rax
shr rax, 1
and eax, 0x7fff
cmp rax, 1
jne 0x1400452fe
test rbx, rbx
je 0x1400452fe
mov rcx, rbx
call qword [sym.imp.ntdll.dll_NtClose]
mov qword [0x140155838], rdi
mov rbx, qword [rsp + 0xa0]
mov rdi, qword [rsp + 0x98]
add rsp, 0xa8
ret