Function at 0x14021a750
Capabilities:
Convert ip address from string
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x268
mov rsi, rdx
mov rdi, rcx
mov r13, qword [rcx + 0x10]
lea r15, [rsp + 0xe0]
mov rcx, r15
call fcn.1401a97e0
movups xmm0, xmmword [rsp + 0xe0]
movups xmmword [r13 + 0x108], xmm0
lea rbx, [r13 + 8]
cmp qword [rsi + 0x278], 0
je 0x14021a7d1
mov rcx, rsi
mov dl, 1
call fcn.1401a1910
mov rcx, qword [rsi + 0x280]
xor edx, edx
mov r8, rbx
call qword [rsi + 0x278]
mov qword [r13 + 0x98], rax
mov rcx, rsi
xor edx, edx
call fcn.1401a1910
mov rax, qword [r13 + 0x98]
jmp 0x14021a7ea
mov ecx, dword [r13 + 8]
mov edx, dword [r13 + 0xc]
mov r8d, dword [r13 + 0x10]
call qword [sym.imp.WS2_32.dll_socket]
mov qword [r13 + 0x98], rax
mov ebp, 7
cmp rax, 0xffffffffffffffff
je 0x14021a969
mov rax, qword [rsi + 0x18]
mov eax, dword [rax + 0x6ec]
test eax, eax
je 0x14021a810
cmp dword [rbx], 0x17
jne 0x14021a810
mov dword [r13 + 0x30], eax
mov r14, qword [rdi + 0x10]
lea rcx, [r14 + 0x18]
mov edx, dword [r14 + 0x14]
lea r8, [r14 + 0xa0]
lea r9, [r14 + 0xd0]
call fcn.1401a7ec0
test al, al
je 0x14021a91f
mov r9d, dword [r13 + 0xd0]
cmp dword [r13 + 8], 0x17
lea rax, str.__Trying___s_:_d...
lea rdx, str.__Trying__s:_d...
cmove rdx, rax
lea r8, [r13 + 0xa0]
mov rcx, rsi
call fcn.1401955d0
mov eax, dword [r13 + 8]
cmp eax, 0x17
je 0x14021a876
cmp eax, 2
jne 0x14021a9dd
cmp dword [r13 + 0xc], 1
jne 0x14021a9dd
test byte [rsi + 0xa8c], 4
je 0x14021a8e8
mov rcx, qword [r13 + 0x98]
mov dword [rsp + 0x60], 1
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x60]
mov edx, 6
mov r8d, 1
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x14021a8e8
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0xe0]
mov r8d, 0x100
mov ecx, eax
call fcn.1401f8a10
lea rdx, str.Could_not_set_TCP_NODELAY:__s
mov rcx, rsi
mov r8, rax
call fcn.1401955d0
mov rcx, qword [r13 + 0x98]
call fcn.1402193e0
test byte [rsi + 0xa8d], 2
je 0x14021a90c
mov rdx, qword [r13 + 0x98]
mov rcx, rsi
call fcn.14021b0b0
cmp qword [rsi + 0x268], 0
jne 0x14021a9f3
jmp 0x14021aa38
mov r15, qword [sym.imp.msvcrt.dll__errno]
call r15
mov eax, dword [rax]
mov dword [r14 + 0x138], eax
call r15
mov ebx, dword [rax]
call r15
mov ecx, dword [rax]
lea rdx, [rsp + 0xe0]
mov r8d, 0x100
call fcn.1401f8a10
lea rdx, str.sa_addr_inet_ntop___failed_with_errno__d:__s
mov rcx, rsi
mov r8d, ebx
mov r9, rax
call fcn.140195520
mov ebp, 2
mov rbx, qword [r13 + 0x98]
cmp rbx, 0xffffffffffffffff
je 0x14021a9c7
mov rdi, qword [rdi + 0x18]
test rdi, rdi
je 0x14021a9b3
mov r14, qword [rdi + 0x38]
mov rcx, rsi
mov rdx, rbx
call fcn.1401a1470
test r14, r14
je 0x14021a9b3
mov rcx, rsi
mov dl, 1
call fcn.1401a1910
mov rcx, qword [rdi + 0x40]
mov rdx, rbx
call qword [rdi + 0x38]
mov rcx, rsi
xor edx, edx
call fcn.1401a1910
jmp 0x14021a9bc
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [r13 + 0x98], 0xffffffffffffffff
mov eax, ebp
add rsp, 0x268
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [r13 + 0x98]
call fcn.1402193e0
cmp qword [rsi + 0x268], 0
je 0x14021aa38
mov rcx, rsi
mov dl, 1
call fcn.1401a1910
mov rcx, qword [rsi + 0x270]
mov rdx, qword [r13 + 0x98]
xor r12d, r12d
xor r8d, r8d
call qword [rsi + 0x268]
mov r14d, eax
mov rcx, rsi
xor edx, edx
call fcn.1401a1910
cmp r14d, 2
je 0x14021aa3b
mov ebp, 0x2a
test r14d, r14d
jne 0x14021a969
mov r12b, 1
mov ebp, dword [rbx]
cmp ebp, 0x17
je 0x14021aa4b
cmp ebp, 2
jne 0x14021acbb
mov dword [rsp + 0x30], r12d
mov rax, qword [rdi + 0x18]
mov qword [rsp + 0x40], rax
mov rax, qword [r13 + 0x98]
mov qword [rsp + 0x50], rax
lea rcx, [r13 + 0x18]
call fcn.14024bd90
mov qword [rsp + 0x38], 0
movzx ebx, word [rsi + 0x220]
movzx r14d, word [rsi + 0x222]
mov r12, qword [rsi + 0x750]
test r12, r12
jne 0x14021aaa1
test bx, bx
jne 0x14021aaa1
mov r12d, dword [rsp + 0x30]
jmp 0x14021acbb
mov dword [rsp + 0x34], eax
xorps xmm0, xmm0
movaps xmmword [rsp + 0xd0], xmm0
movaps xmmword [rsp + 0xc0], xmm0
movaps xmmword [rsp + 0xb0], xmm0
movaps xmmword [rsp + 0xa0], xmm0
movaps xmmword [rsp + 0x90], xmm0
movaps xmmword [rsp + 0x80], xmm0
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rsp + 0x60], xmm0
test r12, r12
je 0x14021abc9
mov rcx, r12
call sub.msvcrt.dll_strlen
cmp rax, 0xfe
ja 0x14021abc9
xorps xmm0, xmm0
movaps xmmword [rsp + 0x1d0], xmm0
movaps xmmword [rsp + 0x1c0], xmm0
movaps xmmword [rsp + 0x1b0], xmm0
movaps xmmword [rsp + 0x1a0], xmm0
movaps xmmword [rsp + 0x190], xmm0
movaps xmmword [rsp + 0x180], xmm0
movaps xmmword [rsp + 0x170], xmm0
movaps xmmword [rsp + 0x160], xmm0
movaps xmmword [rsp + 0x150], xmm0
movaps xmmword [rsp + 0x140], xmm0
movaps xmmword [rsp + 0x130], xmm0
movaps xmmword [rsp + 0x120], xmm0
movaps xmmword [rsp + 0x110], xmm0
movaps xmmword [rsp + 0x100], xmm0
movaps xmmword [rsp + 0xf0], xmm0
movaps xmmword [rsp + 0xe0], xmm0
lea rcx, [0x1402803ee]
mov r8d, 3
mov rdx, r12
call sub.msvcrt.dll_strncmp
mov dword [rsp + 0x4c], eax
test eax, eax
je 0x14021ade0
lea rcx, str.host_
mov r8d, 5
mov rdx, r12
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x14021ade4
add r12, 5
jmp 0x14021ae5e
cmp ebp, 2
je 0x14021abf7
xor r15d, r15d
cmp ebp, 0x17
mov r12d, dword [rsp + 0x30]
jne 0x14021ac16
mov word [rsp + 0x60], 0x17
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x62], ax
mov r15d, 0x1c
jmp 0x14021ac16
mov word [rsp + 0x60], 2
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x62], ax
mov r15d, 0x10
mov r12d, dword [rsp + 0x30]
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x50]
mov r8d, r15d
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x14021ad08
mov dword [rsp + 0x5c], 0x80
xorps xmm0, xmm0
movaps xmmword [rsp + 0x1e0], xmm0
movaps xmmword [rsp + 0x1f0], xmm0
movaps xmmword [rsp + 0x200], xmm0
movaps xmmword [rsp + 0x210], xmm0
movaps xmmword [rsp + 0x220], xmm0
movaps xmmword [rsp + 0x230], xmm0
movaps xmmword [rsp + 0x240], xmm0
movaps xmmword [rsp + 0x250], xmm0
lea rdx, [rsp + 0x1e0]
lea r8, [rsp + 0x5c]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
js 0x14021ad72
movzx r8d, bx
lea rdx, str.Local_port:__hu
mov rcx, rsi
call fcn.1401955d0
mov rax, qword [rsp + 0x40]
or byte [rax + 0x2ca], 0x40
mov rcx, qword [r13 + 0x98]
mov edx, 1
call fcn.1402475e0
xor ebp, ebp
test r12b, r12b
jne 0x14021a9c7
mov rcx, rdi
mov rdx, rsi
call fcn.14021a470
lea rcx, [rsp + 0xe0]
call fcn.1401a97e0
movups xmm0, xmmword [rsp + 0xe0]
movups xmmword [r13 + 0x118], xmm0
or byte [rdi + 0x24], 1
jmp 0x14021a9c7
movzx ebx, bx
mov r12, qword [sym.imp.WS2_32.dll_bind]
nop word cs:[rax + rax]
cmp r14d, 2
jl 0x14021ad9e
cmp bx, 0xffff
je 0x14021ad9e
inc ebx
movzx ebp, bx
lea r8d, [rbp - 1]
mov rcx, rsi
lea rdx, str.Bind_to_local_port__hu_failed__trying_next
call fcn.1401955d0
mov ecx, ebp
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rsp + 0x62], ax
mov rcx, qword [rsp + 0x50]
lea rdx, [rsp + 0x60]
mov r8d, r15d
call r12
dec r14d
test eax, eax
js 0x14021ad20
mov r12d, dword [rsp + 0x30]
jmp 0x14021ac31
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
mov dword [rsi + 0xd2c], eax
lea rdx, [rsp + 0xe0]
mov r8d, 0x100
mov ecx, eax
call fcn.1401f8a10
lea rdx, str.getsockname___failed_with_errno__d:__s
jmp 0x14021adc8
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
mov dword [rsi + 0xd2c], eax
lea rdx, [rsp + 0xe0]
mov r8d, 0x100
mov ecx, eax
call fcn.1401f8a10
lea rdx, str.bind_failed_with_errno__d:__s
mov rcx, rsi
mov r8d, ebx
mov r9, rax
call fcn.140195520
mov ebp, 0x2d
jmp 0x14021a969
add r12, 3
mov rax, qword [rsp + 0x40]
mov r8d, dword [rax + 0x6ec]
mov qword [rsp + 0x20], r15
mov dword [rsp + 0x28], 0x100
mov ecx, ebp
mov edx, dword [rsp + 0x34]
mov r9, r12
call fcn.14024be70
cmp eax, 2
je 0x14021ae30
cmp eax, 1
je 0x14021af63
test eax, eax
jne 0x14021ae53
cmp dword [rsp + 0x4c], 0
jne 0x14021ae5e
lea rdx, str.Couldnt_bind_to_interface__s
jmp 0x14021af7b
mov dword [rsp + 0x20], ebp
lea rdx, str.Local_Interface__s_is_ip__s_using_address_family__i
lea r9, [rsp + 0xe0]
mov rcx, rsi
mov r8, r12
call fcn.1401955d0
jmp 0x14021af2b
cmp dword [rsp + 0x4c], 0
je 0x14021af6d
mov rax, qword [rsp + 0x40]
movzx eax, byte [rax + 0x6f6]
mov byte [rsp + 0x34], al
cmp ebp, 2
je 0x14021ae7c
cmp ebp, 0x17
jne 0x14021ae89
mov al, 2
jmp 0x14021ae7e
mov al, 1
mov rcx, qword [rsp + 0x40]
mov byte [rcx + 0x6f6], al
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov rdx, r12
mov r8d, 0x50
xor r9d, r9d
call fcn.1401ee720
cmp eax, 1
jne 0x14021aeb9
lea rdx, [rsp + 0x38]
mov rcx, rsi
call fcn.1401982f0
mov rax, qword [rsp + 0x40]
movzx ecx, byte [rsp + 0x34]
mov byte [rax + 0x6f6], cl
mov rax, qword [rsp + 0x38]
test rax, rax
je 0x14021af6d
mov rcx, qword [rax]
mov r8d, 0x100
mov rdx, r15
call fcn.1401edfc0
mov rax, qword [rsp + 0x38]
mov rax, qword [rax]
mov eax, dword [rax + 4]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r15
lea rdx, str.Name__s_family__i_resolved_to__s_family__i
mov rcx, rsi
mov r8, r12
mov r9d, ebp
call fcn.1401955d0
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.1401eec30
mov rax, qword [rsp + 0x38]
mov rax, qword [rax]
cmp dword [rax + 4], ebp
jne 0x14021af63
xor r15d, r15d
cmp ebp, 2
je 0x14021af90
cmp ebp, 0x17
mov r12d, dword [rsp + 0x30]
jne 0x14021ac16
lea rcx, [rsp + 0xe0]
mov edx, 0x25
call sub.msvcrt.dll_strchr
test rax, rax
je 0x14021afd4
mov r12, rax
inc r12
mov byte [rax], 0
jmp 0x14021afd7
mov ebp, 7
jmp 0x14021a969
and byte [rsi + 0x12f8], 0xf7
lea rdx, str.Couldnt_bind_to__s
mov rcx, rsi
mov r8, r12
call fcn.140195520
mov ebp, 0x2d
jmp 0x14021a969
lea r8, [rsp + 0x64]
lea rdx, [rsp + 0xe0]
mov ecx, 2
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
mov r12d, dword [rsp + 0x30]
jle 0x14021ac16
mov word [rsp + 0x60], 2
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x62], ax
mov r15d, 0x10
jmp 0x14021ac16
xor r12d, r12d
lea r8, [rsp + 0x68]
lea rdx, [rsp + 0xe0]
mov ecx, 0x17
call qword [sym.imp.WS2_32.dll_inet_pton]
mov r15d, 0x1c
test eax, eax
jle 0x14021ac11
mov word [rsp + 0x60], 0x17
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x62], ax
test r12, r12
je 0x14021ac11
mov rcx, r12
xor edx, edx
mov r8d, 0xa
call sub.msvcrt.dll_strtoul
mov dword [rsp + 0x78], eax
jmp 0x14021ac11