Function at 0x1400490d8
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x78
mov rdi, rcx
lea r15, [rcx + 0x30]
mov qword [rbp - 0x38], r15
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r13d, 1
mov sil, r13b
mov byte [rbp - 0x30], r13b
cmp byte [rdi + 0x198], 0
jne 0x140049451
lea r14, [rdi + 0x148]
mov rcx, r14
lea eax, [r13 + 2]
mov qword [rbp - 0x48], rax
mov edx, eax
mov rax, qword [rcx]
and dword [rax], 0
or qword [rcx + 0x10], 0xffffffffffffffff
lea rcx, [rcx + 0x18]
sub rdx, r13
jne 0x140049136
mov rbx, qword [rdi + 0x58]
xor ecx, ecx
mov r8, qword [r14]
mov edx, dword [r8]
test edx, edx
je 0x140049168
cmp qword [r8 + rcx*8 + 8], rbx
je 0x140049182
add ecx, r13d
cmp ecx, edx
jb 0x14004915a
inc edx
mov rcx, r14
call fcn.140048aa4
mov rcx, qword [r14]
mov eax, dword [rcx]
mov qword [rcx + rax*8 + 8], rbx
mov rax, qword [r14]
add dword [rax], r13d
xor r12d, r12d
mov rbx, qword [rdi + 0x190]
jmp 0x1400491a3
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
test al, al
je 0x140049237
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x14004918e
lea rax, [rdi + 0x158]
mov qword [rbp + 0x60], rax
lea r13, [rdi + 0x78]
mov r15, r14
lea r14, [rdi + 0x68]
mov rsi, qword [rbp + 0x58]
mov eax, 1
mov qword [rbp - 0x40], r12
test bl, bl
jne 0x1400491d6
cmp qword [r13], 0
je 0x1400491d8
mov bl, al
mov r8, rsi
mov rdx, r14
mov rcx, r15
call fcn.14004b2ec
mov rax, qword [rbp + 0x60]
mov r12, qword [rax]
cmp r12, qword [rbp - 0x40]
cmovbe r12, qword [rbp - 0x40]
add r15, 0x18
add r14, 0x38
add r13, 0x38
add rax, 0x18
mov qword [rbp + 0x60], rax
mov eax, 1
sub qword [rbp - 0x48], rax
jne 0x1400491c7
test bl, bl
mov sil, byte [rbp - 0x30]
lea r14, [rdi + 0x148]
mov r15, qword [rbp - 0x38]
jne 0x14004923f
cmp qword [rdi + 0x120], 0
jne 0x14004923f
xor r13b, r13b
jmp 0x140049242
mov bl, r13b
jmp 0x1400491a8
mov r13b, al
lea rcx, [rdi + 0x160]
lea rdx, [rdi + 0x110]
mov r8, qword [rbp + 0x58]
call fcn.14004b2ec
mov rbx, qword [rdi + 0x170]
cmp rbx, r12
cmovbe rbx, r12
lea r12, [rdi + 0x178]
mov r8, qword [rbp + 0x58]
lea rdx, [rdi + 0x110]
mov rcx, r12
call fcn.14004b2ec
mov rax, qword [rdi + 0x188]
cmp rax, rbx
cmovbe rax, rbx
mov qword [rbp + 0x60], rax
mov eax, dword [rbp + 0x50]
test eax, eax
jne 0x1400492a3
test r13b, r13b
je 0x140049451
xor r13d, r13d
mov qword [rbp + 0x48], r13
test eax, eax
je 0x1400492c1
lea r8, [rbp + 0x48]
mov edx, eax
mov rcx, rdi
call fcn.140034ce0
mov rbx, rax
jmp 0x1400492c5
lea rbx, [rbp + 0x48]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov sil, r13b
mov byte [rbp - 0x30], r13b
mov r9, qword [r12]
mov r8, qword [rdi + 0x160]
mov rdx, qword [r14]
test rdx, rdx
jne 0x140049328
test r8, r8
jne 0x140049328
test r9, r9
jne 0x140049328
test rbx, rbx
je 0x140049345
mov eax, 0x10624dd3
imul dword [rbx + 4]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, dword [rbx], 0x3e8
add edx, eax
lea ecx, [r9 + 1]
cmove edx, ecx
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, r13d
jmp 0x1400493c1
test rbx, rbx
je 0x140049345
cmp dword [rbx], r13d
jne 0x140049345
mov eax, dword [rbx + 4]
dec eax
cmp eax, 0x3e6
ja 0x140049345
mov dword [rbx + 4], 0x3e8
mov rcx, qword [rbp + 0x60]
inc ecx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.WS2_32.dll_select]
mov ebx, eax
test eax, eax
sets dl
lea rcx, [rbp - 0x28]
call fcn.14003363c
test ebx, ebx
jle 0x1400493c1
mov rdx, qword [r14]
mov rcx, qword [rdi + 0x58]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1400493c1
lea rcx, [rdi + 0x58]
call fcn.140048b9c
test al, al
jne 0x1400493ba
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, 1
mov byte [rbp - 0x30], al
mov byte [rdi + 0x198], al
mov rcx, qword [rdi + 0x28]
lock add dword [rcx + 0x30], eax
lea rdx, [rdi + 0x1a8]
call fcn.140040ca0
mov sil, byte [rbp - 0x30]
mov r15, qword [rbp - 0x38]
dec ebx
test sil, sil
jne 0x1400493d5
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, 1
mov sil, al
mov byte [rbp - 0x30], al
mov r13, qword [rbp + 0x58]
test ebx, ebx
jle 0x140049433
mov r8, r13
lea rbx, [rdi + 0x110]
mov rdx, rbx
mov rcx, r12
call fcn.1400406f0
mov r8, r13
mov rdx, rbx
lea rcx, [rdi + 0x160]
call fcn.1400406f0
mov ebx, 2
lea r14, [rdi + 0xd8]
lea r15d, [rbx - 1]
mov r8, r13
mov rdx, r14
mov rcx, r12
call fcn.1400406f0
sub r12, 0x18
sub r14, 0x38
sub ebx, r15d
jns 0x140049414
mov r15, qword [rbp - 0x38]
mov rbx, qword [rdi + 0x190]
jmp 0x14004944c
mov rax, qword [rbx]
mov rdx, r13
mov rcx, rbx
call qword [rax + 0x20]
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x14004943c
test sil, sil
je 0x14004945f
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret