Function at 0x1400172a0
Capabilities:
Get socket status

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x678
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x250], 0
mov dword [rsp + 0x460], 0
test edx, edx
je 0x1400175b4
mov edx, edx
mov rbx, rcx
mov rax, rcx
xor r10d, r10d
shl rdx, 4
lea rsi, [rcx + rdx]
nop dword [rax + rax]
mov rdx, qword [rax]
xor edi, edi
mov word [rax + 0xa], di
cmp rdx, 0xffffffffffffffff
je 0x14001732e
movzx r11d, word [rax + 8]
test r11w, 0x710
je 0x14001732e
test r11w, 0x300
jne 0x140017540
test r11b, 0x10
jne 0x1400174e0
test r11w, 0x600
jne 0x140017480
add rax, 0x10
cmp rax, rsi
jne 0x1400172f0
test r10d, r10d
je 0x1400175a0
lea rcx, [rsp + 0x38]
mov rdx, r8
call sym.curlx_mstotv
mov r11d, dword [rsp + 0x460]
xor r9d, r9d
test r11d, r11d
je 0x140017365
lea r9, [rsp + 0x460]
mov r10d, dword [rsp + 0x250]
xor r8d, r8d
test r10d, r10d
je 0x14001737d
lea r8, [rsp + 0x250]
mov ecx, dword [rsp + 0x40]
xor edx, edx
test ecx, ecx
jne 0x140017590
mov qword [rsp + 0x20], rax
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
mov edi, eax
test eax, eax
jle 0x1400175e0
xor edi, edi
lea r13, [rsp + 0x40]
lea r12, [rsp + 0x250]
lea rbp, [rsp + 0x460]
nop dword [rax]
mov rcx, qword [rbx]
xor eax, eax
mov word [rbx + 0xa], ax
cmp rcx, 0xffffffffffffffff
je 0x140017441
mov rdx, r13
call sym.__WSAFDIsSet
test eax, eax
je 0x1400173f5
movzx eax, word [rbx + 8]
test ah, 1
je 0x1400173ea
or word [rbx + 0xa], 0x100
test ah, 3
je 0x1400173f5
or word [rbx + 0xa], 0x300
mov rcx, qword [rbx]
mov rdx, r12
call sym.__WSAFDIsSet
test eax, eax
je 0x14001740f
test byte [rbx + 8], 0x10
je 0x14001740f
or word [rbx + 0xa], 0x10
mov rcx, qword [rbx]
mov rdx, rbp
call sym.__WSAFDIsSet
test eax, eax
je 0x140017470
movzx edx, word [rbx + 8]
movzx eax, word [rbx + 0xa]
mov ecx, edx
and cx, 0x400
and dh, 2
je 0x140017460
or ah, 2
mov word [rbx + 0xa], ax
test cx, cx
jne 0x140017465
add edi, 1
add rbx, 0x10
cmp rbx, rsi
jne 0x1400173c0
mov eax, edi
add rsp, 0x678
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
test cx, cx
je 0x140017470
or ah, 4
mov word [rbx + 0xa], ax
jmp 0x14001743e
cmp word [rbx + 0xa], 0
je 0x140017441
jmp 0x14001743e
mov r11d, dword [rsp + 0x460]
test r11d, r11d
je 0x14001760d
lea r9, [rsp + 0x468]
xor ecx, ecx
jmp 0x1400174ac
add ecx, 1
add r9, 8
cmp ecx, r11d
je 0x1400174b1
cmp rdx, qword [r9]
jne 0x1400174a0
cmp r11d, 0x40
je 0x14001732e
cmp r11d, ecx
jne 0x14001732e
add r11d, 1
mov qword [rsp + rcx*8 + 0x468], rdx
mov dword [rsp + 0x460], r11d
jmp 0x14001732e
mov edi, dword [rsp + 0x250]
test edi, edi
je 0x140017601
lea r9, [rsp + 0x258]
xor ecx, ecx
jmp 0x14001750b
add ecx, 1
add r9, 8
cmp ecx, edi
je 0x140017510
cmp rdx, qword [r9]
jne 0x140017500
cmp edi, 0x40
je 0x140017322
cmp edi, ecx
jne 0x140017322
add edi, 1
mov qword [rsp + rcx*8 + 0x258], rdx
mov dword [rsp + 0x250], edi
jmp 0x140017322
test r10d, r10d
je 0x14001761a
lea r9, [rsp + 0x48]
xor ecx, ecx
jmp 0x140017564
add ecx, 1
add r9, 8
cmp ecx, r10d
je 0x140017569
cmp rdx, qword [r9]
jne 0x140017558
cmp r10d, ecx
jne 0x140017318
cmp r10d, 0x40
je 0x140017318
add r10d, 1
mov qword [rsp + rcx*8 + 0x48], rdx
mov dword [rsp + 0x40], r10d
jmp 0x140017318
lea rdx, [rsp + 0x40]
jmp 0x14001738b
mov eax, dword [rsp + 0x250]
or eax, dword [rsp + 0x460]
jne 0x140017340
test r8, r8
je 0x1400175d0
js 0x140017627
mov eax, 0xfffffffe
cmp r8, rax
cmovle rax, r8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
jmp 0x14001744e
cmp eax, 0xffffffff
jne 0x14001744e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
xor edi, edi
cmp eax, 0x2714
setne dil
neg edi
jmp 0x14001744e
xor ecx, ecx
mov edi, 1
jmp 0x140017524
xor ecx, ecx
mov r11d, 1
jmp 0x1400174c8
xor ecx, ecx
mov r10d, 1
jmp 0x140017580
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
jmp 0x1400175e9