Function at 0x1400ca040
Capabilities:
Get socket status

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x5a0]
sub rsp, 0x6a0
xor ebx, ebx
mov eax, 0x7fffffff
mov rdi, r9
cmp r9, rax
mov r14, r8
mov rsi, rdx
cmovge rdi, rax
mov r13, rcx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x38], ebx
mov r15d, ebx
cmp rcx, 0xffffffffffffffff
jne 0x1400ca0ba
cmp rdx, rcx
jne 0x1400ca0ba
cmp r8, rcx
jne 0x1400ca0ba
test edi, edi
je 0x1400ca0b3
jns 0x1400ca0ab
mov ecx, 0x2726
call qword [sym.imp.WSOCK32.DLL_WSASetLastError]
or ebx, r13d
mov eax, ebx
jmp 0x1400ca3ad
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, ebx
jmp 0x1400ca3ad
mov qword [rsp + 0x6e8], r12
movaps xmmword [rsp + 0x690], xmm6
test rdi, rdi
jle 0x1400ca0e1
lea rcx, [rsp + 0x40]
mov r15d, edi
call fcn.1400d2fb0
movups xmm6, xmmword [rax]
jmp 0x1400ca0e6
movaps xmm6, xmmword [rsp + 0x30]
or r8, 0xffffffffffffffff
mov ecx, ebx
mov dword [rsp + 0x60], ebx
mov r9d, ebx
mov dword [rbp + 0x170], ebx
lea eax, [r8 + 2]
cmp r13, r8
je 0x1400ca120
mov qword [rbp + 0x178], r13
mov r9d, eax
mov dword [rbp + 0x170], eax
mov qword [rsp + 0x68], r13
mov ecx, eax
mov dword [rsp + 0x60], eax
mov r8, r13
cmp rsi, 0xffffffffffffffff
je 0x1400ca1a5
mov edx, ebx
test r9d, r9d
je 0x1400ca144
mov eax, edx
cmp qword [rbp + rax*8 + 0x178], rsi
je 0x1400ca144
inc edx
cmp edx, r9d
jb 0x1400ca131
cmp edx, r9d
jne 0x1400ca16a
cmp r9d, 0x40
jae 0x1400ca16a
mov eax, edx
mov qword [rbp + rax*8 + 0x178], rsi
mov r9d, dword [rbp + 0x170]
inc r9d
mov dword [rbp + 0x170], r9d
mov edx, ebx
test ecx, ecx
je 0x1400ca17f
mov eax, edx
cmp qword [rsp + rax*8 + 0x68], rsi
je 0x1400ca17f
inc edx
cmp edx, ecx
jb 0x1400ca170
cmp edx, ecx
jne 0x1400ca199
cmp ecx, 0x40
jae 0x1400ca199
mov eax, edx
mov qword [rsp + rax*8 + 0x68], rsi
mov ecx, dword [rsp + 0x60]
inc ecx
mov dword [rsp + 0x60], ecx
cmp rsi, r8
mov eax, 1
cmova r8, rsi
mov dword [rbp + 0x380], ebx
cmp r14, 0xffffffffffffffff
je 0x1400ca1ee
mov qword [rbp + 0x388], r14
mov dword [rbp + 0x380], eax
mov edx, ebx
test ecx, ecx
je 0x1400ca1d3
mov eax, edx
cmp qword [rsp + rax*8 + 0x68], r14
je 0x1400ca1d3
inc edx
cmp edx, ecx
jb 0x1400ca1c4
cmp edx, ecx
jne 0x1400ca1e7
cmp ecx, 0x40
jae 0x1400ca1e7
mov eax, edx
mov qword [rsp + rax*8 + 0x68], r14
inc dword [rsp + 0x60]
cmp r14, r8
cmova r8, r14
lea r12, [rbp + 0x5f8]
lea r10d, [r8 + 1]
test rdi, rdi
cmovs r12, rbx
mov dword [rbp + 0x5e0], r10d
test rdi, rdi
jle 0x1400ca23d
mov eax, 0x10624dd3
mov ecx, r15d
imul r15d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [rbp + 0x5f8], edx
imul eax, edx, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [rbp + 0x5fc], eax
jmp 0x1400ca246
jne 0x1400ca246
mov qword [rbp + 0x5f8], rbx
cmp dword [rbp + 0x380], ebx
lea r8, [rbp + 0x380]
lea rdx, [rbp + 0x170]
cmove r8, rbx
test r9d, r9d
lea r9, [rsp + 0x60]
mov ecx, r10d
cmove rdx, rbx
mov qword [rsp + 0x20], r12
call qword [sym.imp.WSOCK32.DLL_select]
cmp eax, 0xffffffff
jne 0x1400ca2f3
call qword [sym.imp.WSOCK32.DLL_WSAGetLastError]
test eax, eax
je 0x1400ca296
cmp dword [0x14015f5e4], ebx
jne 0x1400ca2f7
cmp eax, 0x2714
jne 0x1400ca2f7
test rdi, rdi
jg 0x1400ca2ae
mov r9d, dword [rbp + 0x170]
mov r10d, dword [rbp + 0x5e0]
jmp 0x1400ca207
lea rcx, [rsp + 0x50]
movdqa xmmword [rsp + 0x30], xmm6
call fcn.1400d2fb0
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x40]
movups xmm0, xmmword [rax]
movaps xmmword [rsp + 0x40], xmm0
call fcn.1400d3030
mov r15d, edi
sub r15d, eax
test r15d, r15d
jle 0x1400ca301
mov r9d, dword [rbp + 0x170]
mov r10d, dword [rbp + 0x5e0]
jmp 0x1400ca207
test eax, eax
jns 0x1400ca2ff
or eax, 0xffffffff
jmp 0x1400ca39d
jne 0x1400ca308
xor eax, eax
jmp 0x1400ca39d
cmp r13, 0xffffffffffffffff
je 0x1400ca33b
lea rdx, [rbp + 0x170]
mov rcx, r13
call sub.WSOCK32.DLL___WSAFDIsSet
lea rdx, [rsp + 0x60]
mov rcx, r13
test eax, eax
mov eax, 1
cmovne ebx, eax
call sub.WSOCK32.DLL___WSAFDIsSet
test eax, eax
je 0x1400ca33b
or ebx, 4
cmp rsi, 0xffffffffffffffff
je 0x1400ca36b
lea rdx, [rbp + 0x170]
mov rcx, rsi
call sub.WSOCK32.DLL___WSAFDIsSet
test eax, eax
je 0x1400ca357
or ebx, 8
lea rdx, [rsp + 0x60]
mov rcx, rsi
call sub.WSOCK32.DLL___WSAFDIsSet
test eax, eax
je 0x1400ca36b
or ebx, 4
cmp r14, 0xffffffffffffffff
je 0x1400ca39b
lea rdx, [rbp + 0x380]
mov rcx, r14
call sub.WSOCK32.DLL___WSAFDIsSet
test eax, eax
je 0x1400ca387
or ebx, 2
lea rdx, [rsp + 0x60]
mov rcx, r14
call sub.WSOCK32.DLL___WSAFDIsSet
test eax, eax
je 0x1400ca39b
or ebx, 4
mov eax, ebx
mov r12, qword [rsp + 0x6e8]
movaps xmm6, xmmword [rsp + 0x690]
add rsp, 0x6a0
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret