Function at 0x140186bb0
Capabilities:
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 [0x1401ec840]
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 0x140186e1b
mov rax, 0xffffffffffffffff
inc rax
cmp byte [r14 + rax], bl
jne 0x140186c44
cmp rax, 1
jbe 0x140186e1b
movzx eax, byte [r14]
cmp al, 0x5b
jne 0x140186c83
lea r15, [r14 + 1]
mov edx, 0x5d
mov rcx, r15
call sub.VCRUNTIME140.dll_strchr
mov r14, rax
test rax, rax
je 0x140186cca
mov rbx, rax
mov r13, r15
sub rbx, r15
jmp 0x140186cdc
cmp al, 0x3a
je 0x140186cdc
mov edx, Ordinal_60
mov rcx, r14
call sub.VCRUNTIME140.dll_strchr
mov r15, rax
mov r13, r14
test rax, rax
je 0x140186d44
mov rbx, rax
lea r8, [rsp + 0x78]
mov rdx, r14
mov ecx, reloc.WS2_32.dll_socket
sub rbx, r14
call fcn.140178590
cmp eax, 1
mov r14, r15
mov rdx, r12
cmove r14, rdx
jmp 0x140186ccc
xor edx, edx
movzx eax, dx
movzx r15d, dx
test r14, r14
je 0x140186d62
mov edx, Ordinal_60
mov rcx, r14
call sub.VCRUNTIME140.dll_strchr
xor edx, edx
mov r14, rax
mov eax, edx
mov r15d, edx
test r14, r14
je 0x140186d62
lea rcx, [r14 + 1]
lea r8d, [rdx + 0xa]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoul]
mov ecx, eax
call fcn.14015ddb0
mov edx, reloc.WLDAP32.dll_Ordinal_45
mov rcx, r14
movzx r15d, ax
call sub.VCRUNTIME140.dll_strchr
xor edx, edx
test rax, rax
je 0x140186d3e
lea rcx, [rax + 1]
lea r8d, [rdx + 0xa]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoul]
mov ecx, eax
call fcn.14015ddb0
xor edx, edx
jmp 0x140186d62
movzx eax, r15w
jmp 0x140186d62
mov rbx, 0xffffffffffffffff
nop dword [rax + rax]
inc rbx
cmp byte [r14 + rbx], r12b
jne 0x140186d50
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 0x140186e10
cmp rbx, 0x32
jae 0x1401873d4
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.140195ef0
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.14014b3c0
mov ecx, eax
test eax, eax
je 0x140186dfc
sub ecx, 1
je 0x1401873d9
cmp ecx, 1
jne 0x140186e00
lea r12, [rbp + 0x1b0]
jmp 0x140186e00
lea r12, [rbp + 0x20]
mov r15d, dword [rsp + 0x48]
test r12, r12
jne 0x140186eb3
jmp 0x140186e20
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 0x140186e74
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rbp + 0xb0]
mov ecx, eax
call fcn.140140ea0
lea rdx, str.getsockname___failed:__s
mov r8, rax
mov rcx, rsi
call fcn.140159df0
jmp 0x1401873d9
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 fcn.140194900
test rax, rax
je 0x1401873d9
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.140167a80
cmp eax, 1
jne 0x140186ee0
lea rdx, [rsp + 0x60]
mov rcx, rsi
call fcn.14014b600
mov rdx, qword [rsp + 0x60]
test rdx, rdx
je 0x1401873c0
mov r14, qword [rdx]
mov rcx, rsi
call fcn.140168070
test r14, r14
je 0x1401873c0
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.1401634e0
test eax, eax
je 0x140186f6e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14, qword [r14 + 0x28]
test r14, r14
jne 0x140186f10
mov r8d, 0x100
lea rdx, [rbp + 0xb0]
mov ecx, eax
call fcn.140140ea0
mov r8, rax
lea rdx, str.socket_failure:__s
mov rcx, rsi
call fcn.140159df0
jmp 0x1401873d9
mov rax, qword [rsi + 0x20]
test rax, rax
je 0x140186f8b
movzx eax, byte [rax + 0x78e]
lea r8, str.h_e_
mov r8, qword [r8 + rax*8]
jmp 0x140186f92
lea r8, [0x1401c45cc]
lea rdx, str.__s__ftp_state_use_port____opened_socket
mov rcx, rsi
call fcn.14015a0a0
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 0x140187083
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 0x1401870c6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [rsp + 0x40], 0
je 0x14018706a
cmp eax, 0x2741
jne 0x14018706a
mov r8d, 0x100
lea rdx, [rbp + 0xb0]
mov ecx, eax
call fcn.140140ea0
mov r9, rax
movzx r8d, bx
lea rdx, str.bind_port_hu__on_non_local_address_failed:__s
mov rcx, rsi
call fcn.140159ee0
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 0x140186e43
movzx ebx, r12w
mov byte [rsp + 0x40], al
jmp 0x140187079
cmp eax, 0x2740
je 0x140187076
cmp eax, 0xd
jne 0x140187097
inc bx
cmp bx, r15w
jbe 0x140186fd0
lea rdx, str.bind___failed__we_ran_out_of_ports
mov rcx, rsi
call fcn.140159df0
jmp 0x1401873d9
mov r8d, 0x100
lea rdx, [rbp + 0xb0]
mov ecx, eax
call fcn.140140ea0
mov r9, rax
movzx r8d, bx
lea rdx, str.bind_port_hu__failed:__s
mov rcx, rsi
call fcn.140159df0
jmp 0x1401873d9
cmp bx, r15w
ja 0x140187083
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 0x140186e43
mov rax, qword [rsi + 0x20]
lea r12, str.h_e_
lea r15, [0x1401c45cc]
test rax, rax
je 0x140187115
movzx eax, byte [rax + 0x78e]
mov r8, qword [r12 + rax*8]
jmp 0x140187118
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.14015a0a0
mov rcx, qword [rsp + 0x50]
mov edx, 1
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x140187172
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rbp + 0xb0]
mov ecx, eax
call fcn.140140ea0
lea rdx, str.socket_failure:__s
mov r8, rax
mov rcx, rsi
call fcn.140159df0
jmp 0x1401873d9
mov rax, qword [rsi + 0x20]
test rax, rax
je 0x140187188
movzx eax, byte [rax + 0x78e]
mov r8, qword [r12 + rax*8]
jmp 0x14018718b
mov r8, r15
mov r9d, ebx
lea rdx, str.__s__ftp_state_use_port____listening_on__d
mov rcx, rsi
call fcn.14015a0a0
mov r8d, Ordinal_50
lea rdx, [rbp - 0x10]
mov rcx, r14
call fcn.140167a40
cmp byte [r13 + 0x3b1], 0
jne 0x1401871cb
cmp byte [r13 + 0x3ac], 0
je 0x1401871cb
mov byte [r13 + 0x3b1], 1
lea r9, [rsp + 0x50]
mov r8d, 1
mov rdx, r13
mov rcx, rsi
call fcn.140163130
mov r14d, eax
test eax, eax
jne 0x1401873df
mov qword [rsp + 0x50], 0xffffffffffffffff
cmp edi, 2
je 0x14018724e
movzx ecx, word [rsp + 0x70]
nop
cmp byte [r13 + 0x3b1], 0
jne 0x14018720e
test edi, edi
je 0x140187247
cmp edi, 1
jne 0x140187219
cmp cx, 2
jne 0x140187247
movzx eax, cx
cmp eax, 2
je 0x140187226
cmp eax, 0x17
jne 0x140187247
movzx ecx, word [rsp + 0x72]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx r8d, ax
test edi, edi
je 0x14018732e
cmp edi, 1
je 0x140187280
movzx ecx, word [rsp + 0x70]
inc edi
cmp edi, 2
jne 0x140187200
lea rbx, [r13 + 0x680]
mov dword [rbx + 0x100], edi
mov rbx, qword [rsi + 0x20]
movzx eax, byte [rbx + 0x78e]
cmp al, 0x1c
je 0x1401873b2
test rbx, rbx
je 0x140187399
mov r8, qword [r12 + rax*8]
jmp 0x14018739c
movzx edx, byte [rbp - 0x10]
lea rcx, [rbp + 0x60]
test dl, dl
je 0x1401872b8
lea r9, [rbp - 0x10]
mov r10d, Ordinal_46
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 0x1401872a0
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.1401605e0
lea rax, [rbp + 0x60]
mov rcx, rsi
lea rbx, [r13 + 0x680]
mov qword [rsp + 0x20], rax
mov rdx, rbx
lea r9, [0x1401b243d]
lea r8, str._s__s
call fcn.14019e890
mov r14d, eax
test eax, eax
je 0x140187255
mov ecx, eax
call fcn.140141080
mov r8, rax
lea rdx, str.Failure_sending_PORT_command:__s
mov rcx, rsi
call fcn.140159df0
jmp 0x1401873df
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.14019e890
mov r14d, eax
test eax, eax
je 0x140187255
mov ecx, eax
call fcn.140141080
mov r8, rax
lea rdx, str.Failure_sending_EPRT_command:__s
mov rcx, rsi
call fcn.140159df0
jmp 0x1401873df
mov r8, r15
lea r9, str.PORT
mov rcx, rsi
lea rdx, str.__s_______s_
call fcn.14015a0a0
mov byte [rbx + 0x78e], 0x1c
test r14d, r14d
je 0x140187427
jmp 0x1401873df
mov r8, r12
lea rdx, str.failed_to_resolve_the_address_provided_to_PORT:__s
mov rcx, rsi
call fcn.140159df0
jmp 0x1401873d9
mov r13, qword [rsp + 0x58]
mov r14d, reloc.WLDAP32.dll_Ordinal_30
mov rbx, qword [rsi + 0x20]
movzx eax, byte [rbx + 0x78e]
test al, al
je 0x140187420
test rbx, rbx
je 0x140187400
lea rcx, str.h_e_
mov rax, qword [rcx + rax*8]
jmp 0x140187407
lea rax, [0x1401c45cc]
lea r9, str.STOP
mov r8, rax
lea rdx, str.__s_______s_
mov rcx, rsi
call fcn.14015a0a0
mov byte [rbx + 0x78e], 0
mov r8, qword [rsp + 0x50]
cmp r8, 0xffffffffffffffff
je 0x14018743d
mov rdx, r13
mov rcx, rsi
call fcn.1401634b0
mov eax, r14d
mov rcx, qword [rbp + 0x5c0]
xor rcx, rsp
call fcn.1401a2f30
mov rbx, qword [rsp + 0x720]
add rsp, 0x6d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret