Function at 0x1400da720
Capabilities:
Create pipe
Create thread

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x450
mov rdi, qword [0x14022c040]
movsxd rsi, ecx
mov rcx, qword [rdi]
mov qword [rsp + 0x448], rcx
mov ecx, esi
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov rbx, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 3
je 0x1400d9a78
mov rax, qword [rsp + 0x448]
sub rax, qword [rdi]
jne 0x1400d9b53
add rsp, 0x450
pop rbx
pop rsi
pop rdi
ret
lea rax, [rsp + 0x3c]
mov r9d, 0x3fe
lea r8, [rsp + 0x40]
mov rcx, rbx
mov qword [rsp + 0x20], rax
mov edx, 1
call sub.ntdll.dll_NtQueryObject
test eax, eax
js 0x1400d9a58
cmp dword [rsp + 0x3c], 0xf
jbe 0x1400d9a58
mov rbx, qword [rsp + 0x48]
test rbx, rbx
je 0x1400d9a58
movzx eax, word [rsp + 0x40]
test ax, ax
je 0x1400d9a58
shr ax, 1
xor edx, edx
mov rcx, rbx
movzx eax, ax
mov word [rbx + rax*2], dx
lea rdx, str.msys_
call sub.msvcrt.dll_wcsstr
test rax, rax
je 0x1400d9b10
lea rdx, str._pty
mov rcx, rbx
call sub.msvcrt.dll_wcsstr
test rax, rax
je 0x1400d9a58
cmp esi, 2
je 0x1400d9b30
lea rax, [0x14025adf0]
or dword [rax + rsi*4], 4
jmp 0x1400d9a58
lea rdx, str.cygwin_
mov rcx, rbx
call sub.msvcrt.dll_wcsstr
test rax, rax
jne 0x1400d9ad9
jmp 0x1400d9a58
mov ecx, 2
call qword [fcn.1401de8b0]
mov r9d, 0x200
mov r8d, 4
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_setvbuf
jmp 0x1400d9af6
call fcn.1401d96b0
nop
nop dword [rax]
sub rsp, 0x28
mov edx, dword [0x1401e4984]
cmp edx, 4
je 0x1400d9b7c
mov rcx, qword [0x14025ada8]
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov ecx, dword [0x1401e4980]
cmp ecx, 0xfde9
jne 0x1400d9b90
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
mov rdi, qword [0x14022c040]
mov rcx, qword [rdi]
mov qword [rsp + 0x98], rcx
mov ecx, 1
call fcn.1400d9940
mov ecx, 2
mov ebx, eax
call fcn.1400d9940
xor ecx, ecx
mov esi, eax
call fcn.1400d9940
mov eax, ebx
or eax, esi
je 0x1400da9b8
mov ecx, 0xfffffff5
mov rbp, qword [sym.imp.KERNEL32.dll_GetStdHandle]
call rbp
mov qword [0x14025ada8], rax
mov rcx, rax
cmp rax, 0xffffffffffffffff
je 0x1400da820
lea rdx, [0x1401e4984]
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x1400da820
call qword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
mov dword [0x1401e4980], eax
cmp eax, 0xfde9
je 0x1400da7d3
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov eax, dword [0x1401e4980]
test eax, eax
jne 0x1400da7d3
mov dword [0x1401e4980], 0xfde9
lea rcx, [0x1400d9b60]
call fcn.140001400
mov edx, dword [0x1401e4984]
test dl, 4
jne 0x1400da7fe
or edx, 5
mov rcx, qword [0x14025ada8]
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
test eax, eax
je 0x1400da84c
mov rax, qword [rsp + 0x98]
sub rax, qword [rdi]
jne 0x1400daa61
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov ecx, 0xfffffff4
call rbp
mov qword [0x14025ada8], rax
mov rcx, rax
cmp rax, 0xffffffffffffffff
je 0x1400da84c
lea rdx, [0x1401e4984]
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
jne 0x1400da7a1
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rbp, [rsp + 0x50]
mov edx, 0x1f
lea r8, str..pipewinansi_lu
mov r9d, eax
mov rcx, rbp
call fcn.1400da540
test eax, eax
js 0x1400daa66
mov qword [rsp + 0x38], 0
xor r8d, r8d
mov edx, 2
mov r9d, 1
mov dword [rsp + 0x30], 0
mov rcx, rbp
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x1000
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov qword [0x14025adc0], rax
cmp rax, 0xffffffffffffffff
je 0x1400daa72
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, rbp
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [0x14025adc8], rax
cmp rax, 0xffffffffffffffff
je 0x1400daa8a
mov qword [rsp + 0x28], 0
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], 0
lea r8, [0x1400d9cc0]
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x14025add0], rax
test rax, rax
je 0x1400daa96
lea rcx, [0x1400d98e0]
call fcn.140001400
test eax, eax
jne 0x1400daa7e
test ebx, ebx
jne 0x1400da9f8
mov rbx, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rbp, qword [sym.imp.KERNEL32.dll_DuplicateHandle]
lea r12, [rsp + 0x48]
mov rsi, qword [0x14025adc0]
call rbx
mov dword [rsp + 0x30], 2
mov r9, r12
mov dword [rsp + 0x28], 1
mov rcx, rax
mov r8, rax
mov rdx, rsi
mov dword [rsp + 0x20], 0
call rbp
test eax, eax
je 0x1400daab1
mov rdx, qword [rsp + 0x48]
mov ecx, 2
call fcn.1400da590
mov qword [0x14025adb0], rax
jmp 0x1400da7fe
xor ecx, ecx
call 0x1400d9a20
mov ecx, 1
call 0x1400d9a20
mov rax, qword [rsp + 0x98]
sub rax, qword [rdi]
jne 0x1400daa61
mov ecx, 2
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp 0x1400d9a20
mov r13, qword [0x14025adc0]
mov rbx, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r12, [rsp + 0x48]
call rbx
mov dword [rsp + 0x30], 2
mov rbp, qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov r9, r12
mov dword [rsp + 0x28], 1
mov rcx, rax
mov r8, rax
mov rdx, r13
mov dword [rsp + 0x20], 0
call rbp
test eax, eax
je 0x1400daaa2
mov rdx, qword [rsp + 0x48]
mov ecx, 1
call fcn.1400da590
mov qword [0x14025adb8], rax
test esi, esi
je 0x1400da7fe
jmp 0x1400da961
call fcn.1401d96b0
lea rcx, str.Could_not_initialize_winansi_pipe_name
call fcn.1400b6950
lea rcx, str.CreateNamedPipe_failed
call fcn.1400d9ba0
lea rcx, str.atexit_winansi_exit__failed
call fcn.1400b69e0
lea rcx, str.CreateFile_for_named_pipe_failed
call fcn.1400d9ba0
lea rcx, str.CreateThread_console_thread__failed
call fcn.1400d9ba0
mov edx, r13d
lea rcx, str.DuplicateHandle__li__failed
call fcn.1400d9ba0
mov edx, esi
lea rcx, str.DuplicateHandle__li__failed
call fcn.1400d9ba0
nop