Function at 0x1400a5998
Capabilities:
Connect socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], rbx
mov dword [rax + 0x20], r9d
mov dword [rax + 0x10], edx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x3f8]
sub rsp, 0x4c0
xor r13d, r13d
mov r14d, r8d
mov rbx, rcx
mov edi, r13d
test rcx, rcx
je 0x1400a5de3
lea eax, [r13 + 2]
lea r15d, [r13 + 0x17]
bt r8d, 0x1c
jae 0x1400a59ed
mov esi, r15d
btr r14d, 0x1c
jmp 0x1400a59ef
mov esi, eax
mov eax, 1
test r14d, r14d
mov ecx, esi
cmove r14d, eax
xor r8d, r8d
mov edx, r14d
call qword [sym.imp.WS2_32.dll_socket]
mov r12, rax
cmp eax, 0xffffffff
je 0x1400a5de3
mov rcx, rbx
call fcn.1401662b0
mov rbx, rax
mov qword [rsp + 0x50], rax
cmp esi, r15d
jne 0x1400a5a85
cmp dword [0x141ef6654], r13d
je 0x1400a5dcb
lea r8, [rbp - 0x78]
mov rdx, rax
mov ecx, r15d
call fcn.1400a5588
test eax, eax
jg 0x1400a5a7c
lea r9, [rbp - 0x80]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [0x141ef6660]
test rax, rax
jne 0x1400a5dcb
mov rcx, qword [rbp - 0x80]
mov rax, qword [rcx + 0x20]
movups xmm0, xmmword [rax + 8]
movdqu xmmword [rbp - 0x78], xmm0
call qword [0x141ef6668]
mov r15d, dword [rbp + 0x400]
jmp 0x1400a5ac3
mov rcx, rax
call qword [sym.imp.WS2_32.dll_inet_addr]
or ebx, 0xffffffff
mov r15d, eax
cmp eax, ebx
jne 0x1400a5ab2
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
je 0x1400a5ab2
mov rax, qword [rax + 0x18]
mov rcx, qword [rax]
mov r15d, dword [rcx]
cmp r15d, ebx
mov eax, r13d
setne al
test eax, eax
je 0x1400a5dcb
mov r13d, dword [rbp + 0x428]
mov rbx, qword [rbp + 0x420]
xor eax, eax
test r13d, r13d
jne 0x1400a5aea
test rbx, rbx
je 0x1400a5b6b
cmp word [rbx], ax
je 0x1400a5b6b
xor edx, edx
lea rcx, [rsp + 0x40]
lea r8d, [rdx + 0x10]
call sub.msvcrt.dll_memset
mov eax, 2
mov word [rsp + 0x40], ax
test r13d, r13d
je 0x1400a5b18
movzx ecx, r13w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x42], ax
xor r13d, r13d
test rbx, rbx
je 0x1400a5b48
cmp word [rbx], r13w
je 0x1400a5b48
mov rcx, rbx
call fcn.140166740
mov rcx, rax
mov rbx, rax
call qword [sym.imp.WS2_32.dll_inet_addr]
mov rcx, rbx
mov dword [rsp + 0x44], eax
call fcn.140166730
jmp 0x1400a5b4d
mov dword [rsp + 0x44], r13d
lea rdx, [rsp + 0x40]
movsxd rcx, r12d
mov r8d, reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x1400a5dcb
jmp 0x1400a5b6e
xor r13d, r13d
xor edx, edx
cmp esi, 0x17
jne 0x1400a5baa
lea r8d, [rdx + 0x1c]
lea rcx, [rsp + 0x60]
call sub.msvcrt.dll_memset
movzx ecx, word [rbp + 0x408]
mov r15d, esi
mov word [rsp + 0x60], r15w
call qword [sym.imp.WS2_32.dll_htons]
movups xmm0, xmmword [rbp - 0x78]
mov word [rsp + 0x62], ax
movdqu xmmword [rsp + 0x68], xmm0
jmp 0x1400a5be1
lea rcx, [rsp + 0x30]
mov r8d, reloc.WS2_32.dll_recv
call sub.msvcrt.dll_memset
movzx ecx, word [rbp + 0x408]
mov eax, 2
mov word [rsp + 0x30], ax
call qword [sym.imp.WS2_32.dll_htons]
mov dword [rsp + 0x34], r15d
mov word [rsp + 0x32], ax
mov r15d, reloc.WS2_32.dll_socket
mov eax, 1
movsxd rbx, r12d
mov rcx, rbx
cmp r14d, eax
jne 0x1400a5d50
mov r14d, dword [rbp + 0x418]
test r14d, r14d
jle 0x1400a5ce9
lea r8, [rbp + 0x400]
mov edx, 0x8004667e
mov dword [rbp + 0x400], eax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x1400a5dcb
mov rcx, rbx
cmp esi, r15d
jne 0x1400a5c38
lea r8d, [rax + 0x1c]
lea rdx, [rsp + 0x60]
jmp 0x1400a5c43
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1400a5dcb
lea esi, [rax + 2]
mov eax, 0x10624dd3
lea ecx, [r12 + 1]
lea r9, [rbp + 0x1b0]
lea r8, [rbp - 0x60]
mov qword [rbp - 0x58], rbx
imul r14d
sar edx, 6
mov dword [rbp - 0x60], esi
mov qword [rbp + 0x1b8], rbx
mov eax, edx
mov dword [rbp + 0x1b0], esi
shr eax, 0x1f
add edx, eax
mov dword [rsp + 0x58], edx
imul eax, edx, 0x3e8
sub r14d, eax
xor edx, edx
imul eax, r14d, 0x3e8
mov dword [rsp + 0x5c], eax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
cmp eax, esi
jne 0x1400a5ccb
lea rdx, [rbp - 0x60]
mov rcx, rbx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
cmovne rdi, rsi
lea r8, [rbp + 0x400]
mov edx, 0x8004667e
mov rcx, rbx
mov dword [rbp + 0x400], r13d
call qword [sym.imp.WS2_32.dll_ioctlsocket]
jmp 0x1400a5d1c
cmp esi, r15d
jne 0x1400a5cfb
mov r8d, 0x1c
lea rdx, [rsp + 0x60]
jmp 0x1400a5d06
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1400a5dcb
mov esi, 1
mov edi, esi
test rdi, rdi
je 0x1400a5dcb
mov rcx, qword [0x141ef53a0]
xor edx, edx
lea r8d, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x1400a5dcb
mov dword [rax], esi
mov qword [rax + 8], rbx
mov qword [rax + 0x10], r13
jmp 0x1400a5dcb
lea r8, [rbp + 0x400]
mov edx, 0x8004667e
mov dword [rbp + 0x400], eax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x1400a5dcb
mov rcx, qword [0x141ef53a0]
lea r8d, [rax + 0x50]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x1400a5dcb
mov eax, 2
mov dword [rdi], eax
cmp esi, r15d
jne 0x1400a5db0
movups xmm0, xmmword [rsp + 0x60]
movups xmmword [rdi + 4], xmm0
movsd xmm1, qword [rsp + 0x70]
movsd qword [rdi + 0x14], xmm1
mov eax, dword [rsp + 0x78]
mov dword [rdi + 0x1c], eax
jmp 0x1400a5dba
movups xmm0, xmmword [rsp + 0x30]
movdqu xmmword [rdi + 4], xmm0
cmp esi, r15d
mov qword [rdi + 0x30], rbx
mov qword [rdi + 0x28], r13
sete al
mov byte [rdi + 0x20], al
mov rcx, qword [rsp + 0x50]
call fcn.1401662a0
test rdi, rdi
jne 0x1400a5de3
movsxd rcx, r12d
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, rdi
mov rbx, qword [rsp + 0x510]
add rsp, 0x4c0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret