Function at 0x140132320
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x580]
sub rsp, 0x680
mov rax, qword [0x1401d4770]
xor rax, rsp
mov qword [rbp + 0x570], rax
xor r13d, r13d
mov esi, edx
mov r12, r8
mov r14, rcx
test rcx, rcx
je 0x14013237d
mov eax, r13d
test edx, edx
je 0x14013237d
mov rdx, rcx
lea ecx, [r13 + 0x10]
cmp qword [rdx], 0xffffffffffffffff
jne 0x1401323af
inc eax
add rdx, rcx
cmp eax, esi
jb 0x14013236e
mov rcx, r12
call fcn.1401327e0
mov rcx, qword [rbp + 0x570]
xor rcx, rsp
call fcn.140140c60
mov rbx, qword [rsp + 0x6c8]
add rsp, 0x680
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov edx, r13d
mov dword [rsp + 0x40], r13d
mov dword [rbp + 0x360], edx
mov r9d, r13d
mov r10d, r13d
mov dword [rbp + 0x150], r13d
or rdi, 0xffffffffffffffff
mov r15d, r13d
mov rbx, r14
mov r8, qword [rbx]
mov word [rbx + 0xa], r13w
cmp r8, 0xffffffffffffffff
je 0x1401324e4
jae 0x14013250b
movzx r11d, word [rbx + 8]
mov eax, 0x710
test ax, r11w
je 0x1401324df
cmp r8, rdi
mov rax, r8
cmovbe rax, rdi
mov rdi, rax
mov eax, 0x300
test ax, r11w
je 0x140132454
mov ecx, r13d
test r9d, r9d
je 0x140132430
mov eax, ecx
cmp qword [rsp + rax*8 + 0x48], r8
je 0x140132430
inc ecx
cmp ecx, r9d
jb 0x140132420
cmp ecx, r9d
jne 0x14013244f
cmp r9d, 0x40
jae 0x14013244f
mov eax, ecx
mov qword [rsp + rax*8 + 0x48], r8
mov r9d, dword [rsp + 0x40]
inc r9d
mov dword [rsp + 0x40], r9d
mov ecx, reloc.WS2_32.dll_recv
test cl, r11b
je 0x14013249a
mov ecx, r13d
test r10d, r10d
je 0x140132474
mov eax, ecx
cmp qword [rbp + rax*8 + 0x158], r8
je 0x140132474
inc ecx
cmp ecx, r10d
jb 0x140132461
cmp ecx, r10d
jne 0x14013249a
cmp r10d, 0x40
jae 0x14013249a
mov eax, ecx
mov qword [rbp + rax*8 + 0x158], r8
mov r10d, dword [rbp + 0x150]
inc r10d
mov dword [rbp + 0x150], r10d
mov eax, 0x600
test ax, r11w
je 0x1401324df
mov ecx, r13d
test edx, edx
je 0x1401324be
mov eax, ecx
cmp qword [rbp + rax*8 + 0x368], r8
je 0x1401324be
inc ecx
cmp ecx, edx
jb 0x1401324ac
cmp ecx, edx
jne 0x1401324df
cmp edx, 0x40
jae 0x1401324df
mov eax, ecx
mov qword [rbp + rax*8 + 0x368], r8
mov edx, dword [rbp + 0x360]
inc edx
mov dword [rbp + 0x360], edx
mov ecx, reloc.WS2_32.dll_recv
inc r15d
add rbx, rcx
cmp r15d, esi
jb 0x1401323d4
test r9d, r9d
jne 0x14013251e
test r10d, r10d
jne 0x14013251e
test edx, edx
jne 0x14013251e
mov rcx, r12
call fcn.1401327e0
jmp 0x140132574
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
jmp 0x140132385
mov rdx, r12
lea rcx, [rsp + 0x30]
call fcn.14013edc0
mov ecx, dword [rbp + 0x360]
neg ecx
mov qword [rsp + 0x20], rax
lea rcx, [rbp + 0x360]
sbb r9, r9
and r9, rcx
mov ecx, dword [rbp + 0x150]
neg ecx
lea rcx, [rbp + 0x150]
sbb r8, r8
and r8, rcx
mov ecx, dword [rsp + 0x40]
neg ecx
lea rcx, [rsp + 0x40]
sbb rdx, rdx
and rdx, rcx
lea ecx, [rdi + 1]
call qword [sym.imp.WS2_32.dll_select]
mov ebx, eax
test eax, eax
jg 0x140132595
cmp eax, 0xffffffff
jne 0x14013258e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
cmove ebx, r13d
mov eax, ebx
jmp 0x140132385
lea rbx, [r14 + 0xa]
mov edi, r13d
mov r14d, 0x200
mov eax, reloc.WS2_32.dll_recv
mov r12d, 0x100
mov r15d, 0x400
mov rcx, qword [rbx - 0xa]
mov word [rbx], r13w
cmp rcx, 0xffffffffffffffff
je 0x140132650
lea rdx, [rsp + 0x40]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1401325f2
test word [rbx - 2], r12w
je 0x1401325de
or word [rbx], r12w
movzx eax, word [rbx]
mov ecx, 0x300
test word [rbx - 2], cx
je 0x1401325f2
or ax, cx
mov word [rbx], ax
mov rcx, qword [rbx - 0xa]
lea rdx, [rbp + 0x150]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140132613
mov eax, reloc.WS2_32.dll_recv
test byte [rbx - 2], al
je 0x140132613
or word [rbx], ax
mov rcx, qword [rbx - 0xa]
lea rdx, [rbp + 0x360]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140132643
test word [rbx - 2], r14w
je 0x140132632
or word [rbx], r14w
movzx eax, word [rbx]
test word [rbx - 2], r15w
je 0x140132643
or ax, r15w
mov word [rbx], ax
mov eax, reloc.WS2_32.dll_recv
cmp word [rbx], r13w
je 0x140132650
inc edi
add rbx, rax
sub rsi, 1
jne 0x1401325b3
mov eax, edi
jmp 0x140132385