Function at 0x14009ff16
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, 0x288
mov rdi, rdx
mov rsi, rcx
mov rax, qword [0x1401ea088]
xor rax, rsp
mov qword [rsp + 0x280], rax
mov r12, qword [rcx + 0x10]
lea rbx, [rsp + 0x100]
mov rcx, rbx
call fcn.140046bd4
movups xmm0, xmmword [rbx]
movups xmmword [r12 + 0x148], xmm0
lea rbx, [r12 + 0x98]
lea r14, [r12 + 8]
mov rcx, rdi
mov rdx, r14
mov r8, rbx
call fcn.14009e8d4
mov r13d, eax
test eax, eax
jne 0x1400a0049
mov r15, qword [rsi + 0x10]
lea r9, [r15 + 0x110]
lea r8, [r15 + 0xe0]
mov edx, dword [r15 + 0x14]
lea rcx, [r15 + 0x18]
call fcn.1400450dc
test al, al
je 0x14009ffeb
cmp dword [r14], 0x17
jne 0x1400a00cb
mov rcx, qword [rbx]
lea r9, [rsp + 0x100]
mov dword [r9], 0
mov dword [rsp + 0x20], 4
mov edx, 0x29
mov r8d, 0x1b
call qword [sym.imp.WS2_32.dll_setsockopt]
lea rdx, str.__Trying___s_:_d...
jmp 0x1400a00d2
lea r14, [rsp + 0x100]
mov r8d, 0x100
mov rcx, r14
mov dl, 0xaa
call fcn.1401615d0
call fcn.140174398
mov eax, dword [rax]
mov dword [r15 + 0x178], eax
call fcn.140174398
mov ecx, dword [rax]
mov r8d, 0x100
mov rdx, r14
call fcn.1400b4690
mov r14, rax
call fcn.140174398
mov r8d, dword [rax]
lea rdx, str.sa_addr_inet_ntop___failed_with_errno__d:__s
mov rcx, rdi
mov r9, r14
call fcn.140031630
mov r13d, 2
mov r9, qword [rbx]
cmp r9, 0xffffffffffffffff
je 0x1400a006b
mov rdx, qword [rsi + 0x18]
mov rcx, rdi
mov r8d, 1
call fcn.14009e962
mov qword [rbx], 0xffffffffffffffff
test rdi, rdi
je 0x1400a00a4
test rsi, rsi
je 0x1400a00a4
cmp byte [rdi + 0xa37], 0
je 0x1400a00a4
mov rax, qword [rsi]
cmp dword [rax + 0xc], 0
jle 0x1400a00a4
mov rax, qword [rbx]
mov qword [rsp + 0x20], rax
lea r8, str.cf_socket_open_______d__fd_qd
mov rcx, rdi
mov rdx, rsi
mov r9d, r13d
call fcn.1400317d3
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.14015c2e0
mov eax, r13d
add rsp, 0x288
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rdx, str.__Trying__s:_d...
test rdi, rdi
je 0x1400a00f8
cmp byte [rdi + 0xa37], 0
je 0x1400a00f8
mov r9d, dword [r12 + 0x110]
lea r8, [r12 + 0xe0]
mov rcx, rdi
call fcn.14003171b
mov eax, dword [r14]
cmp eax, 0x17
je 0x1400a0109
cmp eax, 2
jne 0x1400a02ac
cmp dword [r12 + 0xc], 1
jne 0x1400a02ac
cmp byte [rdi + 0xa3c], 0
je 0x1400a01a8
mov r15, qword [rbx]
lea r13, [rsp + 0x200]
mov dword [r13], 1
lea rcx, [rsp + 0x100]
mov r8d, 0x100
mov dl, 0xaa
call fcn.1401615d0
mov dword [rsp + 0x20], 4
mov rcx, r15
mov edx, 6
mov r8d, 1
mov r9, r13
call qword [sym.imp.WS2_32.dll_setsockopt]
test rdi, rdi
je 0x1400a01a8
test eax, eax
jns 0x1400a01a8
cmp byte [rdi + 0xa37], 0
je 0x1400a01a8
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0x100]
mov r8d, 0x100
mov ecx, eax
call fcn.1400b4690
lea rdx, str.Could_not_set_TCP_NODELAY:__s
mov rcx, rdi
mov r8, rax
call fcn.14003171b
mov rcx, qword [rbx]
call fcn.14009e9db
movzx eax, byte [rdi + 0xa42]
test eax, eax
je 0x1400a02b4
mov r15, qword [rbx]
lea r9, [rsp + 0x200]
mov dword [r9], eax
mov dword [rsp + 0x20], 4
mov rcx, r15
mov edx, 0xffff
mov r8d, 8
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x1400a04a8
lea rbp, [rsp + 0x80]
mov dword [rbp], 0xaaaaaaaa
lea r13, [rsp + 0x100]
mov dword [r13], 1
mov ecx, dword [rdi + 0x9c4]
call fcn.14003f41c
imul eax, eax, 0x3e8
mov dword [rsp + 0x200], eax
mov dword [r13 + 4], eax
mov ecx, dword [rdi + 0x9c8]
call fcn.14003f41c
imul eax, eax, 0x3e8
mov dword [rsp + 0x200], eax
mov dword [r13 + 8], eax
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov rcx, r15
mov edx, 0x98000004
mov r8, r13
mov r9d, ntohl
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test rdi, rdi
je 0x1400a02b4
test eax, eax
je 0x1400a02b4
cmp byte [rdi + 0xa37], 0
je 0x1400a02b4
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d
mov rcx, rdi
mov r8d, r15d
mov r9d, eax
call fcn.14003171b
jmp 0x1400a02b4
mov rcx, qword [rbx]
call fcn.14009e9db
cmp qword [rdi + 0x278], 0
je 0x1400a0304
mov rcx, rdi
mov dl, 1
call fcn.14003ced1
mov rdx, qword [rbx]
mov rax, qword [rdi + 0x278]
mov rcx, qword [rdi + 0x280]
xor r15d, r15d
xor r8d, r8d
call qword [case.0x140031f00.0]
mov ebp, eax
mov rcx, rdi
xor edx, edx
call fcn.14003ced1
cmp ebp, 2
je 0x1400a0307
mov r13d, 0x2a
test ebp, ebp
jne 0x1400a0049
mov r15b, 1
mov eax, dword [r14]
cmp eax, 0x17
je 0x1400a0318
cmp eax, 2
jne 0x1400a089c
mov dword [rsp + 0x54], r15d
lea rcx, [r12 + 0x18]
call fcn.1400d8170
mov ecx, eax
mov r13d, dword [r12 + 8]
mov rax, qword [r12 + 0x98]
mov qword [rsp + 0x68], rax
mov rax, qword [rsi + 0x18]
mov qword [rsp + 0x78], 0
movzx ebp, word [rdi + 0x230]
movzx r14d, word [rdi + 0x232]
mov r15, qword [rdi + 0x730]
test r15, r15
jne 0x1400a0372
test bp, bp
jne 0x1400a0372
mov r15d, dword [rsp + 0x54]
jmp 0x1400a089c
mov dword [rsp + 0x70], ecx
mov qword [rsp + 0x58], rax
xorps xmm0, xmm0
movaps xmmword [rsp + 0x270], xmm0
movaps xmmword [rsp + 0x260], xmm0
movaps xmmword [rsp + 0x250], xmm0
movaps xmmword [rsp + 0x240], xmm0
movaps xmmword [rsp + 0x230], xmm0
movaps xmmword [rsp + 0x220], xmm0
movaps xmmword [rsp + 0x210], xmm0
movaps xmmword [rsp + 0x200], xmm0
test r15, r15
je 0x1400a0465
mov rcx, r15
call fcn.1401812d0
cmp rax, 0xfe
ja 0x1400a0465
mov dword [rsp + 0x50], r13d
xor r13d, r13d
lea rcx, [rsp + 0x100]
mov r8d, 0x100
xor edx, edx
call fcn.1401615d0
lea rcx, str.extern_
mov r8d, 7
mov rdx, r15
call fcn.140181390
test eax, eax
je 0x1400a06d3
lea rcx, [0x1401a8472]
mov r8d, 3
mov rdx, r15
call fcn.140181390
mov r13d, eax
test eax, eax
je 0x1400a04d5
lea rcx, str.host_
mov r8d, 5
mov rdx, r15
call fcn.140181390
test eax, eax
mov ecx, dword [rsp + 0x50]
je 0x1400a053d
mov dword [rsp + 0x64], r13d
mov rax, qword [rsp + 0x58]
jmp 0x1400a04e7
cmp r13d, 2
je 0x1400a06fc
mov eax, r13d
xor r13d, r13d
cmp eax, 0x17
mov r15d, dword [rsp + 0x54]
jne 0x1400a0721
mov word [rsp + 0x200], reloc.WS2_32.dll_socket
mov ecx, ebp
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x202], ax
mov r13d, 0x1c
jmp 0x1400a0721
test rdi, rdi
je 0x1400a02b4
cmp byte [rdi + 0xa37], 0
je 0x1400a02b4
lea rdx, str.Failed_to_set_SO_KEEPALIVE_on_fd__d
mov rcx, rdi
mov r8, r15
call fcn.14003171b
jmp 0x1400a02b4
mov dword [rsp + 0x64], r13d
add r15, 3
mov rax, qword [rsp + 0x58]
mov ecx, dword [rsp + 0x50]
mov r8d, dword [rax + 0x39c]
lea rax, [rsp + 0x100]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 0x100
mov edx, dword [rsp + 0x70]
mov r9, r15
call fcn.140002710
cmp eax, 2
je 0x1400a0548
mov r13d, eax
cmp eax, 1
je 0x1400a06d3
test r13d, r13d
jne 0x1400a0585
cmp dword [rsp + 0x64], 0
mov rcx, qword [rsp + 0x58]
jne 0x1400a0595
lea rdx, str.Couldnt_bind_to_interface__s
jmp 0x1400a06c2
add r15, 5
mov rcx, qword [rsp + 0x58]
jmp 0x1400a0595
test rdi, rdi
je 0x1400a0676
cmp byte [rdi + 0xa37], 0
je 0x1400a0676
mov eax, dword [rsp + 0x50]
mov dword [rsp + 0x20], eax
lea rdx, str.Local_Interface__s_is_ip__s_using_address_family__i
lea r9, [rsp + 0x100]
mov rcx, rdi
mov r8, r15
call fcn.14003171b
jmp 0x1400a0676
cmp dword [rsp + 0x64], 0
mov rcx, qword [rsp + 0x58]
je 0x1400a06b4
mov r13b, byte [rcx + 0x3a8]
mov eax, dword [rsp + 0x50]
cmp eax, 2
je 0x1400a05ae
cmp eax, 0x17
jne 0x1400a05b6
mov al, 2
jmp 0x1400a05b0
mov al, 1
mov byte [rcx + 0x3a8], al
lea rax, [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov rcx, rdi
mov rdx, r15
mov r8d, 0x50
xor r9d, r9d
call fcn.1400aa56e
cmp eax, 1
jne 0x1400a05e6
lea rdx, [rsp + 0x78]
mov rcx, rdi
call fcn.140034242
mov rax, qword [rsp + 0x58]
mov byte [rax + 0x3a8], r13b
mov rax, qword [rsp + 0x78]
test rax, rax
je 0x1400a06b4
mov rcx, qword [rax]
lea r13, [rsp + 0x100]
mov r8d, 0x100
mov rdx, r13
call fcn.1400a9e38
test rdi, rdi
je 0x1400a0652
cmp byte [rdi + 0xa37], 0
je 0x1400a0652
mov rax, qword [rsp + 0x78]
mov rax, qword [rax]
mov eax, dword [rax + 4]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r13
lea rdx, str.Name__s_family__i_resolved_to__s_family__i
mov rcx, rdi
mov r8, r15
mov r9d, dword [rsp + 0x50]
call fcn.14003171b
mov rdx, qword [rsp + 0x78]
mov rcx, rdi
call fcn.1400aaab6
mov rax, qword [rsp + 0x78]
mov rax, qword [rax]
mov r13d, 1
mov ecx, dword [rsp + 0x50]
cmp dword [rax + 4], ecx
jne 0x1400a06d3
xor r13d, r13d
mov eax, dword [rsp + 0x50]
cmp eax, 2
je 0x1400a06dd
cmp eax, 0x17
jne 0x1400a071c
lea rcx, [rsp + 0x100]
mov edx, 0x25
call fcn.140161958
test rax, rax
je 0x1400a093c
mov r15, rax
inc r15
mov byte [rax], 0
jmp 0x1400a093f
mov byte [rdi + 0x12e7], 0
lea rdx, str.Couldnt_bind_to__s
mov rcx, rdi
mov r8, r15
call fcn.140031630
mov r13d, 0x2d
mov r15d, dword [rsp + 0x54]
jmp 0x1400a0882
lea r8, [rsp + 0x204]
lea rdx, [rsp + 0x100]
mov ecx, 2
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x1400a071c
mov word [rsp + 0x200], 2
mov ecx, ebp
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x202], ax
mov r13d, reloc.WS2_32.dll_recv
mov r15d, dword [rsp + 0x54]
lea rdx, [rsp + 0x200]
mov rcx, qword [rsp + 0x68]
mov r8d, r13d
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x1400a07b9
lea r8, [rsp + 0x74]
mov dword [r8], 0x80
xorps xmm0, xmm0
lea rdx, [rsp + 0x80]
movaps xmmword [rdx], xmm0
movaps xmmword [rdx + 0x10], xmm0
movaps xmmword [rdx + 0x20], xmm0
movaps xmmword [rdx + 0x30], xmm0
movaps xmmword [rdx + 0x40], xmm0
movaps xmmword [rdx + 0x50], xmm0
movaps xmmword [rdx + 0x60], xmm0
movaps xmmword [rdx + 0x70], xmm0
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
js 0x1400a0831
test rdi, rdi
je 0x1400a07a5
cmp byte [rdi + 0xa37], 0
je 0x1400a07a5
movzx r8d, bp
lea rdx, str.Local_port:__hu
mov rcx, rdi
call fcn.14003171b
mov rax, qword [rsp + 0x58]
mov byte [rax + 0x2da], 1
xor r13d, r13d
jmp 0x1400a0882
movzx ebp, bp
mov r15, qword [sym.imp.WS2_32.dll_bind]
cmp r14d, 2
jl 0x1400a08e6
cmp bp, 0xffff
je 0x1400a08e6
inc ebp
test rdi, rdi
je 0x1400a07fd
cmp byte [rdi + 0xa37], 0
je 0x1400a07fd
movzx r8d, bp
dec r8d
mov rcx, rdi
lea rdx, str.Bind_to_local_port__d_failed__trying_next
call fcn.14003171b
mov ecx, ebp
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rsp + 0x202], ax
mov rcx, qword [rsp + 0x68]
lea rdx, [rsp + 0x200]
mov r8d, r13d
call r15
dec r14d
test eax, eax
js 0x1400a07c3
mov r15d, dword [rsp + 0x54]
jmp 0x1400a073b
lea r14, [rsp + 0x100]
mov r8d, 0x100
mov rcx, r14
mov dl, 0xaa
call fcn.1401615d0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
mov dword [rdi + 0xcfc], eax
mov r8d, 0x100
mov ecx, eax
mov rdx, r14
call fcn.1400b4690
lea rdx, str.getsockname___failed_with_errno__d:__s
mov rcx, rdi
mov r8d, ebp
mov r9, rax
call fcn.140031630
mov r13d, 0x2d
test r13d, r13d
je 0x1400a089c
cmp r13d, 1
jne 0x1400a0049
mov r13d, 7
jmp 0x1400a0049
mov rcx, qword [rbx]
mov edx, 1
call fcn.1400d8128
xor r13d, r13d
test r15b, r15b
jne 0x1400a006b
mov rcx, rsi
mov rdx, rdi
call fcn.14009fddf
lea r14, [rsp + 0x100]
mov rcx, r14
call fcn.140046bd4
movups xmm0, xmmword [r14]
movups xmmword [r12 + 0x158], xmm0
mov byte [rsi + 0x24], 1
jmp 0x1400a006b
lea r14, [rsp + 0x100]
mov r8d, 0x100
mov rcx, r14
mov dl, 0xaa
call fcn.1401615d0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
mov dword [rdi + 0xcfc], eax
mov r8d, 0x100
mov ecx, eax
mov rdx, r14
call fcn.1400b4690
lea rdx, str.bind_failed_with_errno__d:__s
mov rcx, rdi
mov r8d, ebp
mov r9, rax
call fcn.140031630
mov r13d, 0x2d
jmp 0x1400a0049
xor r15d, r15d
lea r8, [rsp + 0x208]
lea rdx, [rsp + 0x100]
mov ecx, reloc.WS2_32.dll_socket
call qword [sym.imp.WS2_32.dll_inet_pton]
mov r13d, 0x1c
test eax, eax
jle 0x1400a071c
mov word [rsp + 0x200], reloc.WS2_32.dll_socket
mov ecx, ebp
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x202], ax
test r15, r15
je 0x1400a071c
mov rcx, r15
xor edx, edx
mov r8d, 0xa
call fcn.140182bb4
mov dword [rsp + 0x218], eax
jmp 0x1400a071c