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

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
mov rcx, qword [rcx]
mov rax, qword [rcx + 0x1f8]
cmp dword [rax + 0x18], 0
je 0x140065ce5
mov edx, reloc.WS2_32.dll_listen
mov rcx, rbx
call fcn.1400642b0
mov r8d, edx
mov dl, 1
add rsp, 0x20
pop rbx
jmp fcn.140065e00
cmp byte [rcx + 0x737], 0
je 0x140065cfd
xor edx, edx
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp 0x140066890
cmp byte [rcx + 0x74e], 0
je 0x140065da0
mov r8, qword [rbx + 0x7d0]
test r8, r8
jne 0x140065d58
mov r8, qword [rcx + 0x7a8]
test r8, r8
jne 0x140065d3b
cmp byte [rcx + 0x736], 0
lea rax, str.NLST
lea r8, str.LIST
cmovne r8, rax
lea rcx, [rbx + 0x748]
lea rdx, str.PRET__s
call fcn.140076770
test eax, eax
je 0x140065d8e
add rsp, 0x20
pop rbx
ret
cmp byte [rcx + 0x742], 0
lea rcx, [rbx + 0x748]
je 0x140065d7e
lea rdx, str.PRET_STOR__s
call fcn.140076770
test eax, eax
je 0x140065d8e
add rsp, 0x20
pop rbx
ret
lea rdx, str.PRET_RETR__s
call fcn.140076770
test eax, eax
jne 0x140065dad
mov edx, Ordinal_33
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp fcn.1400642b0
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp fcn.140066800
add rsp, 0x20
pop rbx
ret
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x900]
sub rsp, 0xa00
mov rax, qword [0x14017af60]
xor rax, rsp
mov qword [rbp + 0x8f0], rax
mov r14, qword [rcx]
mov esi, edx
mov rdi, rcx
mov qword [rsp + 0x40], r14
xor edx, edx
mov qword [rsp + 0x38], 0xffffffffffffffff
lea rcx, [rbp - 0x20]
mov r8d, VarUI2FromI4
call fcn.1400ad020
mov rbx, qword [r14 + 0x7d8]
xor eax, eax
mov qword [rsp + 0x50], rax
mov r13d, eax
mov rcx, qword [r14 + 0x7d8]
movzx r12d, ax
mov word [rsp + 0x48], ax
mov r15d, eax
mov byte [rsp + 0x30], 1
test rcx, rcx
je 0x140066b1d
or rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp byte [rcx + rax], r13b
jne 0x140066920
cmp rax, 1
jbe 0x140066b1d
or rax, 0xffffffffffffffff
inc rax
cmp byte [rbx + rax], r13b
jne 0x140066937
cmp rax, 0x41
jae 0x14006694d
mov ecx, 0x41
jmp 0x14006695a
or rcx, 0xffffffffffffffff
inc rcx
cmp byte [rbx + rcx], r13b
jne 0x140066951
inc rcx
mov edx, 1
call qword [case.0x14003ec86.1]
mov r15, rax
test rax, rax
jne 0x140066979
lea eax, [r15 + 0x1b]
jmp 0x14006705d
movzx eax, byte [rbx]
cmp al, 0x5b
jne 0x1400669b0
mov edx, 0x5d
lea r12, [rbx + 1]
mov rcx, rbx
call fcn.1400af328
mov r14, rax
test rax, rax
je 0x140066a2e
mov r8, rax
mov rdx, r12
sub r8, r12
mov rcx, r15
call fcn.1400eb580
jmp 0x140066a2e
cmp al, 0x3a
jne 0x1400669b9
mov r14, rbx
jmp 0x140066a2e
mov edx, Ordinal_60
mov rcx, rbx
call fcn.1400af328
mov r14, rax
test rax, rax
je 0x140066a17
lea r8, [rsp + 0x60]
mov rdx, rbx
mov ecx, reloc.WS2_32.dll_socket
call fcn.140057e60
mov rcx, r15
cmp eax, 1
jne 0x140066a07
sub rcx, rbx
nop dword [rax + rax]
movzx eax, byte [rbx]
mov byte [rcx + rbx], al
inc rbx
test al, al
jne 0x1400669f0
xor eax, eax
movzx ebx, ax
jmp 0x140066a92
mov r8, r14
mov rdx, rbx
sub r8, rbx
call fcn.1400eb580
jmp 0x140066a2e
mov rcx, r15
sub rcx, rbx
nop dword [rax]
movzx eax, byte [rbx]
mov byte [rcx + rbx], al
lea rbx, [rbx + 1]
test al, al
jne 0x140066a20
xor eax, eax
mov ebx, eax
test r14, r14
je 0x140066a92
lea edx, [rax + 0x3a]
mov rcx, r14
call fcn.1400af328
mov r14, rax
xor eax, eax
test r14, r14
je 0x140066a92
lea rcx, [r14 + 1]
xor edx, edx
lea r8d, [rax + 0xa]
call fcn.1400ed9bc
mov ecx, eax
call fcn.14004ace0
mov edx, reloc.WLDAP32.dll_Ordinal_45
mov rcx, r14
movzx ebx, ax
call fcn.1400af328
test rax, rax
je 0x140066a8f
xor edx, edx
lea rcx, [rax + 1]
lea r8d, [rdx + 0xa]
call fcn.1400ed9bc
mov ecx, eax
call fcn.14004ace0
jmp 0x140066a92
movzx eax, bx
xor ecx, ecx
cmp bx, ax
mov r14d, ecx
mov r12d, ecx
cmovbe r14w, bx
cmovbe r12w, ax
mov dword [rsp + 0x48], r14d
cmp byte [r15], cl
je 0x140066b13
mov rcx, qword [rdi + 0x70]
mov rcx, qword [rcx + 0x20]
call fcn.140071ad0
mov r8d, dword [rdi + 0xb8]
lea rcx, [rbp + 0xe0]
mov edx, eax
mov dword [rsp + 0x28], 0x401
mov rax, qword [rdi + 0x70]
mov r9, r15
mov qword [rsp + 0x20], rcx
mov ecx, dword [rax + 4]
call fcn.140071ab0
test eax, eax
je 0x140066b05
sub eax, 1
je 0x140067058
cmp eax, 1
jne 0x140066b08
lea r13, [rbp + 0xe0]
jmp 0x140066b08
mov r13, r15
test r13, r13
jne 0x140066b9f
jmp 0x140066b18
mov dword [rsp + 0x48], r14d
mov r14, qword [rsp + 0x40]
mov rcx, qword [rdi + 0x238]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x60]
mov dword [rsp + 0x34], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x140066b62
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rdi
call fcn.14005a530
mov r8, rax
lea rdx, str.getsockname___failed:__s
mov rcx, r14
jmp 0x14006704a
movzx eax, word [rsp + 0x60]
lea r8, [rbp + 0xe0]
mov r9d, 0x401
cmp ax, 0x17
je 0x140066b84
movzx ecx, ax
lea rdx, [rsp + 0x64]
jmp 0x140066b8e
lea rdx, [rsp + 0x68]
mov ecx, reloc.WS2_32.dll_socket
call fcn.14005b090
lea r13, [rbp + 0xe0]
mov byte [rsp + 0x30], 0
lea r9, [rsp + 0x50]
xor r8d, r8d
mov rdx, r13
mov rcx, rdi
call fcn.14003fd80
cmp eax, 1
jne 0x140066bc4
lea rdx, [rsp + 0x50]
mov rcx, rdi
call fcn.14003f200
mov rdx, qword [rsp + 0x50]
test rdx, rdx
je 0x14006703b
mov rcx, qword [rsp + 0x40]
mov r14, qword [rdx]
call fcn.14003ff20
test r14, r14
je 0x14006703b
mov rcx, r15
call qword [fcn.1400e1934]
xor ebx, ebx
mov qword [rsp + 0x38], 0xffffffffffffffff
nop dword [rax]
lea r9, [rsp + 0x38]
xor r8d, r8d
mov rdx, r14
mov rcx, rdi
call fcn.140049c00
mov r15d, eax
test eax, eax
je 0x140066c2d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14, qword [r14 + 0x28]
mov ebx, eax
test r14, r14
jne 0x140066c00
jmp 0x140066c32
test r14, r14
jne 0x140066c55
mov edx, ebx
mov rcx, rdi
call fcn.14005a530
mov rcx, qword [rsp + 0x40]
lea rdx, str.socket_failure:__s
mov r8, rax
call fcn.140048860
jmp 0x140067058
movsxd r8, dword [r14 + 0x10]
lea rcx, [rsp + 0x60]
mov rdx, qword [r14 + 0x20]
call fcn.1400ac270
mov r13d, dword [rsp + 0x48]
movzx ebx, r13w
mov eax, dword [r14 + 0x10]
mov dword [rsp + 0x34], eax
cmp r13w, r12w
ja 0x140066d2c
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_htons]
mov r8d, dword [rsp + 0x34]
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x38]
mov word [rsp + 0x62], ax
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x140066db7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [rsp + 0x30], 0
je 0x140066d13
cmp eax, 0x2741
jne 0x140066d13
mov edx, eax
mov rcx, rdi
call fcn.14005a530
movzx r8d, bx
lea rdx, str.bind_port_hu__on_non_local_address_failed:__s_n
mov rbx, qword [rsp + 0x40]
mov r9, rax
mov rcx, rbx
call fcn.140048960
mov rcx, qword [rdi + 0x238]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x60]
mov dword [rsp + 0x34], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x140066d4f
movzx ebx, r13w
mov byte [rsp + 0x30], al
jmp 0x140066d22
cmp eax, 0x2740
je 0x140066d1f
cmp eax, 0xd
jne 0x140066d83
inc bx
cmp bx, r12w
jbe 0x140066c82
mov rcx, qword [rsp + 0x40]
lea rdx, str.bind___failed__we_ran_out_of_ports_
call fcn.140048860
mov rdx, qword [rsp + 0x38]
mov rcx, rdi
call fcn.140049290
jmp 0x140067058
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rdi
call fcn.14005a530
mov rcx, rbx
lea rdx, str.getsockname___failed:__s
mov r8, rax
call fcn.140048860
mov rdx, qword [rsp + 0x38]
mov rcx, rdi
call fcn.140049290
jmp 0x140067058
mov edx, eax
mov rcx, rdi
call fcn.14005a530
mov rcx, qword [rsp + 0x40]
lea rdx, str.bind_port_hu__failed:__s
mov r9, rax
movzx r8d, bx
call fcn.140048860
mov rdx, qword [rsp + 0x38]
mov rcx, rdi
call fcn.140049290
jmp 0x140067058
cmp bx, r12w
ja 0x140066d2c
mov rcx, qword [rsp + 0x38]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x60]
mov dword [rsp + 0x34], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x140066dfc
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rdi
call fcn.14005a530
mov rcx, qword [rsp + 0x40]
jmp 0x140066d62
mov rcx, qword [rsp + 0x38]
mov edx, 1
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x140066e31
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rdi
call fcn.14005a530
mov rcx, qword [rsp + 0x40]
lea rdx, str.socket_failure:__s
jmp 0x140066d69
mov r8d, VarUI2FromI4
lea rdx, [rbp - 0x20]
mov rcx, r14
call fcn.14003fd40
cmp byte [rdi + 0x3b5], 0
jne 0x140066e5c
cmp byte [rdi + 0x3ab], 0
je 0x140066e5c
mov byte [rdi + 0x3b5], 1
cmp esi, 2
je 0x140066eb3
movzx eax, word [rsp + 0x60]
cmp byte [rdi + 0x3b5], 0
jne 0x140066e73
test esi, esi
je 0x140066eac
cmp esi, 1
jne 0x140066e7e
cmp ax, 2
jne 0x140066eac
movzx ecx, ax
cmp ecx, 2
je 0x140066e8b
cmp ecx, 0x17
jne 0x140066eac
movzx ecx, word [rsp + 0x62]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx r8d, ax
test esi, esi
je 0x140066faf
cmp esi, 1
je 0x140066ef0
movzx eax, word [rsp + 0x60]
inc esi
cmp esi, 2
jne 0x140066e66
lea rbx, [rdi + 0x748]
mov rcx, rdi
mov dword [rbx + 0xb0], esi
call fcn.1400642c0
mov rax, qword [rsp + 0x38]
mov edx, Ordinal_32
mov rcx, rdi
mov qword [rdi + 0x240], rax
mov byte [rdi + 0x3ae], 1
call fcn.1400642b0
mov eax, r15d
jmp 0x14006705d
lea r10, [rbp + 0x4f0]
mov r9d, Ordinal_46
lea rdx, [rbp - 0x20]
movzx ecx, byte [rdx]
test cl, cl
je 0x140066f1e
cmp cl, 0x2e
movzx eax, cl
cmove eax, r9d
mov byte [r10], al
inc r10
add rdx, 1
jne 0x140066f01
movzx r9d, r8w
mov edx, reloc.WS2_32.dll_sendto
movzx eax, r9b
lea r8, str.__d__d
shr r9d, 8
mov rcx, r10
mov dword [rsp + 0x20], eax
mov byte [r10], 0
call fcn.140058480
lea rbx, [rdi + 0x748]
mov rcx, rbx
lea r9, [rbp + 0x4f0]
lea r8, str.PORT
lea rdx, [0x140137a58]
call fcn.140076770
mov r15d, eax
test eax, eax
je 0x140066eba
mov ecx, eax
call fcn.14005a670
mov rcx, qword [rsp + 0x40]
lea rdx, str.Failure_sending_PORT_command:__s
mov r8, rax
call fcn.140048860
mov rdx, qword [rsp + 0x38]
mov rcx, rdi
call fcn.140049290
xor edx, edx
mov rcx, rdi
call fcn.1400642b0
mov eax, r15d
jmp 0x14006705d
cmp word [rsp + 0x60], 2
lea rbx, [rdi + 0x748]
movzx eax, r8w
lea rdx, str._s__d_s_hu
mov ecx, 0
mov dword [rsp + 0x28], eax
setne cl
lea rax, [rbp - 0x20]
lea r8, str.EPRT
mov qword [rsp + 0x20], rax
lea r9d, [rcx + 1]
mov rcx, rbx
call fcn.140076770
mov r15d, eax
test eax, eax
je 0x140066eba
mov ecx, eax
call fcn.14005a670
mov rcx, qword [rsp + 0x40]
lea rdx, str.Failure_sending_EPRT_command:__s
mov r8, rax
call fcn.140048860
mov rdx, qword [rsp + 0x38]
mov rcx, rdi
call fcn.140049290
xor edx, edx
mov dword [rbx + 0xb0], 1
mov rcx, rdi
call fcn.1400642b0
mov eax, r15d
jmp 0x14006705d
mov rcx, qword [rsp + 0x40]
lea rdx, str.failed_to_resolve_the_address_provided_to_PORT:__s
mov r8, r13
call fcn.140048860
mov rcx, r15
call qword [fcn.1400e1934]
mov eax, reloc.WLDAP32.dll_Ordinal_30
mov rcx, qword [rbp + 0x8f0]
xor rcx, rsp
call fcn.14007c530
mov rbx, qword [rsp + 0xa50]
add rsp, 0xa00
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret