Function at 0x180117fc0
Capabilities:
Get socket status

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x5a0]
sub rsp, 0x6a0
mov rax, qword [0x180272190]
xor rax, rsp
mov qword [rbp + 0x580], rax
xor r15d, r15d
mov edi, edx
mov qword [rsp + 0x40], rcx
mov r14d, r8d
mov qword [rsp + 0x30], r15
mov rsi, rcx
test rcx, rcx
je 0x180118020
mov ecx, r15d
test edx, edx
je 0x180118020
mov rax, rsi
nop dword [rax]
cmp qword [rax], 0xffffffffffffffff
jne 0x18011802d
inc ecx
add rax, 0x10
cmp ecx, edi
jb 0x180118010
mov ecx, r14d
call fcn.180118650
jmp 0x18011827f
mov qword [rsp + 0x6d8], rbx
mov qword [rsp + 0x698], r12
mov qword [rsp + 0x690], r13
test r14d, r14d
jle 0x180118054
call fcn.180110cd0
mov rbx, rax
jmp 0x180118059
mov rbx, qword [rsp + 0x30]
test r14d, r14d
mov dword [rsp + 0x50], r15d
mov r12d, r14d
mov dword [rbp + 0x160], r15d
cmovle r12d, r15d
mov dword [rbp + 0x370], r15d
mov r9d, r15d
mov qword [rsp + 0x38], rdi
mov r10d, r15d
mov r8d, r15d
mov r15, 0xffffffffffffffff
xor r13d, r13d
nop
mov rdx, qword [rsi]
mov word [rsi + 0xa], r13w
cmp rdx, 0xffffffffffffffff
je 0x180118199
movzx r11d, word [rsi + 8]
test r11b, 7
je 0x180118199
cmp rdx, r15
mov rax, rdx
cmovbe rax, r15
mov r15, rax
test r11b, 1
je 0x1801180ff
mov ecx, r13d
test r9d, r9d
je 0x1801180e0
nop dword [rax]
mov eax, ecx
cmp qword [rsp + rax*8 + 0x58], rdx
je 0x1801180e0
inc ecx
cmp ecx, r9d
jb 0x1801180d0
cmp ecx, r9d
jne 0x1801180ff
cmp r9d, 0x40
jae 0x1801180ff
mov eax, ecx
mov qword [rsp + rax*8 + 0x58], rdx
mov r9d, dword [rsp + 0x50]
inc r9d
mov dword [rsp + 0x50], r9d
test r11b, 4
je 0x180118149
mov ecx, r13d
test r10d, r10d
je 0x180118123
nop dword [rax]
mov eax, ecx
cmp qword [rbp + rax*8 + 0x168], rdx
je 0x180118123
inc ecx
cmp ecx, r10d
jb 0x180118110
cmp ecx, r10d
jne 0x180118149
cmp r10d, 0x40
jae 0x180118149
mov eax, ecx
mov qword [rbp + rax*8 + 0x168], rdx
mov r10d, dword [rbp + 0x160]
inc r10d
mov dword [rbp + 0x160], r10d
test r11b, 2
je 0x180118199
mov ecx, r13d
test r8d, r8d
je 0x180118173
nop word [rax + rax]
mov eax, ecx
cmp qword [rbp + rax*8 + 0x378], rdx
je 0x180118173
inc ecx
cmp ecx, r8d
jb 0x180118160
cmp ecx, r8d
jne 0x180118199
cmp r8d, 0x40
jae 0x180118199
mov eax, ecx
mov qword [rbp + rax*8 + 0x378], rdx
mov r8d, dword [rbp + 0x370]
inc r8d
mov dword [rbp + 0x370], r8d
add rsi, 0x10
sub rdi, 1
jne 0x180118090
test r14d, r14d
lea rdi, [rsp + 0x30]
lea esi, [r15 + 1]
cmovs rdi, r13
mov r13, qword [rsp + 0x38]
xor r15d, r15d
nop
test r14d, r14d
jle 0x1801181f2
mov eax, 0x10624dd3
mov ecx, r12d
imul r12d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x3e8
mov dword [rsp + 0x30], edx
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [rsp + 0x34], eax
jmp 0x1801181f9
jne 0x1801181f9
mov qword [rsp + 0x30], r15
lea r9, [rbp + 0x370]
mov qword [rsp + 0x20], rdi
lea r8, [rbp + 0x160]
mov ecx, esi
lea rdx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x18011825e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x180118238
cmp dword [0x18027e278], r15d
jne 0x180118262
cmp eax, 0x2714
jne 0x180118262
test r14d, r14d
jle 0x1801181f2
call fcn.180110cd0
mov rcx, rax
mov rdx, rbx
call fcn.180110c40
mov r12d, r14d
sub r12d, eax
test r12d, r12d
jg 0x1801181c0
jmp 0x180118262
test eax, eax
jns 0x18011829d
mov eax, 0xffffffff
mov r12, qword [rsp + 0x698]
mov rbx, qword [rsp + 0x6d8]
mov r13, qword [rsp + 0x690]
mov rcx, qword [rbp + 0x580]
xor rcx, rsp
call fcn.1801525d0
add rsp, 0x6a0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
jne 0x1801182a3
xor eax, eax
jmp 0x180118267
mov rbx, qword [rsp + 0x40]
mov edi, r15d
add rbx, 0xa
nop
mov rcx, qword [rbx - 0xa]
mov word [rbx], r15w
cmp rcx, 0xffffffffffffffff
je 0x18011830d
lea rdx, [rsp + 0x50]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1801182d0
or word [rbx], 1
mov rcx, qword [rbx - 0xa]
lea rdx, [rbp + 0x160]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1801182e8
or word [rbx], 4
mov rcx, qword [rbx - 0xa]
lea rdx, [rbp + 0x370]
call sub.WS2_32.dll___WSAFDIsSet
movzx ecx, word [rbx]
test eax, eax
je 0x180118306
or cx, 2
mov word [rbx], cx
test cx, cx
je 0x18011830d
inc edi
add rbx, 0x10
sub r13, 1
jne 0x1801182b0
mov eax, edi
jmp 0x180118267