Function at 0x140015610
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rdi
push r15
lea rbp, [rsp - 0xbf90]
mov eax, 0xc090
call fcn.1400526c0
sub rsp, rax
mov rax, qword [0x1400af210]
xor rax, rsp
mov qword [rbp + 0xbf80], rax
movzx eax, byte [rcx + 0x170]
xor edi, edi
mov qword [rsp + 0x30], rdi
mov rbx, rcx
lea r15d, [rdi + 1]
test al, al
je 0x14001565f
xor eax, eax
jmp 0x1400157fa
test dword [rbx + 0x18c], 0x2000
mov ecx, edi
mov qword [rsp + 0xc0c0], r14
mov r14d, edi
mov dword [rsp + 0x50], ecx
mov dword [rbp + 0x7f70], edi
mov dword [rbp + 0x3f60], edi
mov qword [rsp + 0x38], 0xffffffffffffffff
je 0x1400156ad
mov rcx, rbx
call fcn.140014ca0
mov ecx, dword [rsp + 0x50]
cmp eax, r15d
jne 0x1400156ad
test byte [rbx + 0x18c], 4
cmove r15d, edi
mov eax, dword [rbx + 0x18c]
and eax, 4
mov qword [rsp + 0xc0b8], rsi
test al, al
jne 0x14001579b
movzx eax, byte [rbx + 0x170]
test al, al
jne 0x1400156fa
lea rax, [rsp + 0x38]
mov rcx, rbx
lea r9, [rbp + 0x3f60]
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x7f70]
lea rdx, [rsp + 0x50]
call fcn.140013970
test eax, eax
jne 0x14001570f
lea rdx, str.Could_not_obtain_daemon_fdsets
mov rcx, rbx
call fcn.14001d140
mov r14d, 1
mov ecx, dword [rsp + 0x50]
mov rsi, qword [rbx + 0x160]
cmp rsi, 0xffffffffffffffff
je 0x140015914
cmp ecx, 0x800
jb 0x1400158e6
lea rdx, [rsp + 0x50]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x1400158e2
mov rdx, qword [rbx + 0x150]
cmp rdx, 0xffffffffffffffff
je 0x1400158dc
movzx eax, byte [rbx + 0x171]
test al, al
jne 0x1400158dc
mov ecx, dword [rsp + 0x50]
mov r8d, edi
test ecx, ecx
je 0x140015885
nop word [rax + rax]
mov eax, r8d
cmp qword [rsp + rax*8 + 0x58], rdx
je 0x140015854
inc r8d
cmp r8d, ecx
jb 0x140015780
jmp 0x140015885
mov rsi, qword [rbx + 0x150]
cmp rsi, 0xffffffffffffffff
je 0x140015713
movzx eax, byte [rbx + 0x171]
test al, al
jne 0x14001570f
mov ecx, dword [rsp + 0x50]
cmp ecx, 0x800
jb 0x140015821
lea rdx, [rsp + 0x50]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x14001581d
lea rdx, str.Could_not_add_listen_socket_to_fdset
mov rcx, rbx
call fcn.14001d140
xor eax, eax
mov rsi, qword [rsp + 0xc0b8]
mov r14, qword [rsp + 0xc0c0]
mov rcx, qword [rbp + 0xbf80]
xor rcx, rsp
call fcn.140052350
mov rbx, qword [rsp + 0xc0c8]
add rsp, 0xc090
pop r15
pop rdi
pop rbp
ret
mov ecx, dword [rsp + 0x50]
mov edx, edi
test ecx, ecx
je 0x140015836
mov eax, edx
cmp rsi, qword [rsp + rax*8 + 0x58]
je 0x140015836
inc edx
cmp edx, ecx
jb 0x140015827
cmp edx, ecx
jne 0x140015713
mov eax, ecx
mov qword [rsp + rax*8 + 0x58], rsi
mov ecx, dword [rsp + 0x50]
inc ecx
mov dword [rsp + 0x50], ecx
jmp 0x140015713
lea eax, [rcx - 1]
cmp r8d, eax
jae 0x14001587f
nop dword [rax]
mov ecx, r8d
lea edx, [r8 + 1]
mov rax, qword [rsp + rdx*8 + 0x58]
mov r8d, edx
mov qword [rsp + rcx*8 + 0x58], rax
mov ecx, dword [rsp + 0x50]
lea eax, [rcx - 1]
cmp edx, eax
jb 0x140015860
dec ecx
mov dword [rsp + 0x50], ecx
mov rsi, qword [rbx + 0x160]
cmp rsi, 0xffffffffffffffff
je 0x1400158c7
cmp ecx, 0x800
jb 0x1400158b0
lea rdx, [rsp + 0x50]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x1400158c7
mov ecx, dword [rsp + 0x50]
mov edx, edi
test ecx, ecx
je 0x1400158ff
mov eax, edx
cmp rsi, qword [rsp + rax*8 + 0x58]
je 0x1400158ff
inc edx
cmp edx, ecx
jb 0x1400158b6
jmp 0x1400158ff
lea rdx, str.Could_not_add_control_inter_thread_communication_channel_FD_to_fdset
mov rcx, rbx
call fcn.14001d140
mov r14d, 1
mov ecx, dword [rsp + 0x50]
jmp 0x140015914
mov ecx, dword [rsp + 0x50]
mov edx, edi
test ecx, ecx
je 0x1400158ff
nop dword [rax]
mov eax, edx
cmp rsi, qword [rsp + rax*8 + 0x58]
je 0x1400158ff
inc edx
cmp edx, ecx
jb 0x1400158f0
cmp edx, ecx
jne 0x140015914
mov eax, ecx
mov qword [rsp + rax*8 + 0x58], rsi
mov ecx, dword [rsp + 0x50]
inc ecx
mov dword [rsp + 0x50], ecx
mov rdx, qword [rbx + 0x150]
cmp rdx, 0xffffffffffffffff
je 0x140015995
cmp qword [rbx + 0x160], 0xffffffffffffffff
je 0x140015995
mov eax, dword [rbx + 0x17c]
cmp dword [rbx + 0x178], eax
je 0x140015942
cmp byte [rbx + 0x172], dil
je 0x140015995
mov r8d, edi
test ecx, ecx
je 0x140015995
nop dword [rax]
mov eax, r8d
cmp qword [rsp + rax*8 + 0x58], rdx
je 0x140015964
inc r8d
cmp r8d, ecx
jb 0x140015950
jmp 0x140015995
lea eax, [rcx - 1]
cmp r8d, eax
jae 0x14001598f
nop dword [rax]
mov ecx, r8d
lea edx, [r8 + 1]
mov rax, qword [rsp + rdx*8 + 0x58]
mov r8d, edx
mov qword [rsp + rcx*8 + 0x58], rax
mov ecx, dword [rsp + 0x50]
lea eax, [rcx - 1]
cmp edx, eax
jb 0x140015970
dec ecx
mov dword [rsp + 0x50], ecx
cmp r14d, 1
mov eax, edi
mov rsi, rdi
cmovne eax, r15d
test eax, eax
jne 0x1400159b2
mov qword [rsp + 0x30], rdi
lea rsi, [rsp + 0x30]
jmp 0x140015a20
mov eax, dword [rbx + 0x18c]
and eax, 4
test al, al
jne 0x140015a20
lea rdx, [rsp + 0x40]
mov rcx, rbx
call fcn.140015350
cmp eax, 1
jne 0x140015a1c
mov rcx, qword [rsp + 0x40]
lea rsi, [rsp + 0x30]
mov r8, rcx
movabs rax, 0x624dd2f1a9fbe77
mul rcx
sub r8, rdx
shr r8, 1
add r8, rdx
shr r8, 9
imul eax, r8d, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [rsp + 0x34], eax
mov eax, 0x7fffffff
cmp r8, rax
cmova r8d, eax
mov dword [rsp + 0x30], r8d
mov ecx, dword [rsp + 0x50]
test ecx, ecx
jne 0x140015a61
cmp dword [rbp + 0x7f70], edi
jne 0x140015a61
cmp dword [rbp + 0x3f60], edi
jne 0x140015a61
test rsi, rsi
jne 0x140015a3d
mov eax, edi
jmp 0x140015a81
mov eax, 0x10624dd3
imul dword [rsi + 4]
imul eax, dword [rsi], 0x3e8
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add ecx, eax
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, edi
jmp 0x140015a81
lea r9, [rbp + 0x3f60]
mov qword [rsp + 0x20], rsi
lea r8, [rbp + 0x7f70]
xor ecx, ecx
lea rdx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_select]
movzx ecx, byte [rbx + 0x170]
test cl, cl
jne 0x1400157e8
test eax, eax
jns 0x140015abf
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
je 0x140015ae3
mov ecx, eax
call fcn.14001c600
mov r8, rax
lea rdx, str.select_failed:__s_n
mov rcx, rbx
call fcn.14001d140
jmp 0x1400157e8
lea r9, [rbp + 0x3f60]
mov rcx, rbx
lea r8, [rbp + 0x7f70]
lea rdx, [rsp + 0x50]
call fcn.1400154a0
cmp eax, 1
jne 0x1400157e8
test r14d, r14d
sete dil
mov eax, edi
jmp 0x1400157ea