Function at 0x180043a10
Capabilities:
Connect socket
Get socket status
Initialize winsock library
Resolve dns
Set socket configuration

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x470
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov rax, qword [0x1800964f0]
xor rax, rsp
mov qword [rsp + 0x460], rax
mov rbx, r8
mov rbp, rdx
mov rsi, rcx
mov qword [rsp + 0x2a8], select
xor r12d, r12d
mov qword [rsp + 0x2a0], r12
mov byte [rsp + 0x290], r12b
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [rsp + 0x288]
call fcn.1800026a0
nop
mov qword [rsp + 0x280], select
mov qword [rsp + 0x278], r12
mov byte [rsp + 0x268], r12b
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, rbx
lea rcx, [rsp + 0x260]
call fcn.1800026a0
mov rcx, rbx
call fcn.180051d80
mov edi, eax
mov word [rsp + 0x2c0], r12w
xor edx, edx
mov r8d, 0x196
lea rcx, [rsp + 0x2c2]
call fcn.180055310
mov ecx, 0x202
lea rdx, [rsp + 0x2c0]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x180043b51
cmp qword [rsp + 0x280], 0x10
jb 0x180043b16
mov rcx, qword [rsp + 0x268]
call fcn.180050528
mov qword [rsp + 0x280], select
mov qword [rsp + 0x278], r12
mov byte [rsp + 0x268], 0
cmp qword [rsp + 0x2a8], 0x10
jb 0x180043b4a
mov rcx, qword [rsp + 0x290]
call fcn.180050528
xor eax, eax
jmp 0x180043e01
mov edx, 1
mov ebx, 2
lea r8d, [rdx + 5]
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsi], rax
mov word [rsp + 0x2b0], bx
lea rcx, [rsp + 0x290]
cmp qword [rsp + 0x2a8], 0x10
cmovae rcx, qword [rsp + 0x290]
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
jne 0x180043bea
cmp qword [rsp + 0x280], 0x10
jb 0x180043baf
mov rcx, qword [rsp + 0x268]
call fcn.180050528
mov qword [rsp + 0x280], select
mov qword [rsp + 0x278], r12
mov byte [rsp + 0x268], 0
cmp qword [rsp + 0x2a8], 0x10
jb 0x180043be3
mov rcx, qword [rsp + 0x290]
call fcn.180050528
xor eax, eax
jmp 0x180043e01
mov rax, qword [rax + 0x18]
mov rcx, qword [rax]
mov eax, dword [rcx]
mov dword [rsp + 0x2b4], eax
movzx ecx, di
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x2b2], ax
mov dword [rsp + 0x30], 1
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
mov rcx, qword [rsi]
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [rsp + 0x34], 0xffffffff
mov dword [rsp + 0x38], 4
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x2b0]
mov rcx, qword [rsi]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x180043d99
mov dword [rsp + 0x40], ebx
mov dword [rsp + 0x44], 0x1f4
mov rax, qword [rsi]
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x50], 1
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, [rsp + 0x50]
xor edx, edx
mov ecx, dword [rsi]
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x180043d30
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x34]
mov edx, 0xffff
mov r8d, 0x1007
mov rcx, qword [rsi]
call qword [sym.imp.WS2_32.dll_getsockopt]
cmp dword [rsp + 0x34], 0
je 0x180043d99
mov rdx, rbp
lea rcx, str._s_conect_err___s_r_n
call fcn.180054f8c
mov rcx, qword [rsi]
call qword [sym.imp.WS2_32.dll_closesocket]
cmp qword [rsp + 0x280], 0x10
jb 0x180043cf4
mov rcx, qword [rsp + 0x268]
call fcn.180050528
mov qword [rsp + 0x280], select
mov qword [rsp + 0x278], r12
mov byte [rsp + 0x268], 0
cmp qword [rsp + 0x2a8], 0x10
jb 0x180043d28
mov rcx, qword [rsp + 0x290]
call fcn.180050528
or eax, 0xffffffff
jmp 0x180043e01
mov rdx, rbp
lea rcx, str._s_conect_err_r_n
call fcn.180054f8c
mov rcx, qword [rsi]
call qword [sym.imp.WS2_32.dll_closesocket]
cmp qword [rsp + 0x280], 0x10
jb 0x180043d60
mov rcx, qword [rsp + 0x268]
call fcn.180050528
mov qword [rsp + 0x280], select
mov qword [rsp + 0x278], r12
mov byte [rsp + 0x268], 0
cmp qword [rsp + 0x2a8], 0x10
jb 0x180043d94
mov rcx, qword [rsp + 0x290]
call fcn.180050528
or eax, 0xffffffff
jmp 0x180043e01
mov dword [rsp + 0x30], r12d
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
mov rcx, qword [rsi]
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov edi, dword [rsi]
cmp qword [rsp + 0x280], 0x10
jb 0x180043dcb
mov rcx, qword [rsp + 0x268]
call fcn.180050528
mov qword [rsp + 0x280], select
mov qword [rsp + 0x278], r12
mov byte [rsp + 0x268], 0
cmp qword [rsp + 0x2a8], 0x10
jb 0x180043dff
mov rcx, qword [rsp + 0x290]
call fcn.180050528
mov eax, edi
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.180050540
add rsp, 0x470
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret