Function at 0x140066390
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
mov rsi, rcx
mov rbx, qword [rcx + 0x20]
mov rax, qword [rcx + 0x198]
cmp dword [rax + 0x10], 0
je 0x1400663ca
mov byte [rbx + 0x686], 0xd
mov rcx, rsi
mov dl, 1
mov r8b, reloc.WS2_32.dll_listen
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
jmp fcn.140064670
cmp byte [rsi + 0xa77], 0
je 0x1400663e6
mov rcx, rsi
xor edx, edx
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
jmp 0x140066500
lea rdx, [rbx + 0x590]
cmp byte [rsi + 0xa7a], 0
je 0x14006641f
mov r9, qword [rbx + 0x630]
test r9, r9
je 0x140066493
cmp byte [rsi + 0x1368], 0
je 0x1400664c1
lea r8, str.PRET_STOR__s
jmp 0x1400664c8
cmp byte [rbx + 0x2b9], 0
jne 0x14006643c
cmp byte [rbx + 0x2b4], 0
je 0x1400664ef
mov byte [rbx + 0x2b9], 1
xor eax, eax
movzx r14d, al
lea rax, [r14 + r14*4]
lea r9, str.EPSV
add r9, rax
lea r8, [0x1400ba975]
mov rcx, rsi
call fcn.14007d900
mov edi, eax
test eax, eax
jne 0x1400664e3
mov dword [rbx + 0x678], r14d
mov rax, qword [rsi + 0x20]
mov byte [rax + 0x686], 0x1e
xor edi, edi
cmp byte [rsi + 0xa87], 0
je 0x1400664e3
lea rdx, str.Connect_data_stream_passively
mov rcx, rsi
call fcn.14001cd60
jmp 0x1400664e3
mov r9, qword [rsi + 0x730]
test r9, r9
jne 0x1400664b8
cmp byte [rsi + 0x1363], 0
lea rax, str.LIST
lea r9, str.NLST
cmove r9, rax
lea r8, str.PRET__s
jmp 0x1400664c8
lea r8, str.PRET_RETR__s
mov rcx, rsi
call fcn.14007d900
mov edi, eax
test eax, eax
jne 0x1400664e3
mov rax, qword [rsi + 0x20]
mov byte [rax + 0x686], 0x1d
xor edi, edi
mov eax, edi
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
mov al, 1
jmp 0x14006643e
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x6b8
mov ebp, edx
mov rsi, rcx
mov rax, qword [0x1400cb080]
xor rax, rsp
mov qword [rsp + 0x6b0], rax
mov rdi, qword [rcx + 0x20]
mov qword [rsp + 0x58], 0xffffffffffffffff
xorps xmm0, xmm0
movups xmmword [rsp + 0x69f], xmm0
movaps xmmword [rsp + 0x690], xmm0
movaps xmmword [rsp + 0x680], xmm0
mov r12, qword [rcx + 0x760]
mov qword [rsp + 0x48], 0
test r12, r12
je 0x14006658b
mov rcx, r12
call fcn.140094370
cmp rax, 2
jb 0x14006658b
xor r13d, r13d
cmp byte [r12], 0x3a
jne 0x1400666d1
xor r15d, r15d
jmp 0x1400666f6
xor ebx, ebx
xor r14d, r14d
mov dword [rsp + 0x54], Ordinal_133
mov rcx, qword [rdi + 0x188]
lea rdx, [rsp + 0x600]
lea r8, [rsp + 0x54]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1400665e3
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0xf0]
mov r8d, 0x100
mov ecx, eax
call fcn.140050c90
lea rdx, str.getsockname___failed:__s
mov rcx, rsi
mov r8, rax
jmp 0x140066770
lea rdx, [rsp + 0x604]
movzx ecx, word [rsp + 0x600]
lea r15, [rsp + 0x1f0]
mov r9d, 0x401
mov r8, r15
call fcn.1400723b0
test rax, rax
je 0x140066775
xor r13d, r13d
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov rdx, r15
xor r8d, r8d
xor r9d, r9d
call fcn.14004a010
cmp eax, 1
jne 0x140066642
lea rdx, [rsp + 0x48]
mov rcx, rsi
call fcn.140020520
mov rdx, qword [rsp + 0x48]
test rdx, rdx
je 0x140066763
mov r12, qword [rdx]
mov rcx, rsi
call fcn.14004a650
test r12, r12
je 0x140066763
mov dword [rsp + 0x3c], ebp
lea rax, [rdi + 0x590]
mov qword [rsp + 0x40], rax
lea rbp, [rsp + 0x58]
mov r15, qword [sym.imp.WS2_32.dll_WSAGetLastError]
movzx r9d, byte [rdi + 0x6c6]
mov qword [rsp + 0x20], rbp
mov rcx, rsi
mov rdx, r12
xor r8d, r8d
call fcn.14003d830
test eax, eax
je 0x14006685f
call r15
mov r12, qword [r12 + 0x28]
test r12, r12
jne 0x140066680
lea rdx, [rsp + 0xf0]
mov r8d, 0x100
mov ecx, eax
call fcn.140050c90
lea rdx, str.socket_failure:__s
jmp 0x1400665d8
mov r15, rax
mov rcx, r12
mov edx, 0x3a
call fcn.140082300
test rax, rax
je 0x1400667e3
mov r15, rax
sub r15, r12
mov r13, r12
mov r12, rax
mov rcx, r12
mov edx, 0x3a
call fcn.140082300
xor r12d, r12d
test rax, rax
je 0x1400667c3
mov r14, rax
mov rcx, rax
inc rcx
xor edx, edx
mov r8d, 0xa
call fcn.140094e34
mov ecx, eax
call fcn.14002d8b0
mov ebx, eax
mov rcx, r14
mov edx, Ordinal_46
call fcn.140082300
test rax, rax
je 0x1400667ca
inc rax
mov rcx, rax
xor edx, edx
mov r8d, 0xa
call fcn.140094e34
mov ecx, eax
call fcn.14002d8b0
mov r14d, eax
jmp 0x1400667cd
lea rdx, str.failed_to_resolve_the_address_provided_to_PORT:__s
mov rcx, rsi
mov r8, r15
call fcn.14001cc90
mov r12d, 0x1e
mov rax, qword [rsi + 0x20]
mov byte [rax + 0x686], 0
mov r8, qword [rsp + 0x58]
cmp r8, 0xffffffffffffffff
je 0x14006679c
mov rcx, rsi
mov rdx, rdi
call fcn.14003d950
mov rcx, qword [rsp + 0x6b0]
xor rcx, rsp
call fcn.140080da0
mov eax, r12d
add rsp, 0x6b8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor ebx, ebx
xor r14d, r14d
jmp 0x1400667cd
mov r14d, ebx
cmp bx, r14w
cmova ebx, r12d
cmova r14d, r12d
test r15, r15
jne 0x1400667eb
jmp 0x140066590
xor r14d, r14d
xor ebx, ebx
mov r13, r12
mov r12d, 0x1e
cmp r15, 0x31
ja 0x14006677b
mov dword [rsp + 0x3c], ebp
lea rbp, [rsp + 0xb0]
mov rcx, rbp
mov rdx, r13
mov r8, r15
call fcn.1400a6690
mov byte [rsp + r15 + 0xb0], 0
mov rax, qword [rdi + 0x38]
mov ecx, dword [rax]
lea r15, [rsp + 0x1f0]
mov rdx, rbp
mov r8, r15
mov r9d, 0x401
call fcn.14001ced0
mov r13b, 1
test eax, eax
je 0x140066973
cmp eax, 1
je 0x14006677b
cmp eax, 2
jne 0x14006697f
mov ebp, dword [rsp + 0x3c]
jmp 0x140066615
mov rdx, qword [r12 + 0x20]
movsxd r8, dword [r12 + 0x10]
lea rcx, [rsp + 0x600]
call fcn.1400a6690
mov eax, dword [r12 + 0x10]
mov dword [rsp + 0x54], eax
cmp bx, r14w
jbe 0x140066899
lea rdx, str.bind___failed__we_ran_out_of_ports
mov rcx, rsi
call fcn.14001cc90
jmp 0x140066775
mov ebp, ebx
jmp 0x1400668a8
inc ebp
cmp bp, r14w
ja 0x140066885
cmp word [rsp + 0x600], 2
jne 0x1400668c3
mov ecx, ebp
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x602], ax
mov r8d, dword [rsp + 0x54]
mov rcx, qword [rsp + 0x58]
lea rdx, [rsp + 0x600]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x140066988
call r15
test r13b, r13b
je 0x1400668f2
cmp eax, 0x2741
je 0x140066903
cmp eax, 0xd
je 0x1400668a0
cmp eax, 0x2740
je 0x1400668a0
jmp 0x1400669cf
test rsi, rsi
je 0x140066941
cmp byte [rsi + 0xa87], 0
je 0x140066941
movzx ebp, bp
mov r8d, 0x100
mov ecx, 0x2741
lea rdx, [rsp + 0xf0]
call fcn.140050c90
mov rcx, rsi
lea rdx, str.bind_port_hu__on_non_local_address_failed:__s
mov r8d, ebp
mov r9, rax
call fcn.14001cd60
mov dword [rsp + 0x54], Ordinal_133
mov rcx, qword [rdi + 0x188]
lea rdx, [rsp + 0x600]
lea r8, [rsp + 0x54]
call qword [sym.imp.WS2_32.dll_getsockname]
xor r13d, r13d
test eax, eax
je 0x140066899
jmp 0x1400665b6
mov r15, rbp
mov ebp, dword [rsp + 0x3c]
jmp 0x140066615
mov ebp, dword [rsp + 0x3c]
jmp 0x140066590
mov dword [rsp + 0x54], Ordinal_133
mov rcx, qword [rsp + 0x58]
lea rdx, [rsp + 0x600]
lea r8, [rsp + 0x54]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1400665b6
mov rcx, qword [rsp + 0x58]
mov edx, 1
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x140066a01
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x1400666b0
movzx ebx, bp
lea rdx, [rsp + 0xf0]
mov r8d, 0x100
mov ecx, eax
call fcn.140050c90
lea rdx, str.bind_port_hu__failed:__s
mov rcx, rsi
mov r8d, ebx
mov r9, rax
call fcn.14001cc90
jmp 0x140066775
lea rbx, [rsp + 0x680]
mov r8d, 0x2f
mov rcx, r12
mov rdx, rbx
call fcn.140049870
mov ebp, 2
cmp dword [rsp + 0x3c], 2
jne 0x140066a60
mov dword [rdi + 0x678], ebp
lea r9, [rsp + 0x58]
mov rcx, rsi
mov rdx, rdi
mov r8d, 1
call fcn.14003eea0
mov r12d, eax
test eax, eax
jne 0x14006677b
mov rax, qword [rsi + 0x20]
mov byte [rax + 0x686], 0x1c
xor r12d, r12d
jmp 0x14006679c
mov r14, qword [sym.imp.WS2_32.dll_ntohs]
jmp 0x140066a78
mov eax, dword [rsp + 0x3c]
inc eax
mov dword [rsp + 0x3c], eax
cmp eax, 2
je 0x140066a26
cmp byte [rdi + 0x2ba], 0
jne 0x140066a88
cmp dword [rsp + 0x3c], 0
je 0x140066a69
cmp word [rsp + 0x600], 2
jne 0x140066a69
movzx ecx, word [rsp + 0x602]
call r14
mov ecx, dword [rsp + 0x3c]
test ecx, ecx
je 0x140066b3c
cmp ecx, 1
jne 0x140066a69
xor edx, edx
jmp 0x140066abe
mov r8d, ecx
mov byte [rsp + rdx + 0x60], r8b
inc rdx
movzx ecx, byte [rsp + rdx + 0x680]
mov r8b, Ordinal_46
cmp ecx, 0x2e
je 0x140066ab6
test ecx, ecx
jne 0x140066ab3
lea rcx, [rsp + rdx]
add rcx, 0x60
mov byte [rsp + rdx + 0x60], 0
movzx r9d, ax
movzx eax, r9b
shr r9d, 8
mov dword [rsp + 0x20], eax
lea r8, str.__d__d
mov edx, reloc.WS2_32.dll_sendto
call fcn.14003bc00
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
lea r8, [0x1400b9c9a]
lea r9, str.PORT
mov rcx, rsi
mov rdx, qword [rsp + 0x40]
call fcn.14007d900
test eax, eax
je 0x140066ba1
mov r12d, eax
mov ecx, eax
call fcn.140050c50
lea rdx, str.Failure_sending_PORT_command:__s
jmp 0x140066b91
xor ecx, ecx
cmp word [rsp + 0x600], 2
movzx eax, ax
sete cl
mov edx, 2
sub edx, ecx
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], edx
lea r8, str._s__d_s_hu
lea r9, str.EPRT
mov rcx, rsi
mov rdx, qword [rsp + 0x40]
call fcn.14007d900
test eax, eax
je 0x140066bab
mov r12d, eax
mov ecx, eax
call fcn.140050c50
lea rdx, str.Failure_sending_EPRT_command:__s
mov rcx, rsi
mov r8, rax
call fcn.14001cc90
jmp 0x14006677b
mov ebp, 1
jmp 0x140066a26
xor ebp, ebp
jmp 0x140066a26