Function at 0x1400160d0
Capabilities:
Get socket status

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r15
lea rbp, [rsp - 0x5d8]
sub rsp, 0x6d8
mov rax, qword [0x1400a45d0]
xor rax, rsp
mov qword [rbp + 0x5b0], rax
xor edi, edi
mov dword [rsp + 0x40], r8d
mov ebx, edx
mov rsi, rcx
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x38], edi
mov r12d, edi
test rcx, rcx
je 0x140016134
mov edx, edi
test ebx, ebx
je 0x140016134
mov rax, rcx
cmp qword [rax], 0xffffffffffffffff
jne 0x140016158
inc edx
add rax, 0x10
cmp edx, ebx
jb 0x140016124
test r8d, r8d
je 0x1400164e2
jns 0x1400164d9
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
or edi, 0xffffffff
mov eax, edi
jmp 0x14001631e
mov qword [rsp + 0x718], r13
mov qword [rsp + 0x6d0], r14
movaps xmmword [rsp + 0x6c0], xmm6
test r8d, r8d
jle 0x140016187
lea rcx, [rsp + 0x50]
mov r12d, r8d
call fcn.14000dd80
movups xmm6, xmmword [rax]
jmp 0x14001618c
movaps xmm6, xmmword [rsp + 0x30]
or r14, 0xffffffffffffffff
mov r10d, edi
mov dword [rbp - 0x80], edi
add rsi, 8
mov r11d, edi
mov dword [rbp + 0x190], edi
mov r8d, edi
mov dword [rbp + 0x3a0], edi
mov r13, rbx
mov eax, 0x710
mov ecx, 0x600
mov r15d, 0x300
nop
mov rdx, qword [rsi - 8]
mov word [rsi + 2], di
cmp rdx, 0xffffffffffffffff
je 0x1400162c3
movzx r9d, word [rsi]
test ax, r9w
je 0x1400162c3
cmp rdx, r14
cmova r14, rdx
test r15w, r9w
je 0x140016226
mov ecx, edi
test r10d, r10d
je 0x140016204
mov eax, ecx
cmp qword [rbp + rax*8 - 0x78], rdx
je 0x140016204
inc ecx
cmp ecx, r10d
jb 0x1400161f4
cmp ecx, r10d
jne 0x140016221
cmp r10d, 0x40
jae 0x140016221
mov eax, ecx
mov qword [rbp + rax*8 - 0x78], rdx
mov r10d, dword [rbp - 0x80]
inc r10d
mov dword [rbp - 0x80], r10d
mov ecx, 0x600
test r9b, 0x10
je 0x140016271
mov ecx, edi
test r11d, r11d
je 0x140016246
mov eax, ecx
cmp qword [rbp + rax*8 + 0x198], rdx
je 0x140016246
inc ecx
cmp ecx, r11d
jb 0x140016233
cmp ecx, r11d
jne 0x14001626c
cmp r11d, 0x40
jae 0x14001626c
mov eax, ecx
mov qword [rbp + rax*8 + 0x198], rdx
mov r11d, dword [rbp + 0x190]
inc r11d
mov dword [rbp + 0x190], r11d
mov ecx, 0x600
test cx, r9w
je 0x1400162be
mov ecx, edi
test r8d, r8d
je 0x140016293
nop
mov eax, ecx
cmp qword [rbp + rax*8 + 0x3a8], rdx
je 0x140016293
inc ecx
cmp ecx, r8d
jb 0x140016280
cmp ecx, r8d
jne 0x1400162b9
cmp r8d, 0x40
jae 0x1400162b9
mov eax, ecx
mov qword [rbp + rax*8 + 0x3a8], rdx
mov r8d, dword [rbp + 0x3a0]
inc r8d
mov dword [rbp + 0x3a0], r8d
mov ecx, 0x600
mov eax, 0x710
add rsi, 0x10
dec rbx
jne 0x1400161c0
mov r15d, dword [rsp + 0x40]
test r10d, r10d
jne 0x14001633d
test r11d, r11d
jne 0x14001633d
test r8d, r8d
jne 0x14001633d
test r15d, r15d
je 0x140016304
jns 0x1400162fb
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
or edi, 0xffffffff
jmp 0x140016304
mov ecx, r15d
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, edi
mov r14, qword [rsp + 0x6d0]
mov r13, qword [rsp + 0x718]
movaps xmm6, xmmword [rsp + 0x6c0]
mov rcx, qword [rbp + 0x5b0]
xor rcx, rsp
call fcn.140049680
add rsp, 0x6d8
pop r15
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rsi, [rsp + 0x30]
test r15d, r15d
cmovs rsi, rdi
nop dword [rax]
test r15d, r15d
jle 0x140016382
mov eax, 0x10624dd3
imul r12d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r12d
mov dword [rsp + 0x30], edx
imul edx, edx, 0x3e8
sub eax, edx
imul eax, eax, 0x3e8
mov dword [rsp + 0x34], eax
jmp 0x140016389
jne 0x140016389
mov qword [rsp + 0x30], rdi
test r8d, r8d
lea r9, [rbp + 0x3a0]
lea r8, [rbp + 0x190]
cmove r9, rdi
test r11d, r11d
lea rdx, [rbp - 0x80]
cmove r8, rdi
test r10d, r10d
lea ecx, [r14 + 1]
cmove rdx, rdi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x140016442
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x1400163dd
cmp dword [0x1400a64c0], edi
jne 0x140016446
cmp eax, 0x2714
jne 0x140016446
test r15d, r15d
jg 0x1400163f9
mov r10d, dword [rbp - 0x80]
mov r11d, dword [rbp + 0x190]
mov r8d, dword [rbp + 0x3a0]
jmp 0x140016350
lea rcx, [rsp + 0x70]
movdqa xmmword [rsp + 0x60], xmm6
call fcn.14000dd80
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x50]
movups xmm0, xmmword [rax]
movaps xmmword [rsp + 0x50], xmm0
call fcn.14000ddd0
mov r12d, r15d
sub r12d, eax
test r12d, r12d
jle 0x140016450
mov r10d, dword [rbp - 0x80]
mov r11d, dword [rbp + 0x190]
mov r8d, dword [rbp + 0x3a0]
jmp 0x140016350
test eax, eax
jns 0x14001644e
or eax, 0xffffffff
jmp 0x140016306
jne 0x140016457
xor eax, eax
jmp 0x140016306
mov rbx, qword [rsp + 0x48]
mov esi, edi
mov r14d, 0x400
add rbx, 0xa
nop dword [rax + rax]
mov rcx, qword [rbx - 0xa]
mov word [rbx], di
cmp rcx, 0xffffffffffffffff
je 0x1400164c9
lea rdx, [rbp - 0x80]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140016492
mov eax, 0x300
or word [rbx], ax
mov rcx, qword [rbx - 0xa]
lea rdx, [rbp + 0x190]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1400164aa
or word [rbx], 0x10
mov rcx, qword [rbx - 0xa]
lea rdx, [rbp + 0x3a0]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1400164c2
or word [rbx], r14w
cmp word [rbx], di
je 0x1400164c9
inc esi
add rbx, 0x10
dec r13
jne 0x140016470
mov eax, esi
jmp 0x140016306
mov ecx, r8d
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, edi
jmp 0x14001631e