Function at 0x14001f2e0
Capabilities:
Get socket status

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x88
lea rbp, [rsp + 0x80]
mov qword [rbp], 0xfffffffffffffffe
mov qword [rbp - 0x30], r8
mov esi, edx
mov r12, rcx
lea r14, [rcx + 0x30]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [r12 + 0x198], 0
jne 0x14001fb31
mov dword [rbp - 0x3c], esi
mov qword [rbp - 0x18], r14
mov rax, qword [r12 + 0x148]
mov dword [rax], 0
mov qword [r12 + 0x158], 0xffffffffffffffff
mov rax, qword [r12 + 0x160]
mov dword [rax], 0
mov qword [r12 + 0x170], 0xffffffffffffffff
mov rax, qword [r12 + 0x178]
mov dword [rax], 0
mov qword [r12 + 0x188], 0xffffffffffffffff
mov rbx, qword [r12 + 0x58]
mov r14, qword [r12 + 0x148]
mov esi, dword [r14]
test rsi, rsi
mov qword [rbp - 0x10], r12
je 0x14001f3b3
xor eax, eax
nop dword [rax + rax]
cmp qword [r14 + rax*8 + 8], rbx
je 0x14001f436
inc rax
cmp rsi, rax
jne 0x14001f3a0
lea eax, [rsi + 1]
mov ecx, dword [r12 + 0x150]
cmp ecx, eax
jae 0x14001f42c
mov edi, ecx
shr edi, 1
add edi, ecx
cmp edi, eax
cmovbe edi, eax
lea rcx, [rdi*8 + 8]
mov byte [rbp - 1], 0
call fcn.1400551c0
mov r14, rax
mov r12, qword [rbp - 0x10]
mov rcx, qword [r12 + 0x148]
mov esi, dword [rcx]
mov dword [rax], esi
cmp dword [rcx], 0
je 0x14001f414
xor eax, eax
nop dword [rax + rax]
mov rdx, qword [rcx + rax*8 + 8]
mov qword [r14 + rax*8 + 8], rdx
inc rax
mov edx, dword [rcx]
cmp rax, rdx
jb 0x14001f400
call fcn.1400551fc
mov qword [r12 + 0x148], r14
mov dword [r12 + 0x150], edi
lea eax, [rsi + 1]
mov dword [r14], eax
mov eax, esi
mov qword [r14 + rax*8 + 8], rbx
mov r14, qword [r12 + 0x190]
xor ecx, ecx
test r14, r14
je 0x14001f47b
nop word cs:[rax + rax]
mov rax, qword [r14]
mov rax, qword [rax + 8]
mov byte [rbp - 1], 0
mov rcx, r14
call rax
mov rdx, rax
test dl, dl
je 0x14001f470
mov r14, qword [r14 + 8]
test r14, r14
jne 0x14001f450
xor dl, 1
mov r12, qword [rbp - 0x10]
xor ecx, ecx
jmp 0x14001f47d
xor edx, edx
lea rax, [r12 + 0x58]
mov qword [rbp - 0x48], rax
xor r13d, r13d
jmp 0x14001f4b1
mov r12, qword [rbp - 0x10]
mov rax, qword [r12 + r14*8 + 0x158]
mov r13, qword [rbp - 0x20]
cmp rax, r13
cmova r13, rax
mov rcx, qword [rbp - 0x50]
inc ecx
mov rdx, qword [rbp - 0x28]
cmp ecx, 3
jae 0x14001f5a9
mov qword [rbp - 0x20], r13
mov qword [rbp - 0x50], rcx
mov eax, ecx
test dl, 1
mov cl, 1
jne 0x14001f4d8
imul rcx, rax, 0x38
cmp qword [r12 + rcx + 0x78], 0
setne cl
mov qword [rbp - 0x28], rcx
lea r14, [rax + rax*2]
imul rax, rax, 0x38
mov rcx, qword [r12 + rax + 0x70]
mov r12, qword [rcx]
cmp r12, rcx
je 0x14001f490
mov rcx, qword [rbp - 0x10]
lea r15, [rcx + r14*8]
add r15, 0x148
lea rsi, [rcx + rax]
add rsi, 0x70
jmp 0x14001f53f
call fcn.1400551fc
mov qword [r15], r13
mov dword [r15 + 8], ebx
mov ecx, dword [r13]
lea eax, [rcx + 1]
mov rdx, qword [r12 + 0x10]
mov dword [r13], eax
mov eax, ecx
mov qword [r13 + rax*8 + 8], rdx
mov r12, rdi
cmp rdi, qword [rsi]
je 0x14001f490
mov rdi, qword [r12]
mov r13, qword [r15]
mov ecx, dword [r13]
lea eax, [rcx + 1]
mov edx, dword [r15 + 8]
cmp edx, eax
jae 0x14001f523
mov ebx, edx
shr ebx, 1
add ebx, edx
cmp ebx, eax
cmovbe ebx, eax
lea rcx, [rbx*8 + 8]
mov byte [rbp - 1], 0
call fcn.1400551c0
mov r13, rax
mov rcx, qword [r15]
mov eax, dword [rcx]
mov dword [r13], eax
cmp dword [rcx], 0
je 0x14001f510
xor eax, eax
nop word cs:[rax + rax]
mov rdx, qword [rcx + rax*8 + 8]
mov qword [r13 + rax*8 + 8], rdx
inc rax
mov edx, dword [rcx]
cmp rax, rdx
jb 0x14001f590
jmp 0x14001f510
cmp qword [r12 + 0x120], 0
setne cl
mov rax, qword [r12 + 0x118]
mov rsi, qword [rax]
cmp rsi, rax
je 0x14001f786
mov byte [rbp - 0x20], cl
mov qword [rbp - 0x28], rdx
mov r14, r13
jmp 0x14001f61c
call fcn.1400551fc
mov qword [r12 + 0x160], r13
mov dword [r12 + 0x168], edi
mov ecx, dword [r13]
lea eax, [rcx + 1]
mov rdx, qword [rsi + 0x10]
mov dword [r13], eax
mov eax, ecx
mov qword [r13 + rax*8 + 8], rdx
mov rsi, rbx
cmp rbx, qword [r12 + 0x118]
je 0x14001f699
mov rbx, qword [rsi]
mov r13, qword [r12 + 0x160]
mov ecx, dword [r13]
lea eax, [rcx + 1]
mov edx, dword [r12 + 0x168]
cmp edx, eax
jae 0x14001f5fc
mov edi, edx
shr edi, 1
add edi, edx
cmp edi, eax
cmovbe edi, eax
lea rcx, [rdi*8 + 8]
mov byte [rbp - 1], 0
call fcn.1400551c0
mov r13, rax
mov r12, qword [rbp - 0x10]
mov rcx, qword [r12 + 0x160]
mov eax, dword [rcx]
mov dword [r13], eax
cmp dword [rcx], 0
je 0x14001f5e0
xor eax, eax
nop word cs:[rax + rax]
mov rdx, qword [rcx + rax*8 + 8]
mov qword [r13 + rax*8 + 8], rdx
inc rax
mov edx, dword [rcx]
cmp rax, rdx
jb 0x14001f680
jmp 0x14001f5e0
mov r15, qword [rbx]
mov rax, qword [r12 + 0x170]
mov r13, r14
cmp rax, r14
cmova r13, rax
cmp r15, rbx
je 0x14001f77c
mov rbx, r13
jmp 0x14001f6fc
call fcn.1400551fc
mov qword [r12 + 0x178], r13
mov dword [r12 + 0x180], edi
mov ecx, dword [r13]
lea eax, [rcx + 1]
mov rdx, qword [r15 + 0x10]
mov dword [r13], eax
mov eax, ecx
mov qword [r13 + rax*8 + 8], rdx
mov r15, rsi
cmp rsi, qword [r12 + 0x118]
je 0x14001f779
mov rsi, qword [r15]
mov r13, qword [r12 + 0x178]
mov ecx, dword [r13]
lea eax, [rcx + 1]
mov edx, dword [r12 + 0x180]
cmp edx, eax
jae 0x14001f6dc
mov edi, edx
shr edi, 1
add edi, edx
cmp edi, eax
cmovbe edi, eax
lea rcx, [rdi*8 + 8]
mov byte [rbp - 1], 0
call fcn.1400551c0
mov r13, rax
mov r12, qword [rbp - 0x10]
mov rcx, qword [r12 + 0x178]
mov eax, dword [rcx]
mov dword [r13], eax
cmp dword [rcx], 0
je 0x14001f6c0
xor eax, eax
nop word cs:[rax + rax]
mov rdx, qword [rcx + rax*8 + 8]
mov qword [r13 + rax*8 + 8], rdx
inc rax
mov edx, dword [rcx]
cmp rax, rdx
jb 0x14001f760
jmp 0x14001f6c0
mov r13, rbx
mov rdx, qword [rbp - 0x28]
movzx ecx, byte [rbp - 0x20]
jmp 0x14001f795
mov rax, qword [r12 + 0x170]
cmp rax, r13
cmova r13, rax
or dl, cl
mov rax, qword [r12 + 0x188]
cmp rax, r13
cmova r13, rax
mov ecx, dword [rbp - 0x3c]
test ecx, ecx
sete al
xor dl, 1
test al, dl
mov r14, qword [rbp - 0x18]
jne 0x14001fb31
mov qword [rbp - 0x38], 0
test ecx, ecx
je 0x14001f83b
cmp ecx, 0x11e1a300
mov eax, 0x11e1a300
cmovb eax, ecx
mov rbx, qword [r12 + 0x190]
test rbx, rbx
je 0x14001f80c
nop word cs:[rax + rax]
mov rcx, qword [rbx]
mov r8, qword [rcx + 0x18]
mov byte [rbp - 1], 0
mov rcx, rbx
mov edx, eax
call r8
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x14001f7f0
movsxd rsi, eax
imul rdi, rsi, 0x431bde83
mov rax, rdi
shr rax, 0x3f
sar rdi, 0x32
add edi, eax
mov dword [rbp - 0x38], edi
imul eax, edi, 0xf4240
sub esi, eax
mov dword [rbp - 0x34], esi
mov r14, qword [rbp - 0x18]
mov r12, qword [rbp - 0x10]
jmp 0x14001f83f
xor esi, esi
xor edi, edi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov r9, qword [r12 + 0x178]
mov rdx, qword [r12 + 0x148]
mov r8, qword [r12 + 0x160]
test r9, r9
jne 0x14001f9b4
test r8, r8
jne 0x14001f9b4
test rdx, rdx
jne 0x14001f9b4
imul eax, edi, 0x3e8
movsxd rcx, esi
imul rcx, rcx, 0x10624dd3
mov rdx, rcx
shr rdx, 0x3f
sar rcx, 0x26
add ecx, edx
lea edx, [rcx + rax]
cmp edx, 1
adc ecx, eax
call qword [sym.imp.KERNEL32.dll_Sleep]
xor ebx, ebx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test ebx, ebx
jle 0x14001fb01
lea rbx, [r12 + 0x110]
mov rax, qword [r12 + 0x178]
cmp dword [rax], 0
je 0x14001f907
xor esi, esi
mov r12, qword [rbp - 0x10]
nop word cs:[rax + rax]
mov rdx, qword [rax + rsi*8 + 8]
mov byte [rbp - 1], 0
mov rcx, rbx
mov r8, qword [rbp - 0x30]
call fcn.14001feb0
inc rsi
mov rax, qword [r12 + 0x178]
mov ecx, dword [rax]
cmp rsi, rcx
jb 0x14001f8e0
mov rax, qword [r12 + 0x160]
cmp dword [rax], 0
je 0x14001f947
xor esi, esi
mov r12, qword [rbp - 0x10]
nop word [rax + rax]
mov rdx, qword [rax + rsi*8 + 8]
mov byte [rbp - 1], 0
mov rcx, rbx
mov r8, qword [rbp - 0x30]
call fcn.14001feb0
inc rsi
mov rax, qword [r12 + 0x160]
mov ecx, dword [rax]
cmp rsi, rcx
jb 0x14001f920
mov esi, 2
jmp 0x14001f956
dec esi
mov r12, qword [rbp - 0x10]
test esi, esi
js 0x14001fb01
mov ecx, esi
lea rdx, [rcx + rcx*2]
mov rax, qword [r12 + rdx*8 + 0x148]
cmp dword [rax], 0
je 0x14001f950
mov r8, qword [rbp - 0x10]
lea rdi, [r8 + rdx*8]
add rdi, 0x148
imul rcx, rcx, 0x38
lea rbx, [r8 + rcx]
add rbx, 0x68
xor r14d, r14d
nop
mov rdx, qword [rax + r14*8 + 8]
mov byte [rbp - 1], 0
mov rcx, rbx
mov r8, qword [rbp - 0x30]
call fcn.14001feb0
inc r14
mov rax, qword [rdi]
mov ecx, dword [rax]
cmp r14, rcx
jb 0x14001f990
jmp 0x14001f950
inc r13d
test edi, edi
jne 0x14001f9cc
dec esi
cmp esi, 0x3e6
ja 0x14001f9cc
mov dword [rbp - 0x34], 0x3e8
lea rax, [rbp - 0x38]
mov qword [rsp + 0x20], rax
mov ecx, r13d
call qword [sym.imp.WS2_32.dll_select]
mov ebx, eax
test eax, eax
js 0x14001fa24
je 0x14001f8a6
mov rcx, qword [r12 + 0x58]
mov rdx, qword [r12 + 0x148]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x14001f8a8
mov byte [rbp - 1], 1
mov rcx, qword [rbp - 0x48]
call fcn.14001fb90
test al, al
je 0x14001fa60
dec ebx
mov r14, qword [rbp - 0x18]
mov r12, qword [rbp - 0x10]
jmp 0x14001f8a8
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [0x14015f250]
shr rcx, 1
movabs rdx, 0x595588bd12bf6fe8
cmp rcx, rdx
je 0x14001f8a8
mov r8, qword [0x14015f248]
lea rcx, [0x14015f248]
mov edx, eax
call qword [r8 + 0x30]
jmp 0x14001f8a8
mov rcx, qword [rbp - 0x18]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r12, qword [rbp - 0x10]
mov byte [r12 + 0x198], 1
mov rsi, qword [r12 + 0x28]
lock inc dword [rsi + 0x30]
lea r14, [r12 + 0x1a8]
mov dword [r12 + 0x1d8], 1
mov rcx, qword [rsi + 0x28]
xor edx, edx
xor r8d, r8d
mov r9, r14
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x14001faf7
lea r15, [rsi + 0x60]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rax, [rsi + 0x90]
mov qword [r12 + 0x1c8], 0
mov rcx, qword [rsi + 0x98]
lea rdx, [rcx + 0x20]
test rcx, rcx
cmove rdx, rax
mov qword [rdx], r14
mov qword [rsi + 0x98], r14
mov eax, 1
xchg dword [rsi + 0x58], eax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
dec ebx
test ebx, ebx
jg 0x14001f8b9
mov rdi, qword [r12 + 0x190]
test rdi, rdi
je 0x14001fb2d
nop
mov rax, qword [rdi]
mov rax, qword [rax + 0x20]
mov byte [rbp - 1], 0
mov rcx, rdi
mov rdx, qword [rbp - 0x30]
call rax
mov rdi, qword [rdi + 8]
test rdi, rdi
jne 0x14001fb10
mov r14, qword [rbp - 0x18]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
add rsp, 0x88
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret