Function at 0x14009a5d0
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 - 0x408]
sub rsp, 0x4d0
xor r12d, r12d
mov edi, r8d
mov r14, rcx
mov ebx, r12d
test rcx, rcx
je 0x14009a9df
lea ecx, [r12 + 2]
lea eax, [rcx + 0x15]
bt r8d, 0x1c
jae 0x14009a623
mov esi, eax
btr edi, 0x1c
jmp 0x14009a625
mov esi, ecx
mov eax, 1
test edi, edi
mov ecx, esi
cmove edi, eax
xor r8d, r8d
mov edx, edi
call qword [sym.imp.WS2_32.dll_socket]
mov r15, rax
cmp eax, 0xffffffff
je 0x14009a9df
mov rcx, r14
call fcn.140166c50
mov r13, rax
mov eax, reloc.WS2_32.dll_socket
cmp esi, eax
jne 0x14009a6ba
cmp dword [0x14190d04c], r12d
je 0x14009a9c9
lea r8, [rsp + 0x70]
mov rdx, r13
mov ecx, eax
call fcn.14009ad94
test eax, eax
jg 0x14009a6b1
lea r9, [rsp + 0x68]
xor r8d, r8d
xor edx, edx
mov rcx, r13
call qword [0x14190d058]
test rax, rax
jne 0x14009a9c9
mov rcx, qword [rsp + 0x68]
mov rax, qword [rcx + 0x20]
movups xmm0, xmmword [rax + 8]
movdqu xmmword [rsp + 0x70], xmm0
call qword [0x14190d060]
mov r14d, dword [rbp + 0x410]
jmp 0x14009a6f5
mov rcx, r13
call qword [sym.imp.WS2_32.dll_inet_addr]
mov r14d, eax
cmp eax, 0xffffffff
jne 0x14009a6e3
mov rcx, r13
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
je 0x14009a6e3
mov rax, qword [rax + 0x18]
mov rcx, qword [rax]
mov r14d, dword [rcx]
cmp r14d, 0xffffffff
mov eax, r12d
setne al
test eax, eax
je 0x14009a9c9
mov r12, qword [rbp + 0x430]
xor eax, eax
cmp dword [rbp + 0x438], eax
jne 0x14009a712
test r12, r12
je 0x14009a764
cmp word [r12], ax
je 0x14009a764
xor edx, edx
lea rcx, [rbp - 0x70]
lea r8d, [rdx + 0x1c]
call fcn.140073950
xor edx, edx
lea rcx, [rbp - 0x80]
lea r8d, [rdx + 0x10]
call fcn.140073950
mov eax, dword [rbp + 0x438]
xor ecx, ecx
mov dword [rsp + 0x28], eax
cmp esi, 0x17
lea r9, [rbp - 0x70]
lea r8, [rbp - 0x80]
movsxd rdx, r15d
sete cl
mov qword [rsp + 0x20], r12
call fcn.14009ae48
xor r12d, r12d
test eax, eax
je 0x14009a9c9
jmp 0x14009a767
xor r12d, r12d
xor edx, edx
cmp esi, 0x17
jne 0x14009a7a4
lea r8d, [rdx + 0x1c]
lea rcx, [rsp + 0x48]
call fcn.140073950
movzx ecx, word [rbp + 0x418]
mov r14d, esi
mov word [rsp + 0x48], r14w
call qword [sym.imp.WS2_32.dll_htons]
movups xmm0, xmmword [rsp + 0x70]
mov word [rsp + 0x4a], ax
movdqu xmmword [rsp + 0x50], xmm0
jmp 0x14009a7db
lea rcx, [rsp + 0x30]
mov r8d, reloc.WS2_32.dll_recv
call fcn.140073950
movzx ecx, word [rbp + 0x418]
mov eax, 2
mov word [rsp + 0x30], ax
call qword [sym.imp.WS2_32.dll_htons]
mov dword [rsp + 0x34], r14d
mov word [rsp + 0x32], ax
mov r14d, reloc.WS2_32.dll_socket
mov eax, 1
cmp edi, eax
movsxd rdi, r15d
mov rcx, rdi
jne 0x14009a94e
mov r14d, dword [rbp + 0x428]
test r14d, r14d
jle 0x14009a8e5
lea r8, [rbp + 0x410]
mov edx, 0x8004667e
mov dword [rbp + 0x410], eax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x14009a9c9
mov eax, reloc.WS2_32.dll_socket
mov rcx, rdi
cmp esi, eax
jne 0x14009a835
lea r8d, [rax + 5]
lea rdx, [rsp + 0x48]
jmp 0x14009a840
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x14009a9c9
lea esi, [rax + 2]
mov eax, 0x10624dd3
lea ecx, [r15 + 1]
lea r9, [rbp + 0x1c0]
lea r8, [rbp - 0x50]
mov qword [rbp - 0x48], rdi
imul r14d
sar edx, 6
mov dword [rbp - 0x50], esi
mov qword [rbp + 0x1c8], rdi
mov eax, edx
mov dword [rbp + 0x1c0], esi
shr eax, 0x1f
add edx, eax
mov dword [rsp + 0x40], edx
imul eax, edx, 0x3e8
sub r14d, eax
xor edx, edx
imul eax, r14d, 0x3e8
mov dword [rsp + 0x44], eax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
cmp eax, esi
jne 0x14009a8c7
lea rdx, [rbp - 0x50]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
cmovne rbx, rsi
lea r8, [rbp + 0x410]
mov edx, 0x8004667e
mov rcx, rdi
mov dword [rbp + 0x410], r12d
call qword [sym.imp.WS2_32.dll_ioctlsocket]
jmp 0x14009a91a
mov eax, reloc.WS2_32.dll_socket
cmp esi, eax
jne 0x14009a8f9
lea r8d, [rax + 5]
lea rdx, [rsp + 0x48]
jmp 0x14009a904
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x14009a9c9
mov esi, 1
mov ebx, esi
test rbx, rbx
je 0x14009a9c9
mov rcx, qword [0x14190b3a8]
xor edx, edx
lea r8d, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x14009a9c9
mov dword [rax], esi
mov qword [rax + 8], rdi
mov qword [rax + 0x10], r12
jmp 0x14009a9c9
lea r8, [rbp + 0x410]
mov edx, 0x8004667e
mov dword [rbp + 0x410], eax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x14009a9c9
mov rcx, qword [0x14190b3a8]
lea r8d, [rax + 0x50]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x14009a9c9
mov eax, 2
mov dword [rbx], eax
cmp esi, r14d
jne 0x14009a9ae
movups xmm0, xmmword [rsp + 0x48]
movups xmmword [rbx + 4], xmm0
movsd xmm1, qword [rsp + 0x58]
movsd qword [rbx + 0x14], xmm1
mov eax, dword [rsp + 0x60]
mov dword [rbx + 0x1c], eax
jmp 0x14009a9b8
movups xmm0, xmmword [rsp + 0x30]
movdqu xmmword [rbx + 4], xmm0
cmp esi, r14d
mov qword [rbx + 0x30], rdi
mov qword [rbx + 0x28], r12
sete al
mov byte [rbx + 0x20], al
mov rcx, r13
call fcn.140166c40
test rbx, rbx
jne 0x14009a9df
movsxd rcx, r15d
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, rbx
mov rbx, qword [rsp + 0x520]
add rsp, 0x4d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret