Function at 0x18021f6a0
Capabilities:
Get socket status

Disassembly:
push rbp
push rsi
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x598]
sub rsp, 0x698
mov rax, qword [0x1803c1370]
xor rax, rsp
mov qword [rbp + 0x580], rax
xor edi, edi
mov r13d, r8d
mov rsi, rdx
mov r15, rcx
mov qword [rsp + 0x30], rdi
mov r14d, edi
cmp rcx, 0xffffffffffffffff
jne 0x18021f714
cmp rdx, rcx
jne 0x18021f714
test r8d, r8d
je 0x18021f70d
jns 0x18021f704
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
or edi, r15d
mov eax, edi
jmp 0x18021f902
mov ecx, r8d
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, edi
jmp 0x18021f902
mov qword [rsp + 0x6e8], rbx
mov qword [rsp + 0x690], r12
test r8d, r8d
jle 0x18021f736
mov r14d, r8d
call fcn.1802208b0
mov rbx, rax
jmp 0x18021f73b
mov rbx, qword [rsp + 0x30]
or r8, 0xffffffffffffffff
mov edx, edi
mov dword [rbp + 0x160], edi
lea eax, [r8 + 2]
mov dword [rsp + 0x50], edx
cmp r15, r8
je 0x18021f76f
mov qword [rbp + 0x168], r15
mov dword [rbp + 0x160], eax
mov qword [rsp + 0x58], r15
mov edx, eax
mov dword [rsp + 0x50], eax
mov r8, r15
mov dword [rbp + 0x370], edi
cmp rsi, 0xffffffffffffffff
je 0x18021f7bb
mov dword [rbp + 0x370], eax
mov qword [rbp + 0x378], rsi
mov eax, edi
test edx, edx
je 0x18021f7a2
lea rcx, [rsp + 0x58]
cmp qword [rcx], rsi
je 0x18021f7a2
inc eax
add rcx, 8
cmp eax, edx
jb 0x18021f793
cmp eax, edx
jne 0x18021f7b4
cmp edx, 0x40
jae 0x18021f7b4
mov qword [rsp + rax*8 + 0x58], rsi
inc dword [rsp + 0x50]
cmp rsi, r8
cmova r8, rsi
lea rcx, [rsp + 0x30]
test r13d, r13d
lea r10d, [r8 + 1]
cmovs rcx, rdi
mov dword [rsp + 0x38], r10d
mov qword [rsp + 0x40], rcx
test r13d, r13d
jle 0x18021f807
mov eax, 0x10624dd3
imul r14d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r14d
mov dword [rsp + 0x30], edx
imul edx, edx, 0x3e8
sub eax, edx
imul eax, eax, 0x3e8
mov dword [rsp + 0x34], eax
jmp 0x18021f80e
jne 0x18021f80e
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x50]
lea r8, [rbp + 0x370]
lea rdx, [rbp + 0x160]
mov ecx, r10d
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x18021f87e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x18021f845
cmp eax, 0x2714
jne 0x18021f882
mov rcx, qword [rsp + 0x40]
mov r10d, dword [rsp + 0x38]
test r13d, r13d
jle 0x18021f807
call fcn.1802208b0
mov rdx, rbx
mov rcx, rax
call fcn.1802208f0
mov r14d, r13d
sub r14d, eax
test r14d, r14d
jle 0x18021f882
mov rcx, qword [rsp + 0x40]
mov r10d, dword [rsp + 0x38]
jmp 0x18021f7d5
test eax, eax
jns 0x18021f887
or eax, 0xffffffff
jmp 0x18021f8f2
jne 0x18021f88d
xor eax, eax
jmp 0x18021f8f2
cmp r15, 0xffffffffffffffff
je 0x18021f8c0
lea rdx, [rbp + 0x160]
mov rcx, r15
call sub.WS2_32.dll___WSAFDIsSet
lea rdx, [rsp + 0x50]
mov rcx, r15
test eax, eax
mov eax, 1
cmovne edi, eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x18021f8c0
or edi, 4
cmp rsi, 0xffffffffffffffff
je 0x18021f8f0
lea rdx, [rbp + 0x370]
mov rcx, rsi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x18021f8dc
or edi, 2
lea rdx, [rsp + 0x50]
mov rcx, rsi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x18021f8f0
or edi, 4
mov eax, edi
mov rbx, qword [rsp + 0x6e8]
mov r12, qword [rsp + 0x690]
mov rcx, qword [rbp + 0x580]
xor rcx, rsp
call fcn.180227610
add rsp, 0x698
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
ret