Function at 0x140066eb0
Capabilities:
Get socket status

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x678
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x250], 0
mov dword [rsp + 0x460], 0
test edx, edx
je 0x1400671c4
mov edx, edx
mov rbx, rcx
mov rax, rcx
xor r10d, r10d
shl rdx, 4
lea rsi, [rcx + rdx]
nop dword [rax + rax]
mov rdx, qword [rax]
xor edi, edi
mov word [rax + 0xa], di
cmp rdx, 0xffffffffffffffff
je 0x140066f3e
movzx r11d, word [rax + 8]
test r11w, 0x710
je 0x140066f3e
test r11w, 0x300
jne 0x140067150
test r11b, 0x10
jne 0x1400670f0
test r11w, 0x600
jne 0x140067090
add rax, 0x10
cmp rax, rsi
jne 0x140066f00
test r10d, r10d
je 0x1400671b0
lea rcx, [rsp + 0x38]
mov rdx, r8
call sym.curlx_mstotv
mov r11d, dword [rsp + 0x460]
xor r9d, r9d
test r11d, r11d
je 0x140066f75
lea r9, [rsp + 0x460]
mov r10d, dword [rsp + 0x250]
xor r8d, r8d
test r10d, r10d
je 0x140066f8d
lea r8, [rsp + 0x250]
mov ecx, dword [rsp + 0x40]
xor edx, edx
test ecx, ecx
jne 0x1400671a0
mov qword [rsp + 0x20], rax
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
mov edi, eax
test eax, eax
jle 0x1400671f0
xor edi, edi
lea r13, [rsp + 0x40]
lea r12, [rsp + 0x250]
lea rbp, [rsp + 0x460]
nop dword [rax]
mov rcx, qword [rbx]
xor eax, eax
mov word [rbx + 0xa], ax
cmp rcx, 0xffffffffffffffff
je 0x140067051
mov rdx, r13
call sym.__WSAFDIsSet
test eax, eax
je 0x140067005
movzx eax, word [rbx + 8]
test ah, 1
je 0x140066ffa
or word [rbx + 0xa], 0x100
test ah, 3
je 0x140067005
or word [rbx + 0xa], 0x300
mov rcx, qword [rbx]
mov rdx, r12
call sym.__WSAFDIsSet
test eax, eax
je 0x14006701f
test byte [rbx + 8], 0x10
je 0x14006701f
or word [rbx + 0xa], 0x10
mov rcx, qword [rbx]
mov rdx, rbp
call sym.__WSAFDIsSet
test eax, eax
je 0x140067080
movzx edx, word [rbx + 8]
movzx eax, word [rbx + 0xa]
mov ecx, edx
and cx, 0x400
and dh, 2
je 0x140067070
or ah, 2
mov word [rbx + 0xa], ax
test cx, cx
jne 0x140067075
add edi, 1
add rbx, 0x10
cmp rbx, rsi
jne 0x140066fd0
mov eax, edi
add rsp, 0x678
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
test cx, cx
je 0x140067080
or ah, 4
mov word [rbx + 0xa], ax
jmp 0x14006704e
cmp word [rbx + 0xa], 0
je 0x140067051
jmp 0x14006704e
mov r11d, dword [rsp + 0x460]
test r11d, r11d
je 0x14006721d
lea r9, [rsp + 0x468]
xor ecx, ecx
jmp 0x1400670bc
add ecx, 1
add r9, 8
cmp ecx, r11d
je 0x1400670c1
cmp rdx, qword [r9]
jne 0x1400670b0
cmp r11d, 0x40
je 0x140066f3e
cmp r11d, ecx
jne 0x140066f3e
add r11d, 1
mov qword [rsp + rcx*8 + 0x468], rdx
mov dword [rsp + 0x460], r11d
jmp 0x140066f3e
mov edi, dword [rsp + 0x250]
test edi, edi
je 0x140067211
lea r9, [rsp + 0x258]
xor ecx, ecx
jmp 0x14006711b
add ecx, 1
add r9, 8
cmp ecx, edi
je 0x140067120
cmp rdx, qword [r9]
jne 0x140067110
cmp edi, 0x40
je 0x140066f32
cmp edi, ecx
jne 0x140066f32
add edi, 1
mov qword [rsp + rcx*8 + 0x258], rdx
mov dword [rsp + 0x250], edi
jmp 0x140066f32
test r10d, r10d
je 0x14006722a
lea r9, [rsp + 0x48]
xor ecx, ecx
jmp 0x140067174
add ecx, 1
add r9, 8
cmp ecx, r10d
je 0x140067179
cmp rdx, qword [r9]
jne 0x140067168
cmp r10d, ecx
jne 0x140066f28
cmp r10d, 0x40
je 0x140066f28
add r10d, 1
mov qword [rsp + rcx*8 + 0x48], rdx
mov dword [rsp + 0x40], r10d
jmp 0x140066f28
lea rdx, [rsp + 0x40]
jmp 0x140066f9b
mov eax, dword [rsp + 0x250]
or eax, dword [rsp + 0x460]
jne 0x140066f50
test r8, r8
je 0x1400671e0
js 0x140067237
mov eax, 0xfffffffe
cmp r8, rax
cmovle rax, r8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
jmp 0x14006705e
cmp eax, 0xffffffff
jne 0x14006705e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
xor edi, edi
cmp eax, 0x2714
setne dil
neg edi
jmp 0x14006705e
xor ecx, ecx
mov edi, 1
jmp 0x140067134
xor ecx, ecx
mov r11d, 1
jmp 0x1400670d8
xor ecx, ecx
mov r10d, 1
jmp 0x140067190
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
jmp 0x1400671f9