Function at 0x1401229d0
Capabilities:
Get socket status

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x678
mov dword [rsp + 0x460], 0
mov rbx, rcx
mov dword [rsp + 0x250], 0
mov dword [rsp + 0x40], 0
test edx, edx
je 0x140122da0
mov esi, edx
xor edi, edi
xor r11d, r11d
xor r10d, r10d
mov rax, rsi
shl rax, 4
add rax, rcx
nop dword [rax]
xor edx, edx
mov word [rcx + 0xa], dx
mov rdx, qword [rcx]
cmp rdx, 0xffffffffffffffff
je 0x140122a5e
movzx r12d, word [rcx + 8]
test r12w, 0x710
je 0x140122a5e
test r12w, 0x300
jne 0x140122c70
test r12b, 0x10
jne 0x140122c10
test r12w, 0x600
jne 0x140122bb8
add rcx, 0x10
cmp rcx, rax
jne 0x140122a20
test r10d, r10d
je 0x140122d48
cmp r8, 0xffffffffffffffff
je 0x140122d98
test r8, r8
jne 0x140122cd0
mov qword [rsp + 0x38], 0
lea rcx, [rsp + 0x38]
xor eax, eax
lea r9, [rsp + 0x40]
test edi, edi
cmove r9, rax
lea r8, [rsp + 0x250]
test r11d, r11d
cmove r8, rax
lea rdx, [rsp + 0x460]
test r10d, r10d
cmove rdx, rax
mov qword [rsp + 0x20], rcx
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
mov edi, eax
test eax, eax
jle 0x140122d70
shl rsi, 4
xor edi, edi
lea r13, [rsp + 0x460]
add rsi, rbx
lea r12, [rsp + 0x250]
lea rbp, [rsp + 0x40]
jmp 0x140122b2f
movzx edx, word [rbx + 8]
movzx eax, word [rbx + 0xa]
mov ecx, edx
and cx, 0x400
and dh, 2
je 0x140122d28
or ah, 2
mov word [rbx + 0xa], ax
test cx, cx
je 0x140122b23
or ah, 4
mov word [rbx + 0xa], ax
add edi, 1
add rbx, 0x10
cmp rbx, rsi
je 0x140122ba1
mov rcx, qword [rbx]
xor eax, eax
mov word [rbx + 0xa], ax
cmp rcx, 0xffffffffffffffff
je 0x140122b26
mov rdx, r13
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140122b64
movzx eax, word [rbx + 8]
test ah, 1
je 0x140122b59
or word [rbx + 0xa], 0x100
test ah, 3
je 0x140122b64
or word [rbx + 0xa], 0x300
mov rcx, qword [rbx]
mov rdx, r12
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140122b7e
test byte [rbx + 8], 0x10
je 0x140122b7e
or word [rbx + 0xa], 0x10
mov rcx, qword [rbx]
mov rdx, rbp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x140122af8
cmp word [rbx + 0xa], 0
jne 0x140122b23
add rbx, 0x10
cmp rbx, rsi
jne 0x140122b2f
mov eax, edi
add rsp, 0x678
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
test edi, edi
je 0x140122de3
lea rbp, [rsp + 0x48]
xor r9d, r9d
jmp 0x140122bdd
add r9d, 1
add rbp, 8
cmp r9d, edi
je 0x140122be3
cmp rdx, qword [rbp]
jne 0x140122bd0
cmp edi, 0x40
je 0x140122a5e
cmp edi, r9d
jne 0x140122a5e
add edi, 1
mov qword [rsp + r9*8 + 0x48], rdx
mov dword [rsp + 0x40], edi
jmp 0x140122a5e
test r11d, r11d
je 0x140122dc7
lea rbp, [rsp + 0x258]
xor r9d, r9d
jmp 0x140122c3d
add r9d, 1
add rbp, 8
cmp r9d, r11d
je 0x140122c43
cmp rdx, qword [rbp]
jne 0x140122c30
cmp r11d, 0x40
je 0x140122a52
cmp r11d, r9d
jne 0x140122a52
add r11d, 1
mov qword [rsp + r9*8 + 0x258], rdx
mov dword [rsp + 0x250], r11d
jmp 0x140122a52
test r10d, r10d
je 0x140122dd5
lea rbp, [rsp + 0x468]
xor r9d, r9d
jmp 0x140122c9d
add r9d, 1
add rbp, 8
cmp r9d, r10d
je 0x140122ca3
cmp rdx, qword [rbp]
jne 0x140122c90
cmp r10d, 0x40
je 0x140122a48
cmp r10d, r9d
jne 0x140122a48
add r10d, 1
mov qword [rsp + r9*8 + 0x468], rdx
mov dword [rsp + 0x460], r10d
jmp 0x140122a48
movabs rax, 0x20c49ba5e353f7cf
imul r8
mov rax, r8
sar rax, 0x3f
sar rdx, 7
sub rdx, rax
mov rax, r8
imul rcx, rdx, 0x3e8
sub rax, rcx
movabs rcx, 0x1f3ffffffff
imul rax, rax, 0x3e8
cmp r8, rcx
mov ecx, 0x7fffffff
cmovg edx, ecx
mov dword [rsp + 0x3c], eax
mov dword [rsp + 0x38], edx
jmp 0x140122a8c
test cx, cx
jne 0x140122b1c
cmp word [rbx + 0xa], 0
je 0x140122b98
jmp 0x140122b23
test r11d, r11d
jne 0x140122a70
test edi, edi
je 0x140122da0
cmp r8, 0xffffffffffffffff
jne 0x140122a7a
lea r9, [rsp + 0x40]
xor ecx, ecx
xor r8d, r8d
xor edx, edx
jmp 0x140122abc
cmp eax, 0xffffffff
jne 0x140122ba1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
xor edi, edi
cmp eax, 0x2714
setne dil
neg edi
jmp 0x140122ba1
xor ecx, ecx
jmp 0x140122a91
test r8, r8
je 0x140122dc0
cmp r8, 0xffffffffffffffff
je 0x140122df0
mov eax, 0xfffffffe
cmp r8, rax
cmovle rax, r8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
jmp 0x140122ba1
xor r9d, r9d
mov r11d, 1
jmp 0x140122c5a
xor r9d, r9d
mov r10d, 1
jmp 0x140122cba
xor r9d, r9d
mov edi, 1
jmp 0x140122bf8
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
jmp 0x140122d79