Function at 0x1401522c0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Convert ip address from string
Create tcp socket
Get local ipv4 addresses
Get socket information
Set socket configuration
Start tcp server

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xf8
mov r12, qword [rsp + 0x160]
mov rdi, qword [rcx + 0x18]
mov qword [r12], 0
mov r14, rcx
mov rbx, rdx
mov esi, r8d
mov ebp, r9d
mov qword [rsp + 0x88], 0
and byte [rdi + 0x363], 0xfb
mov rax, qword [rcx + 0xe0]
test rax, rax
je 0x140152318
test byte [rax + 4], 8
jne 0x140152388
mov r8d, esi
mov rdx, rbx
mov rcx, r14
call fcn.140149050
mov qword [rsp + 0x88], rax
test rax, rax
je 0x1401523b0
lea rdx, str.Hostname__s_was_found_in_DNS_cache
mov r8, rbx
mov rcx, r14
call fcn.140123250
mov rax, qword [rsp + 0x88]
mov rdx, qword [r14 + 0xe0]
add dword [rax + 0x10], 1
test rdx, rdx
je 0x140152367
test byte [rdx + 4], 8
jne 0x140152740
xor r13d, r13d
mov qword [r12], rax
mov eax, r13d
add rsp, 0xf8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r11, qword [rax + 0x10]
test r11, r11
je 0x140152318
mov r9, qword [rax + 0x20]
mov r8d, 2
mov edx, 3
call r11
jmp 0x140152318
mov rdx, qword [r14 + 0xe0]
mov r13d, 0xffffffff
test rdx, rdx
je 0x1401523f0
test byte [rdx + 4], 8
je 0x1401523f0
mov rax, qword [rdx + 0x18]
test rax, rax
je 0x1401523df
mov r8, qword [rdx + 0x20]
mov rcx, r14
mov edx, 3
call rax
mov rax, qword [rsp + 0x88]
test rax, rax
jne 0x14015236a
mov rax, qword [r14 + 0xa88]
test rax, rax
je 0x140152450
mov rdx, qword [r14 + 0xd8]
test rdx, rdx
je 0x140152778
mov byte [rdx + 0x18b], 1
xor edx, edx
mov rcx, qword [r14 + 0xe58]
mov r8, qword [r14 + 0xa90]
call rax
mov rdx, qword [r14 + 0xd8]
test rdx, rdx
je 0x1401527a8
mov byte [rdx + 0x18b], 0
test eax, eax
je 0x140152450
mov r13d, 0xffffffff
jmp 0x14015236e
mov rax, qword [sym.imp.WS2_32.dll_inet_pton]
lea r15, [rsp + 0x7c]
mov rdx, rbx
mov ecx, 2
mov r8, r15
mov qword [rsp + 0x48], rax
call rax
test eax, eax
jle 0x140152550
mov rdx, r15
mov r9d, esi
mov r8, rbx
mov ecx, 2
call fcn.140142b20
mov r15, rax
test rax, rax
je 0x140152550
mov rax, qword [r14 + 0xe0]
test rax, rax
je 0x1401524c8
test byte [rax + 4], 8
je 0x1401524c8
mov r11, qword [rax + 0x10]
test r11, r11
je 0x1401524c8
mov r9, qword [rax + 0x20]
mov r8d, 2
mov edx, 3
mov rcx, r14
call r11
nop dword [rax]
mov rdx, r15
mov r9d, esi
mov r8, rbx
mov rcx, r14
call fcn.14014bb50
mov rdx, qword [r14 + 0xe0]
mov qword [rsp + 0x88], rax
test rdx, rdx
je 0x140152518
test byte [rdx + 4], 8
je 0x140152518
mov r9, qword [rdx + 0x18]
test r9, r9
je 0x140152518
mov r8, qword [rdx + 0x20]
mov rcx, r14
mov edx, 3
call r9
mov rax, qword [rsp + 0x88]
nop dword [rax + rax]
test rax, rax
jne 0x140152367
mov rsi, qword [0x14048b5b0]
nop dword [rax + rax]
mov rcx, r15
mov r15, qword [r15 + 0x28]
call qword [rsi]
test r15, r15
jne 0x140152530
mov rax, qword [rsp + 0x88]
jmp 0x14015236a
lea r15, [rsp + 0xc0]
mov rax, qword [rsp + 0x48]
mov rdx, rbx
mov ecx, 0x17
mov r8, r15
call rax
test eax, eax
jg 0x140152750
cmp byte [rdi + 0x576], 2
je 0x140152790
lea rdx, [0x1403f5726]
mov rcx, rbx
call fcn.140124170
test eax, eax
je 0x1401527c0
mov rcx, rbx
call sub.msvcrt.dll_strlen
mov r15, rax
movzx eax, si
mov r11d, 2
mov qword [rsp + 0xa8], 0
mov rdi, qword [sym.imp.WS2_32.dll_htons]
mov ecx, eax
mov dword [rsp + 0x50], eax
mov word [rsp + 0xa0], r11w
call rdi
lea r8, [rsp + 0x90]
lea rdx, str.127.0.0.1
mov ecx, 2
mov word [rsp + 0xa2], ax
mov rax, qword [rsp + 0x48]
call rax
test eax, eax
jle 0x14015253e
mov eax, dword [rsp + 0x90]
mov rbp, qword [0x14048b5a0]
lea rcx, [r15 + 0x41]
mov edx, 1
mov dword [rsp + 0xa4], eax
call qword [rbp]
mov r15, rax
test rax, rax
je 0x14015253e
movdqa xmm0, xmmword [0x1403f5a30]
lea rcx, [r15 + 0x40]
lea rax, [rax + 0x30]
mov rdx, rbx
mov dword [rax - 0x20], 0x10
movups xmmword [rax - 0x30], xmm0
mov qword [r15 + 0x20], rax
movdqa xmm1, xmmword [rsp + 0xa0]
mov qword [r15 + 0x18], rcx
movups xmmword [r15 + 0x30], xmm1
call sub.msvcrt.dll_strcpy
mov rcx, rbx
call sub.msvcrt.dll_strlen
mov edx, 1
lea rcx, [rax + 0x4d]
call qword [rbp]
mov rbp, rax
test rax, rax
je 0x140152cd4
mov r10d, 0x17
mov ecx, dword [rsp + 0x50]
mov word [rsp + 0xc0], r10w
call rdi
lea r8, [rsp + 0xb0]
lea rdx, [0x1403f573a]
mov dword [rsp + 0xc4], 0
mov word [rsp + 0xc2], ax
mov ecx, 0x17
mov rax, qword [rsp + 0x48]
mov dword [rsp + 0xd8], 0
call rax
test eax, eax
jle 0x140152cd4
movdqa xmm2, xmmword [rsp + 0xb0]
lea rax, [rbp + 0x30]
lea rcx, [rbp + 0x4c]
mov rdx, rbx
movdqa xmm0, xmmword [0x1403f5a40]
movups xmmword [rsp + 0xc8], xmm2
mov dword [rbp + 0x10], 0x1c
mov qword [rbp + 0x28], 0
mov qword [rbp + 0x20], rax
movups xmmword [rbp], xmm0
movdqa xmm3, xmmword [rsp + 0xc0]
movups xmmword [rbp + 0x30], xmm3
movdqu xmm4, xmmword [rsp + 0xcc]
mov qword [rbp + 0x18], rcx
movups xmmword [rbp + 0x3c], xmm4
call sub.msvcrt.dll_strcpy
mov qword [r15 + 0x28], rbp
jmp 0x140152495
xor r13d, r13d
jmp 0x1401523c8
mov rdx, r15
mov r9d, esi
mov r8, rbx
mov ecx, 0x17
call fcn.140142b20
mov r15, rax
test rax, rax
jne 0x140152495
jmp 0x140152572
mov rdx, qword [r14 + 0xd0]
test rdx, rdx
jne 0x14015240c
jmp 0x140152413
mov rcx, r14
call fcn.140149230
test al, al
jne 0x14015257f
jmp 0x140152440
mov rdx, qword [r14 + 0xd0]
test rdx, rdx
jne 0x140152435
jmp 0x14015243c
mov rcx, rbx
call sub.msvcrt.dll_strlen
mov r15, rax
cmp rax, 9
jbe 0x1401527f0
lea rdx, [rbx + rax - 0xa]
mov r8d, 0xa
lea rcx, str..localhost
call fcn.140124300
test eax, eax
jne 0x1401525a1
test bpl, bpl
je 0x140152803
test byte [r14 + 0xae6], 4
jne 0x140152cdb
cmp byte [rdi + 0x576], 2
je 0x140152e42
mov rax, qword [r14 + 0x18]
mov rdi, qword [r14 + 0xe58]
mov edx, 2
cmp byte [rax + 0x576], 1
je 0x14015283d
mov rcx, r14
call fcn.140149230
xor eax, 1
movzx edx, al
mov rax, qword [r14 + 0x18]
add edx, edx
pxor xmm0, xmm0
lea rcx, [rsp + 0x60]
movaps xmmword [rsp + 0xc0], xmm0
movaps xmmword [rsp + 0xd0], xmm0
mov dword [rsp + 0xc4], edx
movaps xmmword [rsp + 0xe0], xmm0
cmp byte [rax + 0x575], 3
setne al
movzx eax, al
add eax, 1
mov dword [rsp + 0xc8], eax
call fcn.1401284e0
movdqu xmm5, xmmword [rsp + 0x60]
mov edx, 0x90
mov rax, qword [0x14048b5a0]
mov ecx, 1
movups xmmword [rdi], xmm5
call qword [rax]
mov qword [r14 + 0xe50], rax
mov rbp, rax
test rax, rax
je 0x140152e16
lea r15, [rax + 0x18]
lea rdi, [rax + 0x20]
and byte [r14 + 0xe68], 0xfe
and rdi, 0xfffffffffffffff8
mov rcx, r15
mov dword [r14 + 0xe60], esi
mov dword [r14 + 0xe64], 0
sub rcx, rdi
mov qword [r14 + 0xe48], 0
add ecx, 0x78
mov qword [rax + 0x18], 0
shr ecx, 3
mov qword [rax], 0
xor eax, eax
rep stosq qword [rdi], rax
mov rax, qword [0x14048b5c0]
mov dword [rbp + 0x24], esi
mov ecx, 8
mov qword [rbp + 0x88], rbp
movdqa xmm5, xmmword [rsp + 0xc0]
mov dword [rbp + 0x20], 1
movups xmmword [rbp + 0x58], xmm5
movdqa xmm5, xmmword [rsp + 0xd0]
movups xmmword [rbp + 0x68], xmm5
movdqa xmm5, xmmword [rsp + 0xe0]
movups xmmword [rbp + 0x78], xmm5
call qword [rax]
mov qword [rbp + 0x18], rax
test rax, rax
je 0x140152ddf
xor edx, edx
mov rcx, rax
call fcn.14034f604
mov r8d, 6
mov edx, 1
mov rax, qword [sym.imp.WS2_32.dll_socket]
mov dword [rsp + 0x80], 0x10
mov ecx, 2
mov dword [rsp + 0x84], 1
mov qword [rsp + 0x50], rax
call rax
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140152efb
mov edx, 2
mov ecx, 0x7f000001
mov qword [rsp + 0x92], 0
lea rdi, [rsp + 0x90]
mov word [rsp + 0x90], dx
mov qword [rsp + 0x98], 0
call qword [sym.imp.WS2_32.dll_htonl]
xor ecx, ecx
pcmpeqd xmm0, xmm0
mov edx, 0xffff
mov word [rsp + 0x92], cx
mov r8d, 4
mov rcx, rsi
lea r9, [rsp + 0x84]
mov dword [rsp + 0x94], eax
movups xmmword [rbp + 0x38], xmm0
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x140152ee3
mov r8d, 0x10
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x140152ee3
mov r10, qword [sym.imp.WS2_32.dll_getsockname]
lea rax, [rsp + 0x80]
mov rdx, rdi
mov rcx, rsi
mov qword [rsp + 0x48], rax
mov r8, rax
mov qword [rsp + 0x58], r10
call r10
cmp eax, 0xffffffff
je 0x140152ee3
cmp dword [rsp + 0x80], 0xf
jle 0x140152ee3
mov edx, 1
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x140152ee3
mov ecx, 2
mov rax, qword [rsp + 0x50]
xor r8d, r8d
mov edx, 1
call rax
mov qword [rbp + 0x38], rax
mov rcx, rax
cmp rax, 0xffffffffffffffff
je 0x140152ee3
mov r8d, 0x10
mov rdx, rdi
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x140152ee3
lea r9, [rsp + 0xb0]
mov edx, 0x8004667e
mov rcx, rsi
mov dword [rsp + 0xb0], 1
mov qword [rsp + 0x50], r9
mov r8, r9
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
js 0x140152ee3
mov eax, dword [0x1403f5a50]
mov rcx, qword [rsp + 0x50]
mov r8d, 0x2710
mov edx, 1
mov qword [rsp + 0xb0], rsi
mov dword [rsp + 0xb8], eax
call fcn.1401229d0
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_accept]
mov qword [rbp + 0x40], rax
cmp rax, 0xffffffffffffffff
je 0x140152ee3
mov rcx, qword [rbp + 0x38]
mov r8, qword [rsp + 0x48]
mov rdx, rdi
mov dword [rsp + 0x80], 0x10
mov r10, qword [rsp + 0x58]
call r10
cmp eax, 0xffffffff
je 0x140152ee3
cmp dword [rsp + 0x80], 0xf
jle 0x140152ee3
mov dword [rsp + 0x80], 0x10
mov rcx, qword [rbp + 0x40]
lea rdx, [rsp + 0xa0]
mov r8, qword [rsp + 0x48]
call qword [sym.imp.WS2_32.dll_getpeername]
cmp eax, 0xffffffff
je 0x140152ee3
cmp dword [rsp + 0x80], 0xf
jle 0x140152ee3
movzx eax, word [rsp + 0xa0]
cmp word [rsp + 0x90], ax
jne 0x140152ee3
mov eax, dword [rsp + 0xa4]
cmp dword [rsp + 0x94], eax
jne 0x140152ee3
movzx eax, word [rsp + 0xa2]
cmp word [rsp + 0x92], ax
jne 0x140152ee3
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rdi, qword [0x14048b600]
mov dword [rbp + 0x48], 0
mov rcx, rbx
call qword [rdi]
mov qword [rbp + 0x28], rax
test rax, rax
je 0x140152ddf
mov rsi, qword [0x14048b5b0]
mov rcx, qword [r14 + 0xe40]
call qword [rsi]
mov rcx, rbx
call qword [rdi]
mov qword [r14 + 0xe40], rax
test rax, rax
je 0x140152ea2
mov rax, qword [0x14048b5c0]
mov ecx, 8
mov dword [rbp + 0x20], 0
call qword [rax]
mov ecx, 0x10
mov rdi, rax
mov rax, qword [0x14048b5c0]
call qword [rax]
mov rbx, rax
test rax, rax
je 0x140152ebf
test rdi, rdi
je 0x140152ebf
mov rax, qword [0x14048dd30]
mov qword [rbx + 8], r15
xor edx, edx
mov r9, rbx
lea r8, [0x14013c1b0]
mov rcx, rdi
mov qword [rbx], rax
call fcn.140350f80
test eax, eax
jne 0x140152ebf
mov qword [rbp], rdi
lea rdx, [rsp + 0x88]
mov rcx, r14
call fcn.14014c880
test eax, eax
jne 0x140152440
mov rax, qword [rsp + 0x88]
xor r13d, r13d
test rax, rax
sete r13b
jmp 0x14015236a
xor ebp, ebp
jmp 0x140152733
mov rax, qword [0x14048b5a0]
mov rbp, qword [r14 + 0x18]
mov edx, 1
mov ecx, 0x488
call qword [rax]
mov qword [r14 + 0x1b8], rax
mov rdi, rax
test rax, rax
je 0x140152ca5
or byte [rbp + 0x363], 4
lea rdx, str.Content_Type:_application_dns_message
lea r13, [rdi + 8]
xor ecx, ecx
mov qword [rax + 0x480], rbx
mov dword [rax + 0x47c], esi
call fcn.140123f60
mov qword [rdi], rax
test rax, rax
je 0x140152e57
mov qword [rsp + 0x30], rax
mov r9, rbx
mov rdx, r13
mov rcx, r14
mov rax, qword [r14 + 0xd0]
mov r8d, 1
mov qword [rsp + 0x28], rax
mov rax, qword [r14 + 0x980]
mov qword [rsp + 0x20], rax
call fcn.140173b00
test eax, eax
jne 0x140152e57
add dword [rdi + 0x478], 1
cmp byte [rbp + 0x576], 1
je 0x140152ca5
mov rcx, r14
call fcn.140149230
test al, al
je 0x140152ca5
mov rax, qword [rdi]
lea rsi, [rdi + 0x240]
mov r9, rbx
mov rcx, r14
mov r8d, 0x1c
mov rdx, rsi
mov qword [rsp + 0x30], rax
mov rax, qword [r14 + 0xd0]
mov qword [rsp + 0x28], rax
mov rax, qword [r14 + 0x980]
mov qword [rsp + 0x20], rax
call fcn.140173b00
test eax, eax
jne 0x140152e5e
add dword [rdi + 0x478], 1
jmp 0x140152ca5
mov rcx, qword [rbp + 0x38]
cmp rcx, 0xffffffffffffffff
je 0x140152df7
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rbp + 0x38], 0xffffffffffffffff
mov rcx, r15
call fcn.14013ff40
mov rax, qword [0x14048b5b0]
mov rcx, rbp
mov qword [r14 + 0xe50], 0
call qword [rax]
mov rbx, qword [sym.imp.msvcrt.dll__errno]
mov esi, 0xc
call rbx
lea rdx, str.getaddrinfo___thread_failed_to_start
mov rcx, r14
mov dword [rax], esi
call fcn.1401234a0
mov rax, qword [rsp + 0x88]
jmp 0x14015236a
mov rcx, r14
call fcn.140149230
test al, al
je 0x140152440
jmp 0x140152810
lea rsi, [rdi + 0x240]
mov rcx, qword [rdi]
call fcn.140124050
mov rax, qword [r14 + 0x1b8]
xor r8d, r8d
mov rcx, r13
mov qword [rax], r8
call fcn.1402c4cf0
mov rcx, rsi
call fcn.1402c4cf0
mov rax, qword [0x14048b5b0]
mov rcx, qword [r14 + 0x1b8]
call qword [rax]
xor r9d, r9d
mov qword [r14 + 0x1b8], r9
jmp 0x140152ca5
mov rbx, qword [sym.imp.msvcrt.dll__errno]
mov esi, 0xc
lea rcx, [r14 + 0xe40]
call fcn.1401402d0
jmp 0x140152e22
mov rcx, rdi
call qword [rsi]
mov rcx, rbx
call qword [rsi]
xor eax, eax
mov dword [rbp + 0x20], 1
mov rbx, qword [sym.imp.msvcrt.dll__errno]
mov qword [rbp], rax
call rbx
mov esi, dword [rax]
jmp 0x140152eae
mov rbx, qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, rsi
call rbx
mov rcx, qword [rbp + 0x38]
call rbx
mov rcx, qword [rbp + 0x40]
call rbx
pcmpeqd xmm0, xmm0
movups xmmword [rbp + 0x38], xmm0
jmp 0x140152df7