Function at 0x1401667e0
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 0x140165bf5
mov edx, reloc.WS2_32.dll_listen
mov rcx, rbx
call fcn.1401642f0
mov r8d, edx
mov dl, 1
add rsp, 0x20
pop rbx
jmp fcn.140165d10
cmp byte [rcx + 0x73f], 0
je 0x140165c0d
xor edx, edx
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp 0x1401667e0
cmp byte [rcx + 0x756], 0
je 0x140165cb0
mov r8, qword [rbx + 0x6d8]
test r8, r8
jne 0x140165c68
mov r8, qword [rcx + 0x7b0]
test r8, r8
jne 0x140165c4b
cmp byte [rcx + 0x73e], 0
lea rax, str.NLST
lea r8, str.LIST
cmovne r8, rax
lea rcx, [rbx + 0x650]
lea rdx, str.PRET__s
call fcn.140174070
test eax, eax
je 0x140165c9e
add rsp, 0x20
pop rbx
ret
cmp byte [rcx + 0x74a], 0
lea rcx, [rbx + 0x650]
je 0x140165c8e
lea rdx, str.PRET_STOR__s
call fcn.140174070
test eax, eax
je 0x140165c9e
add rsp, 0x20
pop rbx
ret
lea rdx, str.PRET_RETR__s
call fcn.140174070
test eax, eax
jne 0x140165cbd
mov edx, Ordinal_32
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp fcn.1401642f0
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp fcn.140166750
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 - 0x8f0]
sub rsp, 0x9f0
mov rax, qword [0x140396c80]
xor rax, rsp
mov qword [rbp + 0x8e0], rax
mov rbx, qword [rcx]
mov esi, edx
mov rdi, rcx
mov qword [rsp + 0x40], rbx
mov r14, 0xffffffffffffffff
lea rcx, [rbp - 0x30]
xor edx, edx
mov qword [rsp + 0x38], r14
mov r8d, 0x100
call sub.VCRUNTIME140.dll_memset
mov rcx, qword [rsp + 0x40]
xor eax, eax
mov rbx, qword [rbx + 0x7e0]
mov r12d, eax
mov qword [rsp + 0x48], rax
movzx r13d, ax
mov word [rsp + 0x32], ax
mov r15d, eax
mov rcx, qword [rcx + 0x7e0]
mov byte [rsp + 0x30], 1
test rcx, rcx
je 0x140166a11
mov rax, r14
inc rax
cmp byte [rcx + rax], r12b
jne 0x140166874
cmp rax, 1
jbe 0x140166a11
mov rax, r14
nop word [rax + rax]
inc rax
cmp byte [rbx + rax], r12b
jne 0x140166890
cmp rax, 0x16
jae 0x1401668a7
mov r14d, reloc.WS2_32.dll_shutdown
jmp 0x1401668b0
inc r14
cmp byte [rbx + r14], r12b
jne 0x1401668a7
lea rcx, [r14 + 1]
mov edx, 1
call qword [case.0x14013e619.1]
mov r15, rax
test rax, rax
jne 0x1401668d0
lea eax, [r15 + 0x1b]
jmp 0x140166f21
cmp byte [rbx], 0x3a
jne 0x1401668e3
mov r14, rbx
test rbx, rbx
je 0x140166980
jmp 0x14016690a
mov edx, Ordinal_60
mov rcx, rbx
call sub.VCRUNTIME140.dll_strchr
mov r14, rax
mov rcx, r15
test rax, rax
je 0x14016696f
mov r8, rax
mov rdx, rbx
sub r8, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov edx, Ordinal_60
mov rcx, r14
call sub.VCRUNTIME140.dll_strchr
mov rbx, rax
test rax, rax
je 0x140166980
xor edx, edx
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.14014c250
mov edx, Ordinal_46
mov rcx, rbx
movzx r14d, ax
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x140166969
xor edx, edx
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.14014c250
movzx r13d, ax
jmp 0x140166984
movzx r13d, r14w
jmp 0x140166984
sub rcx, rbx
movzx eax, byte [rbx]
mov byte [rcx + rbx], al
lea rbx, [rbx + 1]
test al, al
jne 0x140166972
movzx r14d, r12w
xor ecx, ecx
cmp r14w, r13w
mov ebx, ecx
mov eax, ecx
cmovbe ax, r14w
cmovbe bx, r13w
mov word [rsp + 0x32], ax
cmp byte [r15], cl
je 0x140166a08
mov rcx, qword [rdi + 0x70]
mov rcx, qword [rcx + 0x20]
call fcn.140005d20
mov r8d, dword [rdi + 0xb8]
lea rcx, [rbp + 0xd0]
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.140005d20
test eax, eax
je 0x1401669f6
sub eax, 1
je 0x140166f1c
cmp eax, 1
jne 0x1401669f9
lea r12, [rbp + 0xd0]
jmp 0x1401669f9
mov r12, r15
movzx r13d, bx
test r12, r12
jne 0x140166a80
jmp 0x140166a11
mov word [rsp + 0x32], ax
movzx r13d, bx
mov rcx, qword [rdi + 0x238]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x34], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x140166a58
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rdi
call fcn.140136f70
mov rcx, qword [rsp + 0x40]
lea rdx, str.getsockname___failed:__s
mov r8, rax
jmp 0x140166f0e
movzx ecx, word [rsp + 0x50]
lea r8, [rbp + 0xd0]
mov r9d, 0x401
lea rdx, [rsp + 0x54]
call fcn.140158ee0
lea r12, [rbp + 0xd0]
mov byte [rsp + 0x30], 0
lea r9, [rsp + 0x48]
xor r8d, r8d
mov rdx, r12
mov rcx, rdi
call fcn.14013f760
cmp eax, 1
jne 0x140166aa5
lea rdx, [rsp + 0x48]
mov rcx, rdi
call fcn.14013eaf0
mov rdx, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x40]
test rdx, rdx
je 0x140166f01
mov r14, qword [rdx]
mov rcx, rbx
call fcn.14013f940
test r14, r14
je 0x140166f01
mov rcx, r15
call qword [fcn.1400bf6a4]
nop word [rax + rax]
lea r9, [rsp + 0x38]
xor r8d, r8d
mov rdx, r14
mov rcx, rdi
call fcn.14014b310
mov r15d, eax
test eax, eax
je 0x140166b2a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14, qword [r14 + 0x28]
test r14, r14
jne 0x140166ae0
mov edx, eax
mov rcx, rdi
call fcn.140136f70
mov r8, rax
lea rdx, str.socket_failure:__s
mov rcx, rbx
call fcn.140149ce0
jmp 0x140166f1c
movsxd r8, dword [r14 + 0x10]
lea rcx, [rsp + 0x50]
mov rdx, qword [r14 + 0x20]
call sub.VCRUNTIME140.dll_memcpy
movzx r12d, word [rsp + 0x32]
mov eax, dword [r14 + 0x10]
movzx ebx, r12w
mov dword [rsp + 0x34], eax
cmp r12w, r13w
ja 0x140166c0a
cmp word [rsp + 0x50], 2
jne 0x140166b6e
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x52], ax
mov r8d, dword [rsp + 0x34]
lea rdx, [rsp + 0x50]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x140166c95
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [rsp + 0x30], 0
je 0x140166bf1
cmp eax, 0x2741
jne 0x140166bf1
mov edx, eax
mov rcx, rdi
call fcn.140136f70
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.140149df0
mov rcx, qword [rdi + 0x238]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x34], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x140166c2d
movzx ebx, r12w
mov byte [rsp + 0x30], al
jmp 0x140166c00
cmp eax, 0x2740
je 0x140166bfd
cmp eax, 0xd
jne 0x140166c61
inc bx
cmp bx, r13w
jbe 0x140166b58
mov rcx, qword [rsp + 0x40]
lea rdx, str.bind___failed__we_ran_out_of_ports_
call fcn.140149ce0
mov rdx, qword [rsp + 0x38]
mov rcx, rdi
call fcn.14014a900
jmp 0x140166f1c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rdi
call fcn.140136f70
mov rcx, rbx
lea rdx, str.getsockname___failed:__s
mov r8, rax
call fcn.140149ce0
mov rdx, qword [rsp + 0x38]
mov rcx, rdi
call fcn.14014a900
jmp 0x140166f1c
mov edx, eax
mov rcx, rdi
call fcn.140136f70
mov rcx, qword [rsp + 0x40]
lea rdx, str.bind_port_hu__failed:__s
mov r9, rax
movzx r8d, bx
call fcn.140149ce0
mov rdx, qword [rsp + 0x38]
mov rcx, rdi
call fcn.14014a900
jmp 0x140166f1c
cmp bx, r13w
ja 0x140166c0a
mov rcx, qword [rsp + 0x38]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x34], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x140166cda
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rdi
call fcn.140136f70
mov rcx, qword [rsp + 0x40]
jmp 0x140166c40
mov rcx, qword [rsp + 0x38]
mov edx, 1
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x140166d0f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rdi
call fcn.140136f70
mov rcx, qword [rsp + 0x40]
lea rdx, str.socket_failure:__s
jmp 0x140166c47
mov r8d, 0x100
lea rdx, [rbp - 0x30]
mov rcx, r14
call fcn.14013f730
cmp esi, 2
je 0x140166e3d
movzx eax, word [rsp + 0x50]
nop
cmp byte [rdi + 0x3bd], 0
jne 0x140166d41
test esi, esi
je 0x140166e32
cmp esi, 1
jne 0x140166e18
cmp ax, 2
jne 0x140166e32
movzx ecx, word [rsp + 0x52]
lea rbx, [rbp + 0x4e0]
lea r14, [rbp - 0x30]
call qword [sym.imp.WS2_32.dll_ntohs]
lea r8d, [rsi + 0x2b]
nop
movzx edx, byte [r14]
test dl, dl
je 0x140166d8c
cmp dl, 0x2e
mov ecx, edx
cmove ecx, r8d
mov byte [rbx], cl
inc rbx
add r14, 1
jne 0x140166d70
movzx r9d, ax
lea r8, str.__d__d
movzx eax, r9b
mov edx, reloc.WS2_32.dll_sendto
shr r9d, 8
mov rcx, rbx
mov dword [rsp + 0x20], eax
mov byte [rbx], 0
call fcn.14014c830
lea rbx, [rdi + 0x650]
mov rcx, rbx
lea r9, [rbp + 0x4e0]
lea r8, str.PORT
lea rdx, [0x1402d90e8]
call fcn.140174070
mov r15d, eax
test eax, eax
je 0x140166e44
mov ecx, eax
call fcn.1401370b0
mov rcx, qword [rsp + 0x40]
lea rdx, str.Failure_sending_PORT_command:__s
mov r8, rax
call fcn.140149ce0
mov rdx, qword [rsp + 0x38]
mov rcx, rdi
call fcn.14014a900
xor edx, edx
mov rcx, rdi
call fcn.1401642f0
mov eax, r15d
jmp 0x140166f21
cmp ax, 2
jne 0x140166e32
movzx ecx, word [rsp + 0x52]
call qword [sym.imp.WS2_32.dll_ntohs]
test esi, esi
je 0x140166e7a
movzx eax, word [rsp + 0x50]
inc esi
cmp esi, 2
jne 0x140166d30
lea rbx, [rdi + 0x650]
mov rcx, rdi
mov dword [rbx + 0xb0], esi
call fcn.140164300
mov rax, qword [rsp + 0x38]
mov edx, Ordinal_32
mov rcx, rdi
mov qword [rdi + 0x240], rax
mov byte [rdi + 0x3b6], 1
call fcn.1401642f0
mov eax, r15d
jmp 0x140166f21
cmp word [rsp + 0x50], 2
lea rbx, [rdi + 0x650]
mov ecx, 0
movzx eax, ax
setne cl
mov dword [rsp + 0x28], eax
lea rax, [rbp - 0x30]
lea r8, str.EPRT
mov qword [rsp + 0x20], rax
lea rdx, str._s__d_s_hu
lea r9d, [rcx + 1]
mov rcx, rbx
call fcn.140174070
mov r15d, eax
test eax, eax
je 0x140166e44
mov ecx, eax
call fcn.1401370b0
mov rcx, qword [rsp + 0x40]
lea rdx, str.Failure_sending_EPRT_command:__s
mov r8, rax
call fcn.140149ce0
mov rdx, qword [rsp + 0x38]
mov rcx, rdi
call fcn.14014a900
xor edx, edx
mov dword [rbx + 0xb0], 1
mov rcx, rdi
call fcn.1401642f0
mov eax, r15d
jmp 0x140166f21
mov r8, r12
lea rdx, str.failed_to_resolve_the_address_provided_to_PORT:__s
mov rcx, rbx
call fcn.140149ce0
mov rcx, r15
call qword [fcn.1400bf6a4]
mov eax, reloc.WLDAP32.dll_Ordinal_30
mov rcx, qword [rbp + 0x8e0]
xor rcx, rsp
call fcn.1400be7c0
mov rbx, qword [rsp + 0xa40]
add rsp, 0x9f0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret