Function at 0x14039add0
Capabilities:
Connect pipe
Send data
Send data on socket
Write file on windows
Write pipe

Disassembly:
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
push rbx
push rbp
push rdi
push r12
push r13
push r14
sub rsp, 0x68
movsxd rbx, edx
mov r13, rcx
movsxd r12, r9d
mov rdi, r8
lea r14, [rbx + rbx*8]
shl r14, 5
add r14, rcx
xor ecx, ecx
mov dword [rsp + 0x30], ecx
mov rbp, qword [r14 + 0x18]
cmp rbp, 0xffffffffffffffff
jne 0x14039ae68
cmp dword [r13 + 0x4b4], ecx
jne 0x14039ae4d
mov rbx, qword [rsp + 0xc0]
test rbx, rbx
je 0x14039ae4d
mov r8, rbx
lea rdx, str._s__:_write_while_not_connected
mov rcx, r13
call fcn.140151b80
lea rcx, str.E630:__s__:_Write_while_not_connected
call qword [case.0x1400407ae.0]
mov rcx, rax
mov rdx, rbx
call fcn.1401860c0
mov dword [r13 + 0x4b4], 1
xor eax, eax
add rsp, 0x68
pop r14
pop r13
pop r12
pop rdi
pop rbp
pop rbx
ret
mov qword [rsp + 0xb8], rsi
mov qword [rsp + 0x60], r15
cmp dword [r13 + 0x500], ecx
je 0x14039ae93
cmp dword [r14 + 0x98], ecx
jne 0x14039ae93
mov edx, ebx
mov rcx, r13
call fcn.14039ad80
xor ecx, ecx
cmp qword [0x1404608c0], 0
je 0x14039af01
mov r8d, ebx
lea rcx, str.SEND
mov rdx, r13
call fcn.140151ca0
mov rcx, qword [0x1404608c0]
lea rdx, [0x1403c22ec]
call fcn.1400010e0
mov r9, qword [0x1404608c0]
mov rdx, r12
mov r8d, 1
mov rcx, rdi
call fcn.14000ba58
mov rcx, qword [0x1404608c0]
lea rdx, [0x1403c2664]
call fcn.1400010e0
mov rcx, qword [0x1404608c0]
call fcn.1400163cc
xor ecx, ecx
mov dword [0x14045b8cc], ecx
mov eax, 0xffff
jmp 0x14039af20
mov rdi, qword [rsp + 0xb0]
nop dword [rax + rax]
mov rsi, qword [r14 + 0xb8]
test rsi, rsi
je 0x14039af3c
mov r15, qword [rsi + 0x10]
mov esi, dword [rsi]
mov dword [rsp + 0x30], 1
jmp 0x14039af4b
test r12d, r12d
je 0x14039b140
mov r15, rdi
mov esi, r12d
test ebx, ebx
jne 0x14039b00c
xor r9d, r9d
mov r8d, esi
mov rdx, r15
mov rcx, rbp
call qword [sym.imp.WSOCK32.dll_send]
mov ebx, eax
test ebx, ebx
jns 0x14039af88
call fcn.140013154
cmp dword [rax], 0x2733
je 0x14039af86
call fcn.140013154
cmp dword [rax], 0xb
jne 0x14039b295
xor ebx, ebx
cmp dword [r14 + 0x98], 0
je 0x14039b295
mov eax, dword [rsp + 0x30]
mov rdi, qword [r14 + 0xb8]
test eax, eax
je 0x14039afbb
mov r8d, ebx
lea rdx, str.Sent__d_bytes_now
mov rcx, r13
call fcn.1401522a0
mov eax, dword [rsp + 0x30]
cmp ebx, esi
jne 0x14039b160
test rdi, rdi
je 0x14039b122
mov rcx, qword [rdi + 0x10]
test rcx, rcx
je 0x14039afe3
cmp dword [0x14045b3f8], 0
jne 0x14039afe3
call fcn.140005660
xor ecx, ecx
mov qword [rdi + 0x10], rcx
mov qword [rdi], rcx
mov rax, qword [rdi + 0x18]
mov qword [r14 + 0xb8], rax
test rax, rax
jne 0x14039b0f2
mov qword [r14 + 0xc0], rcx
jmp 0x14039b0f6
movsxd rdi, esi
mov ebx, ecx
test esi, esi
je 0x14039b0c3
nop dword [rax]
cmp rdi, rax
mov dword [rsp + 0xa0], ecx
xorps xmm0, xmm0
mov edx, ebx
mov r8d, edi
lea r9, [rsp + 0xa0]
cmova r8d, eax
mov rcx, rbp
lea rax, [rsp + 0x38]
add rdx, r15
mov qword [rsp + 0x20], rax
movups xmmword [rsp + 0x38], xmm0
movups xmmword [rsp + 0x48], xmm0
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14039b09e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x14039b0be
xor r9d, r9d
lea r8, [rsp + 0xa0]
lea rdx, [rsp + 0x38]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x14039b0be
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, dword [rsp + 0xa0]
jmp 0x14039b0a9
mov ecx, dword [rsp + 0xa0]
test ecx, ecx
je 0x14039b0c3
mov eax, ecx
add ebx, ecx
sub rdi, rax
je 0x14039b0c3
xor ecx, ecx
mov eax, 0xffff
jmp 0x14039b020
mov ebx, 0xffffffff
cmp dword [r13 + 0x4c0], 0
je 0x14039af67
test ebx, ebx
jns 0x14039af88
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
xor edx, edx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
jmp 0x14039af6b
mov qword [rax + 0x20], rcx
cmp dword [0x14045b3f8], ecx
mov eax, 0xffff
mov ebx, dword [rsp + 0xa8]
jne 0x14039af10
mov rcx, rdi
call fcn.140005660
xor ecx, ecx
mov eax, 0xffff
jmp 0x14039af10
test eax, eax
je 0x14039b135
lea rdx, str.Write_queue_empty
mov rcx, r13
call fcn.1401522a0
mov dword [r13 + 0x4b4], 0
mov eax, 1
mov rsi, qword [rsp + 0xb8]
mov r15, qword [rsp + 0x60]
add rsp, 0x68
pop r14
pop r13
pop r12
pop rdi
pop rbp
pop rbx
ret
test rdi, rdi
je 0x14039b18c
test ebx, ebx
jle 0x14039b17f
mov rcx, qword [rdi + 0x10]
sub esi, ebx
movsxd rdx, ebx
movsxd r8, esi
add rdx, rcx
call fcn.140003740
sub dword [rdi], ebx
mov r15, qword [rsp + 0xb0]
mov esi, r12d
jmp 0x14039b194
movsxd rax, ebx
add r15, rax
sub esi, ebx
mov r8d, esi
lea rdx, str.Adding__d_bytes_to_the_write_queue
mov rcx, r13
call fcn.1401522a0
mov rbx, qword [r14 + 0xc0]
test rbx, rbx
je 0x14039b1fb
mov ecx, dword [rbx]
lea eax, [rcx + rsi]
cmp eax, 0xfa0
jge 0x14039b1fb
test esi, esi
jle 0x14039b135
mov eax, dword [rbx + 4]
sub eax, ecx
cmp eax, esi
jge 0x14039b1e2
mov edx, esi
mov rcx, rbx
call fcn.1400326e0
cmp eax, 1
jne 0x14039b135
movsxd rcx, dword [rbx]
mov rdx, r15
add rcx, qword [rbx + 0x10]
movsxd r8, esi
call fcn.140003740
add dword [rbx], esi
jmp 0x14039b135
mov edx, 1
lea ecx, [rdx + 0x27]
call fcn.140032b90
mov rbx, rax
test rax, rax
je 0x14039b135
mov rcx, qword [r14 + 0xc0]
mov qword [rax + 0x20], rcx
mov qword [rax + 0x18], 0
mov rax, qword [r14 + 0xc0]
test rax, rax
jne 0x14039b23c
mov qword [r14 + 0xb8], rbx
jmp 0x14039b240
mov qword [rax + 0x18], rbx
mov qword [r14 + 0xc0], rbx
mov qword [rbx + 0x10], 0
mov qword [rbx], 0
mov dword [rbx + 8], 1
mov dword [rbx + 0xc], 0x3e8
test esi, esi
jle 0x14039b135
mov edx, esi
mov rcx, rbx
call fcn.1400326e0
cmp eax, 1
jne 0x14039b135
mov rcx, qword [rbx + 0x10]
mov rdx, r15
movsxd r8, esi
call fcn.140003740
mov dword [rbx], esi
jmp 0x14039b135
cmp ebx, esi
je 0x14039b135
cmp dword [r13 + 0x4b4], 0
jne 0x14039b2de
mov rbx, qword [rsp + 0xc0]
test rbx, rbx
je 0x14039b2de
mov r8, rbx
lea rdx, str._s__:_write_failed
mov rcx, r13
call fcn.140151b80
lea rcx, str.E631:__s__:_Write_failed
call qword [case.0x1400407ae.0]
mov rcx, rax
mov rdx, rbx
call fcn.1401860c0
mov dword [r13 + 0x4b4], 1
xor eax, eax
jmp 0x14039b145