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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x5d0]
sub rsp, 0x6d0
mov rax, qword [0x1403ec658]
xor rax, rsp
mov qword [rbp + 0x5c0], rax
mov rax, qword [rcx + 0x20]
xorps xmm0, xmm0
mov r14, qword [rcx + 0x838]
mov edi, edx
mov qword [rsp + 0x58], rax
mov rsi, rcx
xor eax, eax
mov qword [rsp + 0x50], 0xffffffffffffffff
mov qword [rbp + 0x10], rax
mov r12d, eax
mov dword [rbp + 0x18], eax
movzx r15d, ax
mov word [rbp + 0x1c], ax
mov r13d, eax
mov byte [rbp + 0x1e], al
mov ebx, eax
mov qword [rsp + 0x60], rax
mov word [rsp + 0x4c], ax
mov byte [rsp + 0x40], 1
movups xmmword [rbp - 0x10], xmm0
movups xmmword [rbp], xmm0
test r14, r14
je 0x1402f32eb
mov rax, 0xffffffffffffffff
inc rax
cmp byte [r14 + rax], bl
jne 0x1402f3114
cmp rax, 1
jbe 0x1402f32eb
movzx eax, byte [r14]
cmp al, 0x5b
jne 0x1402f3153
lea r15, [r14 + 1]
mov edx, 0x5d
mov rcx, r15
call sub.VCRUNTIME140.dll_strchr
mov r14, rax
test rax, rax
je 0x1402f319b
mov rbx, rax
mov r13, r15
sub rbx, r15
jmp 0x1402f31ad
cmp al, 0x3a
je 0x1402f31ad
mov edx, 0x3a
mov rcx, r14
call sub.VCRUNTIME140.dll_strchr
mov r15, rax
mov r13, r14
test rax, rax
je 0x1402f3213
mov rbx, rax
lea r8, [rsp + 0x78]
mov rdx, r14
mov ecx, reloc.WS2_32.dll_socket
sub rbx, r14
call qword [sym.imp.WS2_32.dll_inet_pton]
mov r14, r15
mov rdx, r12
cmp eax, 1
cmove r14, rdx
jmp 0x1402f319d
xor edx, edx
movzx eax, dx
movzx r15d, dx
test r14, r14
je 0x1402f3232
mov edx, 0x3a
mov rcx, r14
call sub.VCRUNTIME140.dll_strchr
xor edx, edx
mov r14, rax
mov eax, edx
mov r15d, edx
test r14, r14
je 0x1402f3232
lea rcx, [r14 + 1]
lea r8d, [rdx + 0xa]
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtoul
mov ecx, eax
call fcn.1402cc180
mov edx, 0x2d
mov rcx, r14
movzx r15d, ax
call sub.VCRUNTIME140.dll_strchr
xor edx, edx
test rax, rax
je 0x1402f320d
lea rcx, [rax + 1]
lea r8d, [rdx + 0xa]
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtoul
mov ecx, eax
call fcn.1402cc180
xor edx, edx
jmp 0x1402f3232
movzx eax, r15w
jmp 0x1402f3232
mov rbx, 0xffffffffffffffff
nop word [rax + rax]
inc rbx
cmp byte [r14 + rbx], r12b
jne 0x1402f3220
xor edx, edx
movzx eax, dx
movzx r15d, dx
cmp r15w, ax
mov ecx, edx
cmovbe cx, ax
cmovbe dx, r15w
mov dword [rsp + 0x48], ecx
mov dword [rsp + 0x4c], edx
test rbx, rbx
je 0x1402f32e0
cmp rbx, 0x32
jae 0x1402f38a4
mov r8, rbx
lea rcx, [rbp + 0x20]
mov rdx, r13
call sub.VCRUNTIME140.dll_memcpy
mov r13, qword [rsp + 0x58]
mov byte [rbp + rbx + 0x20], r12b
mov rcx, qword [r13 + 0x38]
add rcx, 0x10
call fcn.140301fa0
mov r8d, dword [r13 + 0x7c4]
lea rcx, [rbp + 0x1b0]
mov edx, eax
mov qword [rsp + 0x28], 0x401
mov rax, qword [r13 + 0x38]
lea r9, [rbp + 0x20]
mov qword [rsp + 0x20], rcx
mov ecx, dword [rax]
call fcn.14014b130
mov ecx, eax
test eax, eax
je 0x1402f32cc
sub ecx, 1
je 0x1402f38a9
cmp ecx, 1
jne 0x1402f32d0
lea r12, [rbp + 0x1b0]
jmp 0x1402f32d0
lea r12, [rbp + 0x20]
mov r15d, dword [rsp + 0x48]
test r12, r12
jne 0x1402f3383
jmp 0x1402f32f0
mov dword [rsp + 0x4c], edx
mov r15d, ecx
mov dword [rsp + 0x48], ecx
mov r13, qword [rsp + 0x58]
mov dword [rsp + 0x44], 0x80
lea r8, [rsp + 0x44]
mov rcx, qword [r13 + 0x220]
lea rdx, [rsp + 0x70]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1402f3344
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rbp + 0xb0]
mov ecx, eax
call fcn.1402ad7c0
lea rdx, str.getsockname___failed:__s
mov r8, rax
mov rcx, rsi
call fcn.1402c8060
jmp 0x1402f38a9
movzx eax, word [rsp + 0x70]
lea rcx, [rsp + 0x78]
cmp eax, 0x17
lea rdx, [rsp + 0x74]
mov r9d, 0x401
lea r8, [rbp + 0x1b0]
cmove rdx, rcx
mov ecx, eax
call sub.WS2_32.dll_inet_ntop
test rax, rax
je 0x1402f38a9
lea r12, [rbp + 0x1b0]
mov byte [rsp + 0x40], 0
lea rax, [rsp + 0x60]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rdx, r12
mov rcx, rsi
call fcn.1402d5150
cmp eax, 1
jne 0x1402f33b0
lea rdx, [rsp + 0x60]
mov rcx, rsi
call fcn.1402b9a40
mov rdx, qword [rsp + 0x60]
test rdx, rdx
je 0x1402f3890
mov r14, qword [rdx]
mov rcx, rsi
call fcn.1402d5740
test r14, r14
je 0x1402f3890
nop dword [rax]
nop word [rax + rax]
movzx r9d, byte [r13 + 0x7ce]
lea rax, [rsp + 0x50]
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rdx, r14
mov rcx, rsi
call fcn.1402d01e0
test eax, eax
je 0x1402f343e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14, qword [r14 + 0x28]
test r14, r14
jne 0x1402f33e0
mov r8d, 0x100
lea rdx, [rbp + 0xb0]
mov ecx, eax
call fcn.1402ad7c0
mov r8, rax
lea rdx, str.socket_failure:__s
mov rcx, rsi
call fcn.1402c8060
jmp 0x1402f38a9
mov rax, qword [rsi + 0x20]
test rax, rax
je 0x1402f345b
movzx eax, byte [rax + 0x78e]
lea r8, str.STOP
mov r8, qword [r8 + rax*8]
jmp 0x1402f3462
lea r8, [0x1403c22e4]
lea rdx, str.__s__ftp_state_use_port____opened_socket
mov rcx, rsi
call fcn.1402c8310
movsxd r8, dword [r14 + 0x10]
lea rcx, [rsp + 0x70]
mov rdx, qword [r14 + 0x20]
call sub.VCRUNTIME140.dll_memcpy
mov r12d, dword [rsp + 0x4c]
movzx ebx, r12w
mov eax, dword [r14 + 0x10]
mov dword [rsp + 0x44], eax
cmp r12w, r15w
ja 0x1402f3553
nop
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_htons]
mov r8d, dword [rsp + 0x44]
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0x50]
mov word [rsp + 0x72], ax
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x1402f3596
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [rsp + 0x40], 0
je 0x1402f353a
cmp eax, 0x2741
jne 0x1402f353a
mov r8d, 0x100
lea rdx, [rbp + 0xb0]
mov ecx, eax
call fcn.1402ad7c0
mov r9, rax
movzx r8d, bx
lea rdx, str.bind_port_hu__on_non_local_address_failed:__s
mov rcx, rsi
call fcn.1402c8150
mov dword [rsp + 0x44], 0x80
lea r8, [rsp + 0x44]
mov rcx, qword [r13 + 0x220]
lea rdx, [rsp + 0x70]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1402f3313
movzx ebx, r12w
mov byte [rsp + 0x40], al
jmp 0x1402f3549
cmp eax, 0x2740
je 0x1402f3546
cmp eax, 0xd
jne 0x1402f3567
inc bx
cmp bx, r15w
jbe 0x1402f34a0
lea rdx, str.bind___failed__we_ran_out_of_ports
mov rcx, rsi
call fcn.1402c8060
jmp 0x1402f38a9
mov r8d, 0x100
lea rdx, [rbp + 0xb0]
mov ecx, eax
call fcn.1402ad7c0
mov r9, rax
movzx r8d, bx
lea rdx, str.bind_port_hu__failed:__s
mov rcx, rsi
call fcn.1402c8060
jmp 0x1402f38a9
cmp bx, r15w
ja 0x1402f3553
mov rcx, qword [rsp + 0x50]
lea r8, [rsp + 0x44]
lea rdx, [rsp + 0x70]
mov dword [rsp + 0x44], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1402f3313
mov rax, qword [rsi + 0x20]
lea r12, str.STOP
lea r15, [0x1403c22e4]
test rax, rax
je 0x1402f35e5
movzx eax, byte [rax + 0x78e]
mov r8, qword [r12 + rax*8]
jmp 0x1402f35e8
mov r8, r15
movzx ebx, bx
lea rdx, str.__s__ftp_state_use_port____socket_bound_to_port__d
mov r9d, ebx
mov rcx, rsi
call fcn.1402c8310
mov rcx, qword [rsp + 0x50]
mov edx, 1
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1402f3642
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rbp + 0xb0]
mov ecx, eax
call fcn.1402ad7c0
lea rdx, str.socket_failure:__s
mov r8, rax
mov rcx, rsi
call fcn.1402c8060
jmp 0x1402f38a9
mov rax, qword [rsi + 0x20]
test rax, rax
je 0x1402f3658
movzx eax, byte [rax + 0x78e]
mov r8, qword [r12 + rax*8]
jmp 0x1402f365b
mov r8, r15
mov r9d, ebx
lea rdx, str.__s__ftp_state_use_port____listening_on__d
mov rcx, rsi
call fcn.1402c8310
mov r8d, gethostbyaddr
lea rdx, [rbp - 0x10]
mov rcx, r14
call fcn.1402d5110
cmp byte [r13 + 0x3b1], 0
jne 0x1402f369b
cmp byte [r13 + 0x3ac], 0
je 0x1402f369b
mov byte [r13 + 0x3b1], 1
lea r9, [rsp + 0x50]
mov r8d, 1
mov rdx, r13
mov rcx, rsi
call fcn.1402cfe30
mov r14d, eax
test eax, eax
jne 0x1402f38af
mov qword [rsp + 0x50], 0xffffffffffffffff
cmp edi, 2
je 0x1402f371e
movzx ecx, word [rsp + 0x70]
nop
cmp byte [r13 + 0x3b1], 0
jne 0x1402f36de
test edi, edi
je 0x1402f3717
cmp edi, 1
jne 0x1402f36e9
cmp cx, 2
jne 0x1402f3717
movzx eax, cx
cmp eax, 2
je 0x1402f36f6
cmp eax, 0x17
jne 0x1402f3717
movzx ecx, word [rsp + 0x72]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx r8d, ax
test edi, edi
je 0x1402f37fe
cmp edi, 1
je 0x1402f3750
movzx ecx, word [rsp + 0x70]
inc edi
cmp edi, 2
jne 0x1402f36d0
lea rbx, [r13 + 0x680]
mov dword [rbx + 0x100], edi
mov rbx, qword [rsi + 0x20]
movzx eax, byte [rbx + 0x78e]
cmp al, 0x1c
je 0x1402f3882
test rbx, rbx
je 0x1402f3869
mov r8, qword [r12 + rax*8]
jmp 0x1402f386c
movzx edx, byte [rbp - 0x10]
lea rcx, [rbp + 0x60]
test dl, dl
je 0x1402f3788
lea r9, [rbp - 0x10]
mov r10d, 0x2c
lea rax, [rbp + 0x60]
sub r9, rax
nop dword [rax]
cmp dl, 0x2e
movzx eax, dl
cmove eax, r10d
mov byte [rcx], al
inc rcx
movzx edx, byte [r9 + rcx]
test dl, dl
jne 0x1402f3770
movzx r9d, r8w
mov edx, reloc.WS2_32.dll_sendto
movzx eax, r9b
lea r8, str.__d__d
shr r9d, 8
mov dword [rsp + 0x20], eax
mov byte [rcx], 0
call fcn.1402b1780
lea rax, [rbp + 0x60]
mov rcx, rsi
lea rbx, [r13 + 0x680]
mov qword [rsp + 0x20], rax
mov rdx, rbx
lea r9, [0x1403c218d]
lea r8, [0x1403c1898]
call fcn.14030a920
mov r14d, eax
test eax, eax
je 0x1402f3725
mov ecx, eax
call fcn.1402ad9a0
mov r8, rax
lea rdx, str.Failure_sending_PORT_command:__s
mov rcx, rsi
call fcn.1402c8060
jmp 0x1402f38af
cmp word [rsp + 0x70], 2
lea rbx, [r13 + 0x680]
movzx eax, r8w
lea r9, str.EPRT
mov dword [rsp + 0x30], eax
lea r8, str._s__d_s_hu
mov ecx, 0
lea rax, [rbp - 0x10]
setne cl
mov qword [rsp + 0x28], rax
inc ecx
mov rdx, rbx
mov dword [rsp + 0x20], ecx
mov rcx, rsi
call fcn.14030a920
mov r14d, eax
test eax, eax
je 0x1402f3725
mov ecx, eax
call fcn.1402ad9a0
mov r8, rax
lea rdx, str.Failure_sending_EPRT_command:__s
mov rcx, rsi
call fcn.1402c8060
jmp 0x1402f38af
mov r8, r15
lea r9, str.PORT
mov rcx, rsi
lea rdx, str.__s_______s_
call fcn.1402c8310
mov byte [rbx + 0x78e], 0x1c
test r14d, r14d
je 0x1402f38f7
jmp 0x1402f38af
mov r8, r12
lea rdx, str.failed_to_resolve_the_address_provided_to_PORT:__s
mov rcx, rsi
call fcn.1402c8060
jmp 0x1402f38a9
mov r13, qword [rsp + 0x58]
mov r14d, 0x1e
mov rbx, qword [rsi + 0x20]
movzx eax, byte [rbx + 0x78e]
test al, al
je 0x1402f38f0
test rbx, rbx
je 0x1402f38d0
lea rcx, str.STOP
mov rax, qword [rcx + rax*8]
jmp 0x1402f38d7
lea rax, [0x1403c22e4]
lea r9, str.STOP
mov r8, rax
lea rdx, str.__s_______s_
mov rcx, rsi
call fcn.1402c8310
mov byte [rbx + 0x78e], 0
mov r8, qword [rsp + 0x50]
cmp r8, 0xffffffffffffffff
je 0x1402f390d
mov rdx, r13
mov rcx, rsi
call fcn.1402d01b0
mov eax, r14d
mov rcx, qword [rbp + 0x5c0]
xor rcx, rsp
call fcn.140311aa0
mov rbx, qword [rsp + 0x720]
add rsp, 0x6d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret