Function at 0x140048f04
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 0x14004927a
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 0x140048f62
mov rbx, qword [rdi + 0x58]
xor ecx, ecx
mov r8, qword [r14]
mov edx, dword [r8]
test edx, edx
je 0x140048f94
cmp qword [r8 + rcx*8 + 8], rbx
je 0x140048fae
add ecx, r13d
cmp ecx, edx
jb 0x140048f86
inc edx
mov rcx, r14
call fcn.140048760
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 0x140048fcf
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
test al, al
je 0x140049060
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x140048fba
lea rax, [rdi + 0x158]
mov qword [rbp + 0x60], rax
lea r13, [rdi + 0x78]
lea r15, [rdi + 0x68]
mov rsi, qword [rbp + 0x58]
mov eax, 1
mov qword [rbp - 0x40], r12
test bl, bl
jne 0x140048fff
cmp qword [r13], 0
je 0x140049001
mov bl, al
mov r8, rsi
mov rdx, r15
mov rcx, r14
call fcn.14004b148
mov rax, qword [rbp + 0x60]
mov r12, qword [rax]
cmp r12, qword [rbp - 0x40]
cmovbe r12, qword [rbp - 0x40]
add r15, 0x38
add r14, 0x18
add r13, 0x38
add rax, 0x18
mov qword [rbp + 0x60], rax
mov eax, 1
sub qword [rbp - 0x48], rax
jne 0x140048ff0
test bl, bl
mov sil, byte [rbp - 0x30]
lea r14, [rdi + 0x148]
mov r15, qword [rbp - 0x38]
jne 0x140049068
cmp qword [rdi + 0x120], 0
jne 0x140049068
xor r13b, r13b
jmp 0x14004906b
mov bl, r13b
jmp 0x140048fd4
mov r13b, al
lea rdx, [rdi + 0x110]
lea rcx, [rdi + 0x160]
mov r8, qword [rbp + 0x58]
call fcn.14004b148
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.14004b148
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 0x1400490cc
test r13b, r13b
je 0x14004927a
xor r13d, r13d
mov qword [rbp + 0x48], r13
test eax, eax
je 0x1400490ea
lea r8, [rbp + 0x48]
mov edx, eax
mov rcx, rdi
call fcn.140034940
mov rbx, rax
jmp 0x1400490ee
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 0x140049151
test r8, r8
jne 0x140049151
test r9, r9
jne 0x140049151
test rbx, rbx
je 0x14004916e
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 0x1400491ea
test rbx, rbx
je 0x14004916e
cmp dword [rbx], r13d
jne 0x14004916e
mov eax, dword [rbx + 4]
dec eax
cmp eax, 0x3e6
ja 0x14004916e
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.1400332a4
test ebx, ebx
jle 0x1400491ea
mov rdx, qword [r14]
mov rcx, qword [rdi + 0x58]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1400491ea
lea rcx, [rdi + 0x58]
call fcn.1400489c8
test al, al
jne 0x1400491e3
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.1400407c8
mov sil, byte [rbp - 0x30]
mov r15, qword [rbp - 0x38]
dec ebx
test sil, sil
jne 0x1400491fe
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 0x14004925c
mov r8, r13
lea rbx, [rdi + 0x110]
mov rdx, rbx
mov rcx, r12
call fcn.140040220
mov r8, r13
mov rdx, rbx
lea rcx, [rdi + 0x160]
call fcn.140040220
mov ebx, 2
lea r14, [rdi + 0xd8]
lea r15d, [rbx - 1]
mov r8, r13
mov rdx, r14
mov rcx, r12
call fcn.140040220
sub r14, 0x38
sub r12, 0x18
sub ebx, r15d
jns 0x14004923d
mov r15, qword [rbp - 0x38]
mov rbx, qword [rdi + 0x190]
jmp 0x140049275
mov rax, qword [rbx]
mov rdx, r13
mov rcx, rbx
call qword [rax + 0x20]
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x140049265
test sil, sil
je 0x140049288
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