Function at 0x140045fe0
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x570]
sub rsp, 0x670
xor edi, edi
mov rsi, r8
mov r14d, edx
test rcx, rcx
je 0x140046024
mov r8d, edi
test edx, edx
je 0x140046024
mov rax, rcx
cmp qword [rax], 0xffffffffffffffff
jne 0x140046052
inc r8d
add rax, 0x10
cmp r8d, r14d
jb 0x140046012
test rsi, rsi
je 0x1400463a0
jns 0x140046387
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
or edi, 0xffffffff
mov eax, edi
add rsp, 0x670
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
mov qword [rsp + 0x6a8], rbx
mov qword [rsp + 0x668], r12
or r15, 0xffffffffffffffff
mov qword [rsp + 0x660], r13
mov r10d, edi
mov dword [rbp + 0x140], edi
mov r12, r15
mov r13d, edi
mov r11d, edi
mov dword [rsp + 0x30], edi
mov r8d, edi
mov dword [rbp + 0x350], edi
lea rbx, [rcx + 8]
mov rax, qword [rbx - 8]
mov word [rbx + 2], di
cmp rax, 0xffffffffffffffff
je 0x14004618e
jae 0x1400461ba
movzx r9d, word [rbx]
test r9b, 7
je 0x14004618e
cmp rax, r12
cmova r12, rax
test r9b, 1
je 0x140046108
mov edx, edi
mov rcx, rdi
test r10d, r10d
je 0x1400460e4
nop
cmp qword [rbp + rcx*8 + 0x148], rax
je 0x1400460e4
inc edx
inc rcx
cmp edx, r10d
jb 0x1400460d0
cmp edx, r10d
jne 0x140046108
cmp r10d, 0x40
jae 0x140046108
mov qword [rbp + rcx*8 + 0x148], rax
mov r10d, dword [rbp + 0x140]
inc r10d
mov dword [rbp + 0x140], r10d
test r9b, 4
je 0x140046146
mov edx, edi
mov rcx, rdi
test r11d, r11d
je 0x140046129
cmp qword [rsp + rcx*8 + 0x38], rax
je 0x140046129
inc edx
inc rcx
cmp edx, r11d
jb 0x140046118
cmp edx, r11d
jne 0x140046146
cmp r11d, 0x40
jae 0x140046146
mov qword [rsp + rcx*8 + 0x38], rax
mov r11d, dword [rsp + 0x30]
inc r11d
mov dword [rsp + 0x30], r11d
test r9b, 2
je 0x14004618e
mov edx, edi
mov rcx, rdi
test r8d, r8d
je 0x14004616a
cmp qword [rbp + rcx*8 + 0x358], rax
je 0x14004616a
inc edx
inc rcx
cmp edx, r8d
jb 0x140046156
cmp edx, r8d
jne 0x14004618e
cmp r8d, 0x40
jae 0x14004618e
mov qword [rbp + rcx*8 + 0x358], rax
mov r8d, dword [rbp + 0x350]
inc r8d
mov dword [rbp + 0x350], r8d
inc r13d
add rbx, 0x10
cmp r13d, r14d
jb 0x140046091
test r10d, r10d
jne 0x140046222
test r11d, r11d
jne 0x140046222
test r8d, r8d
jne 0x140046222
test rsi, rsi
jne 0x1400461ef
mov r15d, edi
jmp 0x1400462c0
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, r15d
mov r12, qword [rsp + 0x668]
mov rbx, qword [rsp + 0x6a8]
mov r13, qword [rsp + 0x660]
add rsp, 0x670
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
jns 0x140046201
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
jmp 0x1400462c0
mov ecx, 0xffffffff
mov eax, 0xfffffffe
cmp rsi, rcx
cmovge rsi, rax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_Sleep]
mov r15d, edi
jmp 0x1400462c0
lea rbx, [rbp + 0x5b8]
test rsi, rsi
jns 0x140046233
mov rbx, rdi
jmp 0x140046285
jle 0x14004627e
movabs rax, 0x20c49ba5e353f7cf
imul rsi
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov rax, rdx
imul rax, rax, 0x3e8
sub rsi, rax
mov eax, 0x7fffffff
imul rsi, rsi, 0x3e8
cmp rdx, rax
cmovg rdx, rax
mov dword [rbp + 0x5b8], edx
mov dword [rbp + 0x5bc], esi
jmp 0x140046285
mov qword [rbp + 0x5b8], rdi
test r8d, r8d
lea r9, [rbp + 0x350]
lea r8, [rsp + 0x30]
cmove r9, rdi
test r11d, r11d
lea rdx, [rbp + 0x140]
cmove r8, rdi
test r10d, r10d
lea ecx, [r12 + 1]
cmove rdx, rdi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.WS2_32.dll_select]
mov r15d, eax
test r15d, r15d
jle 0x1400461c5
mov rbx, qword [rbp + 0x5a0]
mov esi, edi
mov r12, r14
add rbx, 0xa
nop dword [rax]
mov rcx, qword [rbx - 0xa]
mov word [rbx], di
cmp rcx, 0xffffffffffffffff
je 0x140046373
lea rdx, [rbp + 0x140]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140046318
movzx eax, word [rbx - 2]
and ax, 1
je 0x14004630f
or word [rbx], 1
test ax, ax
je 0x140046318
or word [rbx], 1
mov rcx, qword [rbx - 0xa]
lea rdx, [rsp + 0x30]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140046341
movzx eax, word [rbx - 2]
and ax, 4
je 0x140046338
or word [rbx], 4
test ax, ax
je 0x140046341
or word [rbx], 4
mov rcx, qword [rbx - 0xa]
lea rdx, [rbp + 0x350]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x14004636c
movzx eax, word [rbx - 2]
and ax, 2
je 0x140046363
or word [rbx], 2
test ax, ax
je 0x14004636c
or word [rbx], 2
cmp word [rbx], di
je 0x140046373
inc esi
add rbx, 0x10
dec r12
jne 0x1400462e0
mov eax, esi
jmp 0x1400461c8
mov ecx, 0xffffffff
mov eax, 0xfffffffe
cmp rsi, rcx
cmovge rsi, rax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, edi
add rsp, 0x670
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret