Function at 0x140393fd0
Capabilities:
Connect pipe
Get socket status

Disassembly:
push rbx
push rdi
push r14
sub rsp, 0x480
mov rax, qword [0x14041f010]
xor rax, rsp
mov qword [rsp + 0x460], rax
mov ebx, r8d
mov r14, rdx
mov rdi, rcx
test r8d, r8d
jle 0x140394008
lea rdx, str.Waiting_for_up_to__d_msec
call fcn.1401522a0
mov qword [rsp + 0x4b8], rsi
mov qword [rsp + 0x478], r12
mov qword [rsp + 0x470], r15
cmp r14, qword [rdi + 0x18]
je 0x1403940d9
call qword [sym.imp.KERNEL32.dll_GetTickCount]
lea esi, [rbx + rax]
mov ebx, 1
nop dword [rax + rax]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], 0
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x140394073
cmp dword [rsp + 0x30], 0
ja 0x1403942ed
cmp dword [rdi + 0x4c0], 0
je 0x140394092
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
jmp 0x140394096
test eax, eax
je 0x1403940cf
call fcn.14039bdd0
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, esi
sub edx, eax
test edx, edx
jle 0x140394233
cmp edx, ebx
mov ecx, ebx
cmovle ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
add ebx, ebx
cmp ebx, 0xa
jle 0x140394040
mov ebx, 0xa
jmp 0x140394040
mov eax, 2
jmp 0x140394238
mov eax, 0x10624dd3
movsxd rsi, r14d
imul ebx
lea r12, str.channel_write_input
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x3e8
mov dword [rsp + 0x30], edx
sub ebx, eax
imul eax, ebx, 0x3e8
mov dword [rsp + 0x34], eax
nop word [rax + rax]
mov r8, qword [0x140468020]
lea r10d, [r14 + 1]
xor edx, edx
mov qword [rsp + 0x258], rsi
mov dword [rsp + 0x250], 1
mov dword [rsp + 0x40], edx
test r8, r8
je 0x1403941e8
nop dword [rax]
mov r9, qword [r8 + 0x378]
cmp r9, 0xffffffffffffffff
je 0x1403941dc
cmp qword [r8 + 0x418], 0
mov rax, qword [r8 + 0x470]
jne 0x140394192
test rax, rax
je 0x1403941dc
cmp dword [r8 + 0x488], 0
je 0x14039417e
mov eax, dword [rax]
cmp dword [r8 + 0x490], eax
jge 0x1403941dc
jmp 0x140394192
mov ecx, dword [r8 + 0x48c]
cmp ecx, dword [r8 + 0x490]
jg 0x1403941dc
cmp ecx, dword [rax]
jg 0x1403941dc
xor eax, eax
test edx, edx
je 0x1403941ad
movsxd r9, r9d
nop dword [rax + rax]
cmp qword [rsp + rax*8 + 0x48], r9
je 0x1403941ad
inc eax
cmp eax, edx
jb 0x1403941a0
cmp eax, edx
jne 0x1403941cc
cmp edx, 0x40
jae 0x1403941cc
movsxd rdx, dword [r8 + 0x378]
mov qword [rsp + rax*8 + 0x48], rdx
mov edx, dword [rsp + 0x40]
inc edx
mov dword [rsp + 0x40], edx
mov eax, dword [r8 + 0x378]
cmp eax, r10d
jl 0x1403941dc
lea r10d, [rax + 1]
mov r8, qword [r8]
test r8, r8
jne 0x140394140
lea rax, [rsp + 0x30]
xor r9d, r9d
lea r8, [rsp + 0x40]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x250]
mov ecx, r10d
call qword [sym.imp.WSOCK32.dll_select]
mov edi, eax
call fcn.140013154
mov rbx, rax
call qword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov dword [rbx], eax
cmp edi, 0xffffffff
jne 0x14039426c
call fcn.140013154
cmp dword [rax], 0x2714
je 0x140394110
mov eax, 1
mov r15, qword [rsp + 0x470]
mov r12, qword [rsp + 0x478]
mov rsi, qword [rsp + 0x4b8]
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.140001200
add rsp, 0x480
pop r14
pop rdi
pop rbx
ret
test edi, edi
jle 0x140394233
lea rdx, [rsp + 0x250]
mov rcx, r14
call qword [sym.imp.WSOCK32.dll___WSAFDIsSet]
test eax, eax
jne 0x1403942ed
mov rbx, qword [0x140468020]
test rbx, rbx
je 0x140394110
cmp qword [rbx + 0x418], 0
je 0x1403942bc
xor r9d, r9d
mov qword [rsp + 0x20], r12
lea r8, [0x1403b051f]
mov rcx, rbx
lea edx, [r9 + 3]
call fcn.14039ad60
jmp 0x1403942e0
mov rcx, qword [rbx + 0x470]
test rcx, rcx
je 0x1403942e0
cmp dword [rbx + 0x488], 0
je 0x1403942d8
call fcn.14039b620
jmp 0x1403942e0
mov rcx, rbx
call fcn.14039a8c0
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140394295
jmp 0x140394110
xor eax, eax
jmp 0x140394238