Function at 0x1401797d0
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov rax, qword [0x1405d3230]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov rbp, r8
mov rdi, rcx
lea r13, [rcx + 0x30]
mov qword [rsp + 0x30], r13
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r15b, 1
mov byte [rsp + 0x38], r15b
cmp byte [rdi + 0x198], 0
jne 0x140179b75
lea r12, [rdi + 0x148]
mov rax, qword [r12]
xor esi, esi
mov dword [rax], esi
mov qword [r12 + 0x10], 0xffffffffffffffff
mov rax, qword [rdi + 0x160]
mov dword [rax], esi
mov qword [rdi + 0x170], 0xffffffffffffffff
mov rax, qword [rdi + 0x178]
mov dword [rax], esi
mov qword [rdi + 0x188], 0xffffffffffffffff
mov rbx, qword [rdi + 0x58]
mov ecx, esi
mov r8, qword [r12]
mov edx, dword [r8]
test edx, edx
je 0x140179880
mov eax, ecx
cmp qword [r8 + rax*8 + 8], rbx
je 0x14017989b
inc ecx
cmp ecx, edx
jb 0x140179871
inc edx
mov rcx, r12
call fcn.1401783e0
mov rcx, qword [r12]
mov eax, dword [rcx]
mov qword [rcx + rax*8 + 8], rbx
mov rax, qword [r12]
inc dword [rax]
mov rbx, qword [rdi + 0x190]
test rbx, rbx
je 0x1401798bd
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test al, al
je 0x1401798cf
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x1401798a7
xor al, al
nop
test al, al
jne 0x1401798d3
cmp qword [rdi + 0x78], rsi
jne 0x1401798d3
xor r14b, r14b
jmp 0x1401798d6
mov al, 1
jmp 0x1401798c0
mov r14b, 1
lea rdx, [rdi + 0x68]
mov rcx, r12
call fcn.1401781f0
mov rbx, qword [rdi + 0x158]
test rbx, rbx
cmove rbx, rsi
lea rdx, [rdi + 0x38]
test r14b, r14b
jne 0x1401798ff
cmp qword [rdx + 0x78], rsi
je 0x140179902
mov r14b, 1
add rdx, 0x68
lea rcx, [rdi + 0x160]
call fcn.1401781f0
mov rax, qword [rdi + 0x170]
cmp rax, rbx
cmova rbx, rax
lea rdx, [rdi + 0x70]
add rdx, 0x68
lea rcx, [rdi + 0x178]
call fcn.1401781f0
mov rax, qword [rdi + 0x188]
cmp rax, rbx
cmova rbx, rax
lea rcx, [rdi + 0x160]
lea rdx, [rdi + 0x110]
call fcn.1401781f0
mov rax, qword [rdi + 0x170]
cmp rax, rbx
cmova rbx, rax
lea r14, [rdi + 0x178]
lea rdx, [rdi + 0x110]
mov rcx, r14
call fcn.1401781f0
mov rax, qword [rdi + 0x188]
cmp rax, rbx
cmovbe rax, rbx
mov qword [rsp + 0x40], rax
mov ecx, 0x11e1a300
mov rbx, qword [rdi + 0x190]
test rbx, rbx
je 0x1401799b6
nop dword [rax]
mov rax, qword [rbx]
mov edx, ecx
mov rcx, rbx
call qword [rax + 0x18]
mov ecx, eax
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x1401799a0
mov eax, 0x431bde83
imul ecx
sar edx, 0x12
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [rsp + 0x60], edx
imul eax, edx, 0xf4240
sub ecx, eax
mov dword [rsp + 0x64], ecx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor r15b, r15b
mov byte [rsp + 0x38], r15b
mov r9, qword [r14]
mov r8, qword [rdi + 0x160]
mov rdx, qword [r12]
test rdx, rdx
jne 0x140179a35
test r8, r8
jne 0x140179a35
test r9, r9
jne 0x140179a35
mov eax, 0x10624dd3
imul dword [rsp + 0x64]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul eax, dword [rsp + 0x60], 0x3e8
add ecx, eax
mov eax, 1
cmove ecx, eax
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140179add
cmp dword [rsp + 0x60], esi
jne 0x140179a55
mov ecx, dword [rsp + 0x64]
lea eax, [rcx - 1]
mov r10d, 0x3e8
cmp eax, 0x3e6
cmovbe ecx, r10d
mov dword [rsp + 0x64], ecx
mov rcx, qword [rsp + 0x40]
inc ecx
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
mov ebx, eax
mov edx, eax
shr edx, 0x1f
lea rcx, [rsp + 0x48]
call fcn.140174950
mov esi, ebx
test ebx, ebx
jle 0x140179add
mov rdx, qword [r12]
mov rcx, qword [rdi + 0x58]
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x140179add
lea rcx, [rdi + 0x58]
call fcn.140178f90
test al, al
jne 0x140179ad6
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [rsp + 0x38], 1
mov byte [rdi + 0x198], 1
mov rcx, qword [rdi + 0x28]
lock inc dword [rcx + 0x30]
lea rdx, [rdi + 0x1a8]
call fcn.140177530
movzx r15d, byte [rsp + 0x38]
mov r13, qword [rsp + 0x30]
dec esi
test r15b, r15b
jne 0x140179aee
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r15b, 1
mov byte [rsp + 0x38], r15b
test esi, esi
jle 0x140179b4b
mov r8, rbp
lea rdx, [rdi + 0x110]
mov rcx, r14
call fcn.1401782d0
mov r8, rbp
lea rdx, [rdi + 0x110]
lea rcx, [rdi + 0x160]
call fcn.1401782d0
mov ebx, 2
lea rsi, [rdi + 0xd8]
nop word [rax + rax]
mov r8, rbp
mov rdx, rsi
mov rcx, r14
call fcn.1401782d0
sub r14, 0x18
sub rsi, 0x38
sub ebx, 1
jns 0x140179b30
mov rbx, qword [rdi + 0x190]
test rbx, rbx
je 0x140179b75
nop word [rax + rax]
mov rax, qword [rbx]
mov rdx, rbp
mov rcx, rbx
call qword [rax + 0x20]
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x140179b60
test r15b, r15b
je 0x140179b83
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.14045a250
mov rbx, qword [rsp + 0xb8]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret