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

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x20
mov rsi, rcx
mov rdi, qword [rcx + 0x18]
mov rax, qword [rcx + 0x1a0]
cmp dword [rax + 0x10], 0
je 0x140202c26
mov byte [rdi + 0x6ae], 0xd
mov rcx, rsi
mov dl, 1
mov r8b, 0xd
add rsp, 0x20
pop rbx
pop rdi
pop rsi
jmp fcn.1402010f0
mov eax, dword [rsi + 0xa88]
test eax, 0x1000
jne 0x140202cb9
lea rdx, [rdi + 0x5b8]
test ax, ax
js 0x140202cca
mov eax, dword [rdi + 0x2c8]
mov ecx, eax
and ecx, 0x21000
cmp ecx, 0x1000
jne 0x140202c68
or eax, 0x20000
mov dword [rdi + 0x2c8], eax
xor ebx, ebx
test eax, 0x20000
sete bl
lea rax, [rbx + rbx*4]
lea r9, str.EPSV
add r9, rax
lea r8, [0x14027bb4d]
mov rcx, rsi
call fcn.14024b850
test eax, eax
jne 0x140202d34
mov dword [rdi + 0x6a0], ebx
mov rax, qword [rsi + 0x18]
mov byte [rax + 0x6ae], 0x1e
lea rdx, str.Connect_data_stream_passively
mov rcx, rsi
call fcn.1401955d0
jmp 0x140202d32
mov rcx, rsi
xor edx, edx
add rsp, 0x20
pop rbx
pop rdi
pop rsi
jmp 0x140202d40
mov r9, qword [rdi + 0x658]
test r9, r9
je 0x140202ce6
test eax, 0x10000000
jne 0x140202d14
lea r8, str.PRET_RETR__s
jmp 0x140202d1b
mov r9, qword [rsi + 0x740]
test r9, r9
jne 0x140202d0b
test byte [rsi + 0x12f9], 0x80
lea rax, [0x14027be28]
lea r9, str.NLST
cmove r9, rax
lea r8, str.PRET__s
jmp 0x140202d1b
lea r8, str.PRET_STOR__s
mov rcx, rsi
call fcn.14024b850
test eax, eax
jne 0x140202d34
mov rax, qword [rsi + 0x18]
mov byte [rax + 0x6ae], 0x1d
xor eax, eax
add rsp, 0x20
pop rbx
pop rdi
pop rsi
ret
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x678
mov ebp, edx
mov rsi, rcx
mov rdi, qword [rcx + 0x18]
mov qword [rsp + 0x50], 0xffffffffffffffff
xorps xmm0, xmm0
movups xmmword [rsp + 0x8f], xmm0
movaps xmmword [rsp + 0x80], xmm0
movaps xmmword [rsp + 0x70], xmm0
mov r14, qword [rcx + 0x770]
mov qword [rsp + 0x60], 0
test r14, r14
je 0x140202e01
mov rcx, r14
call sub.msvcrt.dll_strlen
cmp rax, 2
jb 0x140202e01
cmp rax, 0x42
mov ecx, 0x41
cmovae rcx, rax
mov rax, qword [0x14026c258]
inc rcx
mov edx, 1
call qword [rax]
test rax, rax
je 0x140202fe4
mov rbx, rax
movzx eax, byte [r14]
cmp eax, 0x3a
je 0x14020303b
mov rcx, r14
cmp eax, 0x5b
jne 0x140202fed
mov edx, 0x5d
call sub.msvcrt.dll_strchr
test rax, rax
je 0x1402030a5
mov r15, rax
inc r14
jmp 0x140203027
xor r14d, r14d
xor r15d, r15d
xor ebx, ebx
mov dword [rsp + 0x44], 0x80
mov rcx, qword [rdi + 0x1a8]
lea rdx, [rsp + 0xa0]
lea r8, [rsp + 0x44]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x140202e5c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0x170]
mov r8d, 0x100
mov ecx, eax
call fcn.1401f8a10
lea rdx, str.getsockname___failed:__s
mov rcx, rsi
mov r8, rax
jmp 0x140202f97
movzx ecx, word [rsp + 0xa0]
cmp ecx, 0x17
jne 0x140202e86
lea rdx, [rsp + 0xa8]
lea r8, [rsp + 0x270]
mov r9d, 0x401
mov ecx, 0x17
jmp 0x140202e9c
lea rdx, [rsp + 0xa4]
lea r8, [rsp + 0x270]
mov r9d, 0x401
call qword [sym.imp.WS2_32.dll_inet_ntop]
test rax, rax
je 0x140202f9c
mov dword [rsp + 0x5c], ebp
lea r12, [rsp + 0x270]
xor ebp, ebp
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov rdx, r12
xor r8d, r8d
xor r9d, r9d
call fcn.1401ee720
cmp eax, 1
jne 0x140202ee6
lea rdx, [rsp + 0x60]
mov rcx, rsi
call fcn.1401982f0
mov rdx, qword [rsp + 0x60]
test rdx, rdx
je 0x140202f8a
mov r13, qword [rdx]
mov rcx, rsi
call fcn.1401eec30
test r13, r13
je 0x140202f8a
mov qword [rsp + 0x48], rbx
lea rax, [rdi + 0x5b8]
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x50], 0xffffffffffffffff
lea r12, [rsp + 0x50]
mov rbx, qword [sym.imp.WS2_32.dll_WSAGetLastError]
nop
movzx r9d, byte [rdi + 0x6f5]
mov qword [rsp + 0x20], r12
mov rcx, rsi
mov rdx, r13
xor r8d, r8d
call fcn.140219270
test eax, eax
je 0x1402030b0
call rbx
mov r13, qword [r13 + 0x28]
test r13, r13
jne 0x140202f30
lea rdx, [rsp + 0x170]
mov r8d, 0x100
mov ecx, eax
call fcn.1401f8a10
lea rdx, str.socket_failure:__s
mov rcx, rsi
mov r8, rax
call fcn.140195520
jmp 0x1402030e2
lea rdx, str.failed_to_resolve_the_address_provided_to_PORT:__s
mov rcx, rsi
mov r8, r12
call fcn.140195520
mov ebp, 0x1e
mov rax, qword [rsi + 0x18]
mov byte [rax + 0x6ae], 0
mov r8, qword [rsp + 0x50]
cmp r8, 0xffffffffffffffff
je 0x140202fc2
mov rcx, rsi
mov rdx, rdi
call fcn.1402193b0
mov rax, qword [0x1402654c0]
mov rcx, rbx
call qword [rax]
mov eax, ebp
add rsp, 0x678
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ebp, 0x1b
xor ebx, ebx
jmp 0x140202fa1
mov edx, 0x3a
call sub.msvcrt.dll_strchr
test rax, rax
je 0x14020301a
mov r15, rax
lea r8, [rsp + 0xa0]
mov ecx, 0x17
mov rdx, r14
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x140203027
mov rcx, rbx
mov rdx, r14
call sub.msvcrt.dll_strcpy
jmp 0x1402030a5
mov r8, r15
sub r8, r14
mov rcx, rbx
mov rdx, r14
call sub.msvcrt.dll_strncpy
mov r14, r15
mov rcx, r14
mov edx, 0x3a
call sub.msvcrt.dll_strchr
test rax, rax
je 0x1402030a5
mov r15, rax
mov rcx, rax
inc rcx
xor edx, edx
mov r8d, 0xa
call sub.msvcrt.dll_strtoul
mov ecx, eax
call fcn.1401a1d90
mov r14d, eax
mov rcx, r15
mov edx, 0x2d
call sub.msvcrt.dll_strchr
test rax, rax
je 0x1402031dd
inc rax
mov rcx, rax
xor edx, edx
mov r8d, 0xa
call sub.msvcrt.dll_strtoul
mov ecx, eax
call fcn.1401a1d90
mov r15d, eax
jmp 0x1402031e0
xor r14d, r14d
xor r15d, r15d
jmp 0x1402031e0
mov rdx, qword [r13 + 0x20]
movsxd r8, dword [r13 + 0x10]
lea rcx, [rsp + 0xa0]
call sub.msvcrt.dll_memcpy
mov eax, dword [r13 + 0x10]
mov dword [rsp + 0x44], eax
cmp r14w, r15w
jbe 0x1402030f1
lea rdx, str.bind___failed__we_ran_out_of_ports
mov rcx, rsi
call fcn.140195520
mov ebp, 0x1e
mov rbx, qword [rsp + 0x48]
jmp 0x140202fa1
mov r12d, r14d
jmp 0x140203109
inc r12d
cmp r12w, r15w
ja 0x1402030d3
mov ecx, r12d
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0xa2], ax
mov rcx, qword [rsp + 0x50]
mov r8d, dword [rsp + 0x44]
lea rdx, [rsp + 0xa0]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x14020325e
call rbx
test bpl, bpl
je 0x140203148
cmp eax, 0x2741
je 0x140203159
cmp eax, 0xd
je 0x140203100
cmp eax, 0x2740
je 0x140203100
jmp 0x1402032c6
movzx r12d, r12w
mov r8d, 0x100
mov ecx, 0x2741
lea rdx, [rsp + 0x170]
call fcn.1401f8a10
mov rcx, rsi
lea rdx, str.bind_port_hu__on_non_local_address_failed:__s
mov r8d, r12d
mov r9, rax
call fcn.1401955d0
mov dword [rsp + 0x44], 0x80
mov rcx, qword [rdi + 0x1a8]
lea rdx, [rsp + 0xa0]
lea r8, [rsp + 0x44]
call qword [sym.imp.WS2_32.dll_getsockname]
xor ebp, ebp
test eax, eax
je 0x1402030f1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0x170]
mov r8d, 0x100
mov ecx, eax
call fcn.1401f8a10
lea rdx, str.getsockname___failed:__s
jmp 0x140202f7a
mov r15d, r14d
xor eax, eax
cmp r14w, r15w
cmova r14d, eax
cmova r15d, eax
cmp byte [rbx], 0
je 0x140202e09
mov dword [rsp + 0x5c], ebp
mov rcx, qword [rdi + 0x58]
mov r13d, dword [rcx]
add rcx, 0x10
call fcn.14024bd90
mov r8d, dword [rdi + 0x6ec]
lea r12, [rsp + 0x270]
mov qword [rsp + 0x20], r12
mov dword [rsp + 0x28], 0x401
mov ecx, r13d
mov edx, eax
mov r9, rbx
call fcn.14024be70
mov bpl, 1
test eax, eax
je 0x140203256
cmp eax, 1
je 0x140202f9c
cmp eax, 2
je 0x140202eb9
mov ebp, dword [rsp + 0x5c]
jmp 0x140202e09
mov r12, rbx
jmp 0x140202eb9
mov dword [rsp + 0x44], 0x80
mov rcx, qword [rsp + 0x50]
lea rdx, [rsp + 0xa0]
lea r8, [rsp + 0x44]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
mov rbx, qword [rsp + 0x48]
jne 0x140202e2f
mov rcx, qword [rsp + 0x50]
mov edx, 1
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1402032f9
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0x170]
mov r8d, 0x100
mov ecx, eax
call fcn.1401f8a10
lea rdx, str.socket_failure:__s
jmp 0x140202e51
movzx ebp, r12w
lea rdx, [rsp + 0x170]
mov r8d, 0x100
mov ecx, eax
call fcn.1401f8a10
lea rdx, str.bind_port_hu__failed:__s
mov rcx, rsi
mov r8d, ebp
mov r9, rax
call fcn.140195520
jmp 0x1402030e2
lea r14, [rsp + 0x70]
mov r8d, 0x2f
mov rcx, r13
mov rdx, r14
call fcn.1401edfc0
mov eax, dword [rdi + 0x2c8]
mov ecx, eax
and ecx, 0x41000
cmp ecx, 0x1000
jne 0x140203330
or eax, 0x40000
mov dword [rdi + 0x2c8], eax
mov ebx, 2
mov r12d, dword [rsp + 0x5c]
cmp r12d, 2
jne 0x14020336b
mov dword [rdi + 0x6a0], ebx
lea r9, [rsp + 0x50]
mov rcx, rsi
mov rdx, rdi
mov r8d, 1
call fcn.14021a360
test eax, eax
je 0x140203463
mov ebp, eax
jmp 0x1402030e7
mov ebp, 0x40000
mov r15, qword [sym.imp.WS2_32.dll_ntohs]
jmp 0x140203382
inc r12d
cmp r12d, 2
je 0x140203340
mov eax, dword [rdi + 0x2c8]
and eax, ebp
or eax, r12d
je 0x140203379
movzx eax, word [rsp + 0xa0]
cmp r12d, 1
jne 0x1402033a3
cmp ax, 2
jne 0x140203340
movzx eax, ax
cmp eax, 0x17
je 0x1402033b0
cmp eax, 2
jne 0x140203379
movzx ecx, word [rsp + 0xa2]
call r15
test r12d, r12d
je 0x140203483
cmp r12d, 1
jne 0x140203379
xor edx, edx
jmp 0x1402033dc
mov r8d, ecx
mov byte [rsp + rdx + 0x120], r8b
inc rdx
movzx ecx, byte [rsp + rdx + 0x70]
mov r8b, 0x2c
cmp ecx, 0x2e
je 0x1402033d1
test ecx, ecx
jne 0x1402033ce
lea rcx, [rsp + rdx]
add rcx, 0x120
mov byte [rsp + rdx + 0x120], 0
movzx r9d, ax
movzx eax, r9b
shr r9d, 8
mov dword [rsp + 0x20], eax
lea r8, str.__d__d
mov edx, 0x14
call fcn.1401ac550
lea rax, [rsp + 0x120]
mov qword [rsp + 0x20], rax
lea r8, [0x14027bf53]
lea r9, str.PORT
mov rcx, rsi
mov rdx, qword [rsp + 0x68]
call fcn.14024b850
test eax, eax
je 0x1402034ee
mov ebp, eax
mov ecx, eax
call fcn.1401f89d0
lea rdx, str.Failure_sending_PORT_command:__s
jmp 0x1402034d7
mov qword [rsp + 0x50], 0xffffffffffffffff
mov rax, qword [rsi + 0x18]
mov byte [rax + 0x6ae], 0x1c
xor ebp, ebp
mov rbx, qword [rsp + 0x48]
jmp 0x140202fc2
xor ecx, ecx
cmp word [rsp + 0xa0], 2
sete cl
mov edx, 2
sub edx, ecx
movzx eax, ax
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], edx
lea r8, str._s__d_s_hu
lea r9, str.EPRT
mov rcx, rsi
mov rdx, qword [rsp + 0x68]
call fcn.14024b850
test eax, eax
je 0x1402034e7
mov ebp, eax
mov ecx, eax
call fcn.1401f89d0
lea rdx, str.Failure_sending_EPRT_command:__s
mov rcx, rsi
mov r8, rax
call fcn.140195520
jmp 0x1402030e7
xor ebx, ebx
jmp 0x140203340
mov ebx, 1
jmp 0x140203340