Function at 0x140170910
Capabilities:
Get socket status

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x5a0]
sub rsp, 0x6a0
mov rax, qword [0x1404985c0]
xor rax, rsp
mov qword [rbp + 0x580], rax
xor edi, edi
mov qword [rsp + 0x40], rcx
mov eax, 0x7fffffff
mov qword [rsp + 0x30], rdi
cmp r9, rax
mov rsi, r9
mov r15, r8
mov r14, rdx
cmovge rsi, rax
mov r13, rcx
mov r12d, edi
cmp rcx, 0xffffffffffffffff
jne 0x14017097f
cmp rdx, rcx
jne 0x14017097f
cmp r8, rcx
jne 0x14017097f
mov ecx, esi
call fcn.140170c80
jmp 0x140170c57
mov qword [rsp + 0x698], rbx
test rsi, rsi
jle 0x140170999
mov r12d, esi
call fcn.140166f50
mov rbx, rax
jmp 0x14017099e
mov rbx, qword [rsp + 0x30]
or r8, 0xffffffffffffffff
mov dword [rsp + 0x50], edi
mov ecx, edi
mov r9d, edi
mov dword [rbp + 0x370], ecx
lea eax, [r8 + 2]
cmp r13, r8
je 0x1401709d8
mov qword [rsp + 0x58], r13
mov r9d, eax
mov dword [rsp + 0x50], eax
mov ecx, eax
mov qword [rbp + 0x378], r13
mov r8, r13
mov dword [rbp + 0x370], eax
cmp r14, 0xffffffffffffffff
je 0x140170a6f
mov edx, edi
test r9d, r9d
je 0x140170a00
nop dword [rax]
mov eax, edx
cmp qword [rsp + rax*8 + 0x58], r14
je 0x140170a00
inc edx
cmp edx, r9d
jb 0x1401709f0
cmp edx, r9d
jne 0x140170a1f
cmp r9d, 0x40
jae 0x140170a1f
mov eax, edx
mov qword [rsp + rax*8 + 0x58], r14
mov r9d, dword [rsp + 0x50]
inc r9d
mov dword [rsp + 0x50], r9d
mov edx, edi
test ecx, ecx
je 0x140170a42
nop word [rax + rax]
mov eax, edx
cmp qword [rbp + rax*8 + 0x378], r14
je 0x140170a42
inc edx
cmp edx, ecx
jb 0x140170a30
cmp edx, ecx
jne 0x140170a63
cmp ecx, 0x40
jae 0x140170a63
mov eax, edx
mov qword [rbp + rax*8 + 0x378], r14
mov ecx, dword [rbp + 0x370]
inc ecx
mov dword [rbp + 0x370], ecx
cmp r14, r8
mov eax, 1
cmova r8, r14
mov dword [rbp + 0x160], edi
cmp r15, 0xffffffffffffffff
je 0x140170ac2
mov qword [rbp + 0x168], r15
mov edx, edi
mov dword [rbp + 0x160], eax
test ecx, ecx
je 0x140170aa2
nop
mov eax, edx
cmp qword [rbp + rax*8 + 0x378], r15
je 0x140170aa2
inc edx
cmp edx, ecx
jb 0x140170a90
cmp edx, ecx
jne 0x140170abb
cmp ecx, 0x40
jae 0x140170abb
mov eax, edx
mov qword [rbp + rax*8 + 0x378], r15
inc dword [rbp + 0x370]
cmp r15, r8
cmova r8, r15
test rsi, rsi
lea r13, [rsp + 0x30]
lea r10d, [r8 + 1]
cmovs r13, rdi
mov dword [rsp + 0x38], r10d
test rsi, rsi
jle 0x140170b09
mov eax, 0x10624dd3
mov ecx, r12d
imul r12d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x3e8
mov dword [rsp + 0x30], edx
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [rsp + 0x34], eax
jmp 0x140170b10
jne 0x140170b10
mov qword [rsp + 0x30], rdi
cmp dword [rbp + 0x160], edi
lea r8, [rbp + 0x160]
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x20], r13
cmove r8, rdi
mov ecx, r10d
test r9d, r9d
lea r9, [rbp + 0x370]
cmove rdx, rdi
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x140170b9e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x140170b60
cmp dword [0x1406d4228], edi
jne 0x140170ba2
cmp eax, 0x2714
jne 0x140170ba2
test rsi, rsi
jg 0x140170b74
mov r9d, dword [rsp + 0x50]
mov r10d, dword [rsp + 0x38]
jmp 0x140170ad7
call fcn.140166f50
mov rcx, rax
mov rdx, rbx
call fcn.140166eb0
mov r12d, esi
sub r12d, eax
test r12d, r12d
jle 0x140170bac
mov r9d, dword [rsp + 0x50]
mov r10d, dword [rsp + 0x38]
jmp 0x140170ad7
test eax, eax
jns 0x140170baa
or eax, 0xffffffff
jmp 0x140170c4f
jne 0x140170bb3
xor eax, eax
jmp 0x140170c4f
mov rbx, qword [rsp + 0x40]
cmp rbx, 0xffffffffffffffff
je 0x140170beb
lea rdx, [rsp + 0x50]
mov rcx, rbx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
lea rdx, [rbp + 0x370]
mov eax, 1
mov rcx, rbx
cmovne edi, eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140170beb
or edi, 4
cmp r14, 0xffffffffffffffff
je 0x140170c1b
lea rdx, [rsp + 0x50]
mov rcx, r14
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140170c05
or edi, 8
lea rdx, [rbp + 0x370]
mov rcx, r14
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140170c1b
or edi, 4
cmp r15, 0xffffffffffffffff
je 0x140170c4d
lea rdx, [rbp + 0x160]
mov rcx, r15
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140170c37
or edi, 2
lea rdx, [rbp + 0x370]
mov rcx, r15
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140170c4d
or edi, 4
mov eax, edi
mov rbx, qword [rsp + 0x698]
mov rcx, qword [rbp + 0x580]
xor rcx, rsp
call fcn.1402fea30
add rsp, 0x6a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret