Function at 0x543e80
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get socket status
Set socket configuration

Disassembly:
push rbp
sub rsp, 0x2c0
mov rbp, rsp
mov qword [rbp + 0x38], rcx
mov qword [rbp + 0x48], 0
mov qword [rbp + 0x58], 0
mov qword [rbp + 0x50], 0
mov qword [rbp + 0x60], 0
mov qword [rbp + 0x70], 0
mov qword [rbp + 0x68], 0
mov qword [rbp + 0x88], 0
mov qword [rbp + 0x90], 0
nop
xor eax, eax
mov byte [rbp + 0x47], al
mov rax, qword [rbp + 0x38]
mov rcx, rax
mov rdx, qword [rax + 0x1a8]
call fcn.00545670
test al, al
je 0x543f0b
lea rcx, [rbp + 0x90]
mov rax, qword [rbp + 0x38]
mov rdx, qword [rax + 0x1a8]
call fcn.0040fb00
jmp 0x543f26
mov rcx, qword [rbp + 0x38]
lea rdx, [rbp + 0x90]
mov rax, qword [rbp + 0x38]
mov r8, qword [rax + 0x1a8]
call fcn.00545510
cmp qword [rbp + 0x90], 0
jne 0x543f75
mov rax, qword [rbp + 0x38]
mov rax, qword [rax + 0x1a8]
mov qword [rbp + 0x78], rax
mov byte [rbp + 0x80], 0x11
lea rcx, [rbp + 0x88]
lea rdx, [0x005442b8]
lea r8, [rbp + 0x78]
xor r9, r9
call fcn.00430770
mov rcx, qword [rbp + 0x38]
mov rdx, qword [rbp + 0x88]
call fcn.005444a0
jmp 0x544212
mov ecx, 2
mov edx, 1
mov r8d, 6
call sub.ws2_32.dll_socket
mov rcx, qword [rbp + 0x38]
mov qword [rcx + 0x1a0], rax
mov rax, qword [rbp + 0x38]
cmp qword [rax + 0x1a0], 0xffffffffffffffff
jne 0x543ff5
call sub.ws2_32.dll_WSAGetLastError
lea rcx, [rbp + 0x68]
mov edx, eax
xor r8, r8
call fcn.00436fd0
mov rax, qword [rbp + 0x68]
mov qword [rbp + 0x78], rax
mov byte [rbp + 0x80], 0x11
lea rcx, [rbp + 0x70]
lea rdx, [0x005442d8]
lea r8, [rbp + 0x78]
xor r9, r9
call fcn.00430770
mov rax, qword [rbp + 0x38]
lea rcx, [rax + 0x1c0]
mov rdx, qword [rbp + 0x70]
call fcn.0040fa70
jmp 0x544212
mov word [rbp + 0x2b0], 2
mov rax, qword [rbp + 0x38]
movzx rcx, word [rax + 0x1b0]
call sub.ws2_32.dll_htons
mov word [rbp + 0x2b2], ax
lea rcx, [rbp + 0x60]
mov rdx, qword [rbp + 0x90]
xor r8, r8
call fcn.00410360
mov rcx, qword [rbp + 0x60]
call fcn.00410280
mov rcx, rax
call sub.ws2_32.dll_inet_addr
mov dword [rbp + 0x2b4], eax
mov dword [rbp + 0x9c], 1
mov rax, qword [rbp + 0x38]
mov rcx, qword [rax + 0x1a0]
mov edx, 0x8004667e
lea r8, [rbp + 0x9c]
call sub.ws2_32.dll_ioctlsocket
lea rcx, [rbp + 0xa0]
call fcn.0053d9a0
mov rax, qword [rbp + 0x38]
mov rcx, qword [rax + 0x1a0]
lea rdx, [rbp + 0xa0]
call fcn.0053d970
mov rax, qword [rbp + 0x38]
mov rcx, qword [rax + 0x1a0]
lea rdx, [rbp + 0x2b0]
mov r8d, 0x10
call sub.ws2_32.dll_connect
cmp eax, 0xffffffff
jne 0x5441d6
call sub.ws2_32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x544135
mov rax, qword [rbp + 0x38]
mov rcx, qword [rax + 0x1a0]
call sub.ws2_32.dll_closesocket
mov rax, qword [rbp + 0x38]
mov qword [rax + 0x1a0], 0xffffffffffffffff
call sub.ws2_32.dll_WSAGetLastError
test eax, eax
jge 0x5440e8
call fcn.0040b970
lea rcx, [rbp + 0x50]
mov edx, eax
xor r8, r8
call fcn.00436fd0
mov rax, qword [rbp + 0x50]
mov qword [rbp + 0x78], rax
mov byte [rbp + 0x80], 0x11
lea rcx, [rbp + 0x58]
lea rdx, [0x00544300]
lea r8, [rbp + 0x78]
xor r9, r9
call fcn.00430770
mov rax, qword [rbp + 0x38]
lea rcx, [rax + 0x1c0]
mov rdx, qword [rbp + 0x58]
call fcn.0040fa70
jmp 0x544212
mov rax, qword [rbp + 0x38]
mov ecx, dword [rax + 0x1b4]
mov r8d, 0x3e8
mov eax, ecx
cdq
idiv r8d
mov dword [rbp + 0x2a8], eax
mov r8d, 0x3e8
mov eax, ecx
cdq
idiv r8d
mov dword [rbp + 0x2ac], edx
mov ecx, 1
xor edx, edx
lea r8, [rbp + 0xa0]
xor r9, r9
lea rax, [rbp + 0x2a8]
mov qword [rsp + 0x20], rax
call sub.ws2_32.dll_select
test eax, eax
jg 0x5441d6
mov rax, qword [rbp + 0x38]
mov rcx, qword [rax + 0x1a0]
call sub.ws2_32.dll_closesocket
mov rax, qword [rbp + 0x38]
mov qword [rax + 0x1a0], 0xffffffffffffffff
lea rcx, [rbp + 0x48]
lea rdx, [0x0054431c]
lea r8, [rbp + 0x48]
or r9d, 0xffffffff
call fcn.00430770
mov rax, qword [rbp + 0x38]
lea rcx, [rax + 0x1c0]
mov rdx, qword [rbp + 0x48]
call fcn.0040fa70
jmp 0x544212
mov dword [rbp + 0x9c], 0
mov rax, qword [rbp + 0x38]
mov rcx, qword [rax + 0x1a0]
mov edx, 0x8004667e
lea r8, [rbp + 0x9c]
call sub.ws2_32.dll_ioctlsocket
mov rax, qword [rbp + 0x38]
lea rcx, [rax + 0x1c0]
call fcn.0040f400
mov al, 1
mov byte [rbp + 0x47], al
nop
lea rcx, [rbp + 0x48]
mov edx, 3
call fcn.0040f4e0
lea rcx, [rbp + 0x60]
call fcn.0040f450
lea rcx, [rbp + 0x68]
mov edx, 2
call fcn.0040f4e0
lea rcx, [rbp + 0x88]
mov edx, 2
call fcn.0040f4e0
movzx rax, byte [rbp + 0x47]
lea rsp, [rbp + 0x2c0]
pop rbp
ret