Function at 0x18021f930
Capabilities:
Get socket status

Disassembly:
push rbp
push rsi
push rdi
push r12
push r14
lea rbp, [rsp - 0x5a0]
sub rsp, 0x6a0
mov rax, qword [0x1803c1370]
xor rax, rsp
mov qword [rbp + 0x580], rax
xor esi, esi
mov r14d, r8d
mov edi, edx
mov r12, rcx
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x30], esi
test rcx, rcx
je 0x18021f990
mov edx, esi
test edi, edi
je 0x18021f990
mov rax, rcx
nop
cmp qword [rax], 0xffffffffffffffff
jne 0x18021f9b4
inc edx
add rax, 0x10
cmp edx, edi
jb 0x18021f980
test r8d, r8d
je 0x18021fc8f
jns 0x18021fc86
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
or esi, 0xffffffff
mov eax, esi
jmp 0x18021fbea
mov qword [rsp + 0x6d8], rbx
mov qword [rsp + 0x698], r13
mov qword [rsp + 0x690], r15
test r8d, r8d
jle 0x18021f9e0
mov dword [rsp + 0x30], r8d
call fcn.1802208b0
mov rbx, rax
jmp 0x18021f9e5
mov rbx, qword [rsp + 0x38]
or r13, 0xffffffffffffffff
mov r9d, esi
mov dword [rbp + 0x160], esi
add r12, 8
mov r10d, esi
mov dword [rsp + 0x50], esi
mov r8d, esi
mov dword [rbp + 0x370], esi
mov r15, rdi
nop dword [rax]
mov rdx, qword [r12 - 8]
mov word [r12 + 2], si
cmp rdx, 0xffffffffffffffff
je 0x18021fb0e
movzx r11d, word [r12]
test r11b, 7
je 0x18021fb0e
cmp rdx, r13
cmova r13, rdx
test r11b, 1
je 0x18021fa88
mov ecx, esi
mov rax, rsi
test r9d, r9d
je 0x18021fa64
nop dword [rax + rax]
cmp qword [rbp + rax*8 + 0x168], rdx
je 0x18021fa64
inc ecx
inc rax
cmp ecx, r9d
jb 0x18021fa50
cmp ecx, r9d
jne 0x18021fa88
cmp r9d, 0x40
jae 0x18021fa88
mov qword [rbp + rax*8 + 0x168], rdx
mov r9d, dword [rbp + 0x160]
inc r9d
mov dword [rbp + 0x160], r9d
test r11b, 4
je 0x18021fac6
mov ecx, esi
mov rax, rsi
test r10d, r10d
je 0x18021faa9
cmp qword [rsp + rax*8 + 0x58], rdx
je 0x18021faa9
inc ecx
inc rax
cmp ecx, r10d
jb 0x18021fa98
cmp ecx, r10d
jne 0x18021fac6
cmp r10d, 0x40
jae 0x18021fac6
mov qword [rsp + rax*8 + 0x58], rdx
mov r10d, dword [rsp + 0x50]
inc r10d
mov dword [rsp + 0x50], r10d
test r11b, 2
je 0x18021fb0e
mov ecx, esi
mov rax, rsi
test r8d, r8d
je 0x18021faea
cmp qword [rbp + rax*8 + 0x378], rdx
je 0x18021faea
inc ecx
inc rax
cmp ecx, r8d
jb 0x18021fad6
cmp ecx, r8d
jne 0x18021fb0e
cmp r8d, 0x40
jae 0x18021fb0e
mov qword [rbp + rax*8 + 0x378], rdx
mov r8d, dword [rbp + 0x370]
inc r8d
mov dword [rbp + 0x370], r8d
add r12, 0x10
dec rdi
jne 0x18021fa10
mov ecx, dword [rsp + 0x30]
lea r12, [rsp + 0x38]
test r14d, r14d
cmovs r12, rsi
nop dword [rax + rax]
test r14d, r14d
jle 0x18021fb60
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, ecx
mov dword [rsp + 0x38], edx
imul edx, edx, 0x3e8
sub eax, edx
imul eax, eax, 0x3e8
mov dword [rsp + 0x3c], eax
jmp 0x18021fb67
jne 0x18021fb67
mov qword [rsp + 0x38], rsi
lea r9, [rbp + 0x370]
lea r8, [rsp + 0x50]
lea rdx, [rbp + 0x160]
lea ecx, [r13 + 1]
mov qword [rsp + 0x20], r12
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x18021fbcb
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x18021fb9f
cmp eax, 0x2714
jne 0x18021fbcf
mov ecx, dword [rsp + 0x30]
test r14d, r14d
jle 0x18021fb60
call fcn.1802208b0
mov rdx, rbx
mov rcx, rax
call fcn.1802208f0
mov ecx, r14d
sub ecx, eax
mov dword [rsp + 0x30], ecx
test ecx, ecx
jg 0x18021fb30
jmp 0x18021fbcf
test eax, eax
jns 0x18021fc08
or eax, 0xffffffff
mov r13, qword [rsp + 0x698]
mov rbx, qword [rsp + 0x6d8]
mov r15, qword [rsp + 0x690]
mov rcx, qword [rbp + 0x580]
xor rcx, rsp
call fcn.180227610
add rsp, 0x6a0
pop r14
pop r12
pop rdi
pop rsi
pop rbp
ret
jne 0x18021fc0e
xor eax, eax
jmp 0x18021fbd2
mov rbx, qword [rsp + 0x40]
mov edi, esi
add rbx, 0xa
nop dword [rax]
mov rcx, qword [rbx - 0xa]
mov word [rbx], si
cmp rcx, 0xffffffffffffffff
je 0x18021fc76
lea rdx, [rbp + 0x160]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x18021fc41
or word [rbx], 1
mov rcx, qword [rbx - 0xa]
lea rdx, [rsp + 0x50]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x18021fc57
or word [rbx], 4
mov rcx, qword [rbx - 0xa]
lea rdx, [rbp + 0x370]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x18021fc6f
or word [rbx], 2
cmp word [rbx], si
je 0x18021fc76
inc edi
add rbx, 0x10
dec r15
jne 0x18021fc20
mov eax, edi
jmp 0x18021fbd2
mov ecx, r8d
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, esi
jmp 0x18021fbea