Function at 0x14006ff30
Capabilities:
Get socket status

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x658
mov rax, qword [0x1400cb080]
xor rax, rsp
mov qword [rsp + 0x650], rax
test rcx, rcx
je 0x14006ff80
mov edi, edx
test edx, edx
je 0x14006ff80
mov rsi, rcx
mov eax, edi
mov rcx, rax
shl rcx, 4
xor edx, edx
nop
cmp qword [rsi + rdx], 0xffffffffffffffff
jne 0x14006ffa8
add rdx, 0x10
cmp rcx, rdx
jne 0x14006ff70
xor ebx, ebx
test r8, r8
je 0x140070289
js 0x140070125
mov ecx, 0xfffffffe
cmp r8, rcx
cmovl rcx, r8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140070289
xor ecx, ecx
xor ebp, ebp
xor r14d, r14d
xor r15d, r15d
jmp 0x14006ffcc
inc rcx
cmp rcx, rax
je 0x1400700d2
mov r9, rcx
shl r9, 4
mov word [rsi + r9 + 0xa], 0
mov rdx, qword [rsi + r9]
cmp rdx, 0xffffffffffffffff
je 0x14006ffc0
movzx r9d, word [rsi + r9 + 8]
test r9d, 0x710
je 0x14006ffc0
test r9d, 0x300
je 0x140070039
mov r10d, ebp
xor r11d, r11d
test ebp, ebp
je 0x140070025
nop word [rax + rax]
cmp qword [rsp + r11*8 + 0x450], rdx
je 0x140070025
inc r11
cmp r10, r11
jne 0x140070010
mov r11d, r10d
cmp r11d, ebp
jne 0x140070039
cmp ebp, 0x3f
ja 0x140070039
mov qword [rsp + r10*8 + 0x450], rdx
inc ebp
test r9b, 0x10
je 0x14007007b
mov r10d, r14d
xor r11d, r11d
test r14d, r14d
je 0x140070065
nop word [rax + rax]
cmp qword [rsp + r11*8 + 0x248], rdx
je 0x140070065
inc r11
cmp r10, r11
jne 0x140070050
mov r11d, r10d
cmp r11d, r14d
jne 0x14007007b
cmp r14d, 0x3f
ja 0x14007007b
mov qword [rsp + r10*8 + 0x248], rdx
inc r14d
test r9d, 0x600
je 0x14006ffc0
mov r9d, r15d
xor r10d, r10d
test r15d, r15d
je 0x1400700b2
nop word cs:[rax + rax]
cmp qword [rsp + r10*8 + 0x40], rdx
je 0x1400700b2
inc r10
cmp r9, r10
jne 0x1400700a0
mov r10d, r9d
cmp r10d, r15d
jne 0x14006ffc0
cmp r15d, 0x3f
ja 0x14006ffc0
mov qword [rsp + r9*8 + 0x40], rdx
inc r15d
jmp 0x14006ffc0
mov dword [rsp + 0x448], ebp
mov dword [rsp + 0x240], r14d
mov dword [rsp + 0x38], r15d
test ebp, ebp
jne 0x14007013a
test r14d, r14d
jne 0x14007013a
test r15d, r15d
jne 0x14007013a
xor ebx, ebx
test r8, r8
je 0x140070272
js 0x1400702af
mov ecx, 0xfffffffe
cmp r8, rcx
cmovl rcx, r8
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp ebx, 0xffffffff
jne 0x140070289
jmp 0x140070277
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov ebx, 0xffffffff
jmp 0x140070289
lea rcx, [rsp + 0x30]
mov rdx, r8
call fcn.14007f300
xor ebx, ebx
test r15d, r15d
lea r9, [rsp + 0x38]
cmove r9, rbx
test r14d, r14d
lea r8, [rsp + 0x240]
cmove r8, rbx
test ebp, ebp
lea rdx, [rsp + 0x448]
cmove rdx, rbx
mov qword [rsp + 0x20], rax
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x140070270
cmp edi, 2
mov r12d, 1
cmovae r12d, edi
shl r12, 4
lea rdi, [rsp + 0x448]
lea r14, [rsp + 0x240]
lea r15, [rsp + 0x38]
xor r13d, r13d
jmp 0x1400701d7
cmp word [rsi + r13 + 0xa], 1
sbb ebx, 0xffffffff
add r13, 0x10
cmp r12, r13
je 0x140070289
mov word [rsi + r13 + 0xa], 0
mov rcx, qword [rsi + r13]
cmp rcx, 0xffffffffffffffff
je 0x1400701ca
mov rdx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140070215
movzx eax, word [rsi + r13 + 8]
test eax, 0x100
je 0x140070208
or byte [rsi + r13 + 0xb], 1
test eax, 0x300
je 0x140070215
or byte [rsi + r13 + 0xb], 3
mov rcx, qword [rsi + r13]
mov rdx, r14
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140070233
test byte [rsi + r13 + 8], 0x10
je 0x140070233
or byte [rsi + r13 + 0xa], 0x10
mov rcx, qword [rsi + r13]
mov rdx, r15
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1400701c0
movzx eax, word [rsi + r13 + 8]
test eax, 0x200
je 0x14007025a
or byte [rsi + r13 + 0xb], 2
test eax, 0x400
je 0x1400701c0
or byte [rsi + r13 + 0xb], 4
jmp 0x1400701c0
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x140070289
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ebx, ebx
cmp eax, 0x2714
setne bl
neg ebx
mov rcx, qword [rsp + 0x650]
xor rcx, rsp
call fcn.140080da0
mov eax, ebx
add rsp, 0x658
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov ebx, 0xffffffff
cmp ebx, 0xffffffff
jne 0x140070289
jmp 0x140070277