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

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1c0]
sub rsp, 0x2c0
mov rsi, qword [rcx]
xor r14d, r14d
mov r15d, r8d
mov qword [rsp + 0x38], r14
mov r12, qword [rsi + 0xc90]
movzx ebx, word [rsi + 0x6e8]
mov r13d, dword [rsi + 0x6ec]
test r12, r12
jne 0x14001769d
test bx, bx
jne 0x14001769d
xor eax, eax
jmp 0x140017b3a
lea rcx, [rsp + 0x40]
xor edx, edx
mov r8d, 0x80
mov qword [rsp + 0x310], rdi
call fcn.140175ab0
test r12, r12
je 0x1400179bf
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r12
repne scasb al, byte [rdi]
not rcx
dec rcx
cmp rcx, 0xff
jae 0x1400179bf
lea rcx, [rbp - 0x3f]
xor edx, edx
mov r8d, 0xff
mov byte [rbp - 0x40], al
call fcn.140175ab0
mov r9, qword [0x140212040]
or rcx, 0xffffffffffffffff
mov rdi, r9
xor eax, eax
repne scasb al, byte [rdi]
mov rdx, r12
mov dword [rsp + 0x30], r14d
not rcx
lea r8, [rcx - 1]
mov rcx, r9
call fcn.140186ef0
or rcx, 0xffffffffffffffff
test eax, eax
jne 0x140017818
mov rdi, qword [0x140212040]
xor eax, eax
mov dword [rsp + 0x30], 1
repne scasb al, byte [rdi]
not rcx
dec rcx
add r12, rcx
mov rdi, qword [rbp + 0x200]
mov edx, dword [rbp + 0x218]
lea rax, [rbp - 0x40]
mov r8d, dword [rdi + 0x328]
mov r9, r12
mov ecx, r15d
mov dword [rsp + 0x28], 0x100
mov qword [rsp + 0x20], rax
call fcn.140005190
mov edx, eax
test eax, eax
je 0x1400178a5
dec edx
je 0x14001797d
dec edx
jne 0x14001787b
lea r9, [rbp - 0x40]
lea rdx, str.Local_Interface__s_is_ip__s_using_address_family__i_n
mov r8, r12
mov rcx, rsi
mov dword [rsp + 0x20], r15d
call fcn.14000fe70
cmp r15d, 0x17
jne 0x140017987
lea edx, [r15 + 0xe]
lea rcx, [rbp - 0x40]
call fcn.1401755f0
mov rdi, rax
test rax, rax
je 0x1400177cd
mov byte [rax], r14b
inc rdi
mov r12d, reloc.WSOCK32.dll_socket
lea r8, [rsp + 0x48]
lea rdx, [rbp - 0x40]
mov ecx, r12d
call fcn.140042880
test eax, eax
jle 0x14001780d
movzx ecx, bx
mov word [rsp + 0x40], r12w
call qword [sym.imp.WSOCK32.dll_htons]
mov word [rsp + 0x42], ax
test rdi, rdi
je 0x14001780d
mov rcx, rdi
call fcn.14017a5c0
mov dword [rsp + 0x58], eax
mov r14d, Ordinal_30
jmp 0x1400179ff
mov r9, qword [str.host_]
xor eax, eax
mov rdx, r12
mov rdi, r9
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rcx, r9
call fcn.140186ef0
test eax, eax
jne 0x140017743
mov rdi, qword [str.host_]
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasb al, byte [rdi]
mov rdi, qword [rbp + 0x200]
not rcx
dec rcx
add r12, rcx
mov eax, dword [rdi + 0x758]
mov dword [rsp + 0x30], eax
cmp r15d, 2
jne 0x1400178c8
mov dword [rdi + 0x758], 1
jmp 0x1400178da
cmp dword [rsp + 0x30], r14d
je 0x14001785f
lea rdx, str.Couldnt_bind_to__s
mov r8, r12
mov rcx, rsi
mov dword [rsi + 0x181c], r14d
call fcn.14000ffd0
mov eax, reloc.WLDAP32.dll_Ordinal_45
jmp 0x140017b32
cmp dword [rsp + 0x30], r14d
je 0x14001785f
lea rdx, str.Couldnt_bind_to_interface__s
mov r8, r12
mov rcx, rsi
call fcn.14000ffd0
mov eax, reloc.WLDAP32.dll_Ordinal_45
jmp 0x140017b32
cmp r15d, 0x17
mov ecx, 2
cmove eax, ecx
mov dword [rdi + 0x758], eax
lea rax, [rsp + 0x38]
xor r9d, r9d
xor r8d, r8d
mov rdx, r12
mov rcx, rdi
mov qword [rsp + 0x20], rax
call fcn.14003c460
cmp eax, 1
jne 0x140017907
lea rdx, [rsp + 0x38]
mov rcx, rdi
call fcn.1400057e0
mov rcx, qword [rsp + 0x38]
mov eax, dword [rsp + 0x30]
mov dword [rdi + 0x758], eax
test rcx, rcx
je 0x140017882
mov rcx, qword [rcx]
lea rdx, [rbp - 0x40]
mov r8d, 0x100
call fcn.14003b7b0
mov rdx, qword [rsp + 0x38]
mov r9d, r15d
mov rax, qword [rdx]
lea rdx, str.Name__s_family__i_resolved_to__s_family__i_n
mov r8, r12
mov ecx, dword [rax + 4]
lea rax, [rbp - 0x40]
mov dword [rsp + 0x28], ecx
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.14000fe70
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.14003c730
mov rdx, qword [rsp + 0x38]
mov rax, qword [rdx]
cmp r15d, dword [rax + 4]
je 0x1400177a8
mov eax, 1
jmp 0x140017b32
cmp r15d, 2
jne 0x140017a06
lea r8, [rsp + 0x44]
lea rdx, [rbp - 0x40]
mov ecx, r15d
mov r12d, r15d
call fcn.140042880
test eax, eax
jle 0x140017a06
movzx ecx, bx
mov word [rsp + 0x40], r12w
call qword [sym.imp.WSOCK32.dll_htons]
lea r14d, [r15 + 0xe]
mov word [rsp + 0x42], ax
jmp 0x140017a06
cmp r15d, 0x17
jne 0x1400179dd
mov r12d, r15d
movzx ecx, bx
mov word [rsp + 0x40], r12w
call qword [sym.imp.WSOCK32.dll_htons]
lea r14d, [r15 + 5]
jmp 0x1400179fa
cmp r15d, 2
jne 0x1400179ff
mov eax, r15d
movzx ecx, bx
mov word [rsp + 0x40], ax
call qword [sym.imp.WSOCK32.dll_htons]
mov r14d, reloc.WSOCK32.dll_recv
mov word [rsp + 0x42], ax
mov rdi, qword [rbp + 0x200]
mov r12, qword [rbp + 0x208]
lea rdx, [rsp + 0x40]
mov r8d, r14d
mov rcx, r12
call qword [sym.imp.WSOCK32.dll_bind]
test eax, eax
jns 0x140017a67
dec r13d
test r13d, r13d
jle 0x140017ad8
lea rdx, str.Bind_to_local_port__hu_failed__trying_next_n
movzx r8d, bx
mov rcx, rsi
call fcn.14000fe70
inc bx
movzx ecx, bx
call qword [sym.imp.WSOCK32.dll_ntohs]
lea rdx, [rsp + 0x40]
mov r8d, r14d
mov rcx, r12
mov word [rsp + 0x42], ax
call qword [sym.imp.WSOCK32.dll_bind]
test eax, eax
js 0x140017a22
lea rcx, [rbp - 0x40]
xor edx, edx
mov r8d, 0x80
mov dword [rbp + 0x200], 0x80
call fcn.140175ab0
lea r8, [rbp + 0x200]
lea rdx, [rbp - 0x40]
mov rcx, r12
call qword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
jns 0x140017b13
call qword [sym.imp.WSOCK32.dll_WSAGetLastError]
lea rdx, [rbp + 0xc0]
mov r8d, 0x100
mov ecx, eax
mov edi, eax
mov dword [rsi + 0x1378], eax
call fcn.140004870
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r8d, edi
mov r9, rax
mov rcx, rsi
call fcn.14000ffd0
mov eax, reloc.WLDAP32.dll_Ordinal_45
jmp 0x140017b32
call qword [sym.imp.WSOCK32.dll_WSAGetLastError]
lea rdx, [rbp - 0x40]
mov r8d, 0x100
mov ecx, eax
mov edi, eax
mov dword [rsi + 0x1378], eax
call fcn.140004870
lea rdx, str.bind_failed_with_errno__d:__s
mov r8d, edi
mov r9, rax
mov rcx, rsi
call fcn.14000ffd0
mov eax, reloc.WLDAP32.dll_Ordinal_45
jmp 0x140017b32
lea rdx, str.Local_port:__hu_n
movzx r8d, bx
mov rcx, rsi
call fcn.14000fe70
mov dword [rdi + 0x6f0], 1
xor eax, eax
mov rdi, qword [rsp + 0x310]
add rsp, 0x2c0
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rbx
pop rbp
ret