Function at 0x14039ad60
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 0x14039adf8
cmp dword [r13 + 0x4b4], ecx
jne 0x14039addd
mov rbx, qword [rsp + 0xc0]
test rbx, rbx
je 0x14039addd
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 0x14039ae23
cmp dword [r14 + 0x98], ecx
jne 0x14039ae23
mov edx, ebx
mov rcx, r13
call fcn.14039ad10
xor ecx, ecx
cmp qword [0x1404608c0], 0
je 0x14039ae91
mov r8d, ebx
lea rcx, str.SEND
mov rdx, r13
call fcn.140151ca0
mov rcx, qword [0x1404608c0]
lea rdx, [0x1403c22cc]
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, [0x1403c2644]
call fcn.1400010e0
mov rcx, qword [0x1404608c0]
call fcn.1400163cc
xor ecx, ecx
mov dword [0x14045b8cc], ecx
mov eax, 0xffff
jmp 0x14039aeb0
mov rdi, qword [rsp + 0xb0]
nop dword [rax + rax]
mov rsi, qword [r14 + 0xb8]
test rsi, rsi
je 0x14039aecc
mov r15, qword [rsi + 0x10]
mov esi, dword [rsi]
mov dword [rsp + 0x30], 1
jmp 0x14039aedb
test r12d, r12d
je 0x14039b0d0
mov r15, rdi
mov esi, r12d
test ebx, ebx
jne 0x14039af9c
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 0x14039af18
call fcn.140013154
cmp dword [rax], 0x2733
je 0x14039af16
call fcn.140013154
cmp dword [rax], 0xb
jne 0x14039b225
xor ebx, ebx
cmp dword [r14 + 0x98], 0
je 0x14039b225
mov eax, dword [rsp + 0x30]
mov rdi, qword [r14 + 0xb8]
test eax, eax
je 0x14039af4b
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 0x14039b0f0
test rdi, rdi
je 0x14039b0b2
mov rcx, qword [rdi + 0x10]
test rcx, rcx
je 0x14039af73
cmp dword [0x14045b3f8], 0
jne 0x14039af73
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 0x14039b082
mov qword [r14 + 0xc0], rcx
jmp 0x14039b086
movsxd rdi, esi
mov ebx, ecx
test esi, esi
je 0x14039b053
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 0x14039b02e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x14039b04e
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 0x14039b04e
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, dword [rsp + 0xa0]
jmp 0x14039b039
mov ecx, dword [rsp + 0xa0]
test ecx, ecx
je 0x14039b053
mov eax, ecx
add ebx, ecx
sub rdi, rax
je 0x14039b053
xor ecx, ecx
mov eax, 0xffff
jmp 0x14039afb0
mov ebx, 0xffffffff
cmp dword [r13 + 0x4c0], 0
je 0x14039aef7
test ebx, ebx
jns 0x14039af18
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
xor edx, edx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
jmp 0x14039aefb
mov qword [rax + 0x20], rcx
cmp dword [0x14045b3f8], ecx
mov eax, 0xffff
mov ebx, dword [rsp + 0xa8]
jne 0x14039aea0
mov rcx, rdi
call fcn.140005660
xor ecx, ecx
mov eax, 0xffff
jmp 0x14039aea0
test eax, eax
je 0x14039b0c5
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 0x14039b11c
test ebx, ebx
jle 0x14039b10f
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 0x14039b124
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 0x14039b18b
mov ecx, dword [rbx]
lea eax, [rcx + rsi]
cmp eax, 0xfa0
jge 0x14039b18b
test esi, esi
jle 0x14039b0c5
mov eax, dword [rbx + 4]
sub eax, ecx
cmp eax, esi
jge 0x14039b172
mov edx, esi
mov rcx, rbx
call fcn.1400326e0
cmp eax, 1
jne 0x14039b0c5
movsxd rcx, dword [rbx]
mov rdx, r15
add rcx, qword [rbx + 0x10]
movsxd r8, esi
call fcn.140003740
add dword [rbx], esi
jmp 0x14039b0c5
mov edx, 1
lea ecx, [rdx + 0x27]
call fcn.140032b90
mov rbx, rax
test rax, rax
je 0x14039b0c5
mov rcx, qword [r14 + 0xc0]
mov qword [rax + 0x20], rcx
mov qword [rax + 0x18], 0
mov rax, qword [r14 + 0xc0]
test rax, rax
jne 0x14039b1cc
mov qword [r14 + 0xb8], rbx
jmp 0x14039b1d0
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 0x14039b0c5
mov edx, esi
mov rcx, rbx
call fcn.1400326e0
cmp eax, 1
jne 0x14039b0c5
mov rcx, qword [rbx + 0x10]
mov rdx, r15
movsxd r8, esi
call fcn.140003740
mov dword [rbx], esi
jmp 0x14039b0c5
cmp ebx, esi
je 0x14039b0c5
cmp dword [r13 + 0x4b4], 0
jne 0x14039b26e
mov rbx, qword [rsp + 0xc0]
test rbx, rbx
je 0x14039b26e
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 0x14039b0d5