Function at 0x14009db40
Capabilities:
Connect socket
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push rdi
push r12
push r13
push r14
sub rsp, 0x48
xor r13d, r13d
lea rdx, [rsp + 0x78]
mov r14, rcx
mov r12d, r13d
mov qword [rsp + 0x78], r13
call fcn.14005e1b0
test eax, eax
je 0x14009db9e
mov rax, qword [0x140122018]
mov rdi, qword [rax + 0x1a8]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.CSocketSync::OpenConnection__::GetAddrInfoW_failed_with_0x_.8X
mov r8d, eax
mov rcx, rdi
call fcn.14004c390
or rax, 0xffffffffffffffff
add rsp, 0x48
pop r14
pop r13
pop r12
pop rdi
ret
mov rax, qword [rsp + 0x78]
test rax, rax
je 0x14009db68
mov ecx, dword [rax + 4]
xor r9d, r9d
mov dword [rsp + 0x28], r13d
lea edx, [r9 + 1]
lea r8d, [r9 + 6]
mov qword [rsp + 0x88], rsi
mov dword [rsp + 0x20], r13d
call qword [sym.imp.WS2_32.dll_WSASocketW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x14009dbea
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.WS2_32.dll_FreeAddrInfoW]
or rax, rsi
jmp 0x14009de1e
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x80], rbp
mov qword [rsp + 0x40], r15
or ebx, 0xffffffff
nop
cmp ebx, 0xffffffff
jne 0x14009ddfe
mov rdx, qword [rsp + 0x78]
mov qword [rsp + 0x30], r13
xor r9d, r9d
mov r8d, dword [rdx + 0x10]
mov rdx, qword [rdx + 0x20]
mov rcx, rsi
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r13
call qword [sym.imp.WS2_32.dll_WSAConnect]
cmp eax, ebx
je 0x14009ddc8
xor r9d, r9d
mov edx, 0xffff
mov r8d, 0x7010
mov rcx, rsi
mov dword [rsp + 0x20], r13d
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rax, qword [0x140122018]
mov r15, qword [rax + 0x1a8]
or rax, 0xffffffffffffffff
nop word [rax + rax]
cmp word [r14 + rax*2 + 2], r13w
lea rax, [rax + 1]
jne 0x14009dc70
mov ecx, 0x204
lea ebp, [rax*2 + 2]
call qword [sym.imp.MSVCR110.dll_malloc]
mov rbx, rax
test rax, rax
je 0x14009ddeb
mov rdi, rax
xor eax, eax
mov ecx, 0x204
rep stosb byte [rdi], al
mov r8d, ebp
mov rdx, r14
mov rcx, rbx
call sub.MSVCR110.dll_memcpy
mov eax, dword [r15 + 0x64c0]
xor r9d, r9d
mov r8d, 0x204
mov rdx, rbx
mov rcx, rsi
mov dword [rbp + rbx], eax
call qword [sym.imp.WS2_32.dll_send]
mov rcx, rbx
mov edi, eax
call qword [sym.imp.MSVCR110.dll_free]
cmp edi, 0xffffffff
je 0x14009ddc0
mov ecx, reloc.OLEAUT32.dll_SafeArrayLock
call qword [sym.imp.MSVCR110.dll_malloc]
mov rbp, rax
test rax, rax
je 0x14009ddeb
mov rdi, rax
mov ecx, reloc.OLEAUT32.dll_SafeArrayLock
xor eax, eax
rep stosb byte [rdi], al
mov edi, r13d
nop
mov r8d, reloc.OLEAUT32.dll_SafeArrayLock
movsxd rdx, edi
xor r9d, r9d
sub r8d, edi
add rdx, rbp
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
mov ebx, eax
cmp eax, 0xffffffff
je 0x14009dd3f
test eax, eax
je 0x14009dd3f
add edi, eax
cmp edi, 0x14
jne 0x14009dd10
jmp 0x14009dd5b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r12d, eax
cmp rsi, 0xffffffffffffffff
je 0x14009dd5b
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
or rsi, 0xffffffffffffffff
mov rcx, qword [r15 + 0xca8]
cmp rcx, qword [rbp]
jne 0x14009ddac
mov rax, qword [r15 + 0xcb0]
cmp rax, qword [rbp + 8]
jne 0x14009ddac
mov edx, 2
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_shutdown]
mov ebx, eax
cmp rsi, 0xffffffffffffffff
je 0x14009dd98
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
or rsi, 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rdx, r14
mov rcx, r15
mov r8d, eax
call fcn.140032a00
mov rcx, rbp
call qword [sym.imp.MSVCR110.dll_free]
test r12d, r12d
je 0x14009dc00
jmp 0x14009ddfe
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x14009ddeb
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [0x140122018]
lea rdx, str.CSocketSync::OpenConnection___::WSAConnect_failed_with_0x_.8X
mov rcx, qword [rcx + 0x1a8]
mov r8d, eax
call fcn.14004c390
cmp rsi, 0xffffffffffffffff
je 0x14009ddfe
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
or rsi, 0xffffffffffffffff
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.WS2_32.dll_FreeAddrInfoW]
mov r15, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x70]
mov rax, rsi
mov rsi, qword [rsp + 0x88]
add rsp, 0x48
pop r14
pop r13
pop r12
pop rdi
ret