Function at 0x140008ae0
Capabilities:
Get socket status
Set socket configuration

Disassembly:
push rbx
push rdi
sub rsp, 0x268
mov rbx, rcx
add rcx, 0xad0
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp qword [rbx + 0x1688], 0
jne 0x140008b5a
mov ecx, dword [rbx + 0x16a8]
lea rdx, [0x1401ae572]
add ecx, 0x10
call fcn.14002ec60
mov qword [rbx + 0x1688], rax
test rax, rax
jne 0x140008b5a
lea rcx, [rbx + 0x2ac]
mov edx, 0x100
lea r9, [rax - 1]
lea r8, str.tls___handshake_no_memory
call fcn.14003c5c8
lea rcx, [rbx + 0xad0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
add rsp, 0x268
pop rdi
pop rbx
ret
mov qword [rsp + 0x260], rbp
lea rcx, [rbx + 0xad0]
xor ebp, ebp
mov qword [rsp + 0x258], rsi
mov qword [rbx + 0x1690], rbp
mov qword [rbx + 0x1698], rbp
mov qword [rbx + 0x16a0], rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea rdx, [rsp + 0x280]
mov byte [rsp + 0x280], bpl
mov rcx, rbx
call fcn.140008750
test al, al
jne 0x140008bd6
lea rcx, [rbx + 0x2ac]
cmp word [rcx], bp
jne 0x140008da8
lea r9, [rbp - 1]
mov edx, 0x100
lea r8, str.tls___handshake_start_failed
call fcn.14003c5c8
xor al, al
jmp 0x140008d5f
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
mov rsi, rax
cmp byte [rsp + 0x280], bpl
jne 0x140008d56
nop dword [rax]
mov rcx, qword [rbx + 8]
mov edx, 1
mov qword [rsp + 0x298], rbp
mov dword [rsp + 0x288], edx
cmp rcx, 0xffffffffffffffff
je 0x140008c96
lea r8, [rsp + 0x288]
mov edx, 0x4004667f
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x140008c38
mov rcx, rbx
call fcn.140003bf0
mov edx, 1
jmp 0x140008c96
mov edx, dword [rsp + 0x288]
test edx, edx
jne 0x140008c96
mov rax, qword [rbx + 8]
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x48], rax
xor r9d, r9d
lea rax, [rsp + 0x290]
mov dword [rsp + 0x40], 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor ecx, ecx
mov dword [rsp + 0x290], ebp
mov dword [rsp + 0x294], 0x3e8
call qword [sym.imp.WS2_32.dll_select]
mov edx, 1
test eax, eax
jg 0x140008c96
mov edx, dword [rsp + 0x288]
cmp qword [rbx + 8], 0xffffffffffffffff
mov edi, edx
je 0x140008da8
test edx, edx
jne 0x140008cc9
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
sub rax, rsi
cmp rax, 0x2710
ja 0x140008da8
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140008d34
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
mov rcx, qword [rbx + 0x1690]
lea r9, [rsp + 0x298]
movsxd r8, dword [rbx + 0x16a8]
mov rsi, rax
mov rdx, qword [rbx + 0x1688]
lea rax, [rsp + 0x288]
sub r8, rcx
mov byte [rsp + 0x30], bpl
cmp rdi, r8
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x288], ebp
cmovbe r8, rdi
mov qword [rsp + 0x20], rax
add rdx, rcx
mov rcx, rbx
call fcn.140007bb0
test al, al
je 0x140008d79
mov rax, qword [rsp + 0x298]
add qword [rbx + 0x1690], rax
lea rdx, [rsp + 0x280]
mov rcx, rbx
call fcn.140008750
test al, al
je 0x140008da8
cmp byte [rsp + 0x280], bpl
je 0x140008bf0
mov byte [rbx + 0x16b0], 1
mov al, 1
mov rbp, qword [rsp + 0x260]
mov rsi, qword [rsp + 0x258]
add rsp, 0x268
pop rdi
pop rbx
ret
lea rcx, [rbx + 0x2ac]
cmp word [rcx], bp
jne 0x140008da8
mov eax, dword [rsp + 0x288]
lea r9, str.tls___handshake_read_failed___u_error
mov edx, 0x100
mov dword [rsp + 0x20], eax
mov r8, 0xffffffffffffffff
call fcn.140003dd0
xor al, al
jmp 0x140008d5f