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

Disassembly:
push rbx
push rbp
push rsi
push r12
push r13
push r14
push r15
sub rsp, 0x1f0
mov rax, qword [0x1401f3660]
xor rax, rsp
mov qword [rsp + 0x1d0], rax
mov rsi, qword [rcx]
xor r14d, r14d
mov dword [rsp + 0x30], r9d
mov qword [rsp + 0x38], r14
mov r12, qword [rsi + 0x540]
movzx ebx, word [rsi + 0x228]
test r12, r12
mov ebp, dword [rsi + 0x22c]
mov r13d, r8d
mov qword [rsp + 0x48], rdx
mov r15, rcx
jne 0x140078565
test bx, bx
jne 0x140078565
xor eax, eax
jmp 0x1400789e4
lea rcx, [rsp + 0x50]
xor edx, edx
mov r8d, 0x80
mov qword [rsp + 0x1e8], rdi
call fcn.140041940
test r12, r12
je 0x140078866
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r12
repne scasb al, byte [rdi]
not rcx
sub rcx, 1
cmp rcx, 0xff
jae 0x140078866
lea rcx, [rsp + 0xd1]
xor edx, edx
mov r8d, 0xff
mov byte [rsp + 0xd0], al
call fcn.140041940
mov r9, qword [0x1401f4d08]
or rcx, 0xffffffffffffffff
mov rdi, r9
xor eax, eax
repne scasb al, byte [rdi]
mov rdx, r12
not rcx
lea r8, [rcx - 1]
mov rcx, r9
call fcn.1400487a0
test eax, eax
jne 0x140078609
mov rdi, qword [0x1401f4d08]
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasb al, byte [rdi]
lea edi, [rax + 1]
not rcx
sub rcx, 1
add r12, rcx
jmp 0x14007866e
mov r9, qword [str.host_]
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r9
mov rdx, r12
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rcx, r9
call fcn.1400487a0
test eax, eax
jne 0x14007866b
mov rdi, qword [str.host_]
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasb al, byte [rdi]
not rcx
sub rcx, 1
add r12, rcx
cmp r13d, 2
mov edi, dword [r15 + 0x3c8]
jne 0x14007871f
mov dword [r15 + 0x3c8], 1
jmp 0x140078730
mov edi, r14d
mov r8d, dword [r15 + 0xa0]
mov edx, dword [rsp + 0x30]
lea rax, [rsp + 0xd0]
mov r9, r12
mov ecx, r13d
mov dword [rsp + 0x28], 0x100
mov qword [rsp + 0x20], rax
call fcn.1400e71c0
test eax, eax
mov edx, eax
je 0x1400786fb
sub edx, 1
je 0x1400786f1
cmp edx, 1
jne 0x1400786cd
lea r9, [rsp + 0xd0]
lea rdx, str.Local_Interface__s_is_ip__s_using_address_family__i_n
mov r8, r12
mov rcx, rsi
mov dword [rsp + 0x20], r13d
call fcn.140075570
jmp 0x1400787be
test edi, edi
je 0x14007864a
lea rdx, str.Couldnt_bind_to__s
mov r8, r12
mov rcx, rsi
call fcn.140075620
mov eax, Ordinal_46
jmp 0x1400789dc
mov eax, 1
jmp 0x1400789dc
test edi, edi
je 0x14007864a
lea rdx, str.Couldnt_bind_to_interface__s
mov r8, r12
mov rcx, rsi
call fcn.140075620
mov eax, Ordinal_46
jmp 0x1400789dc
cmp r13d, 0x17
jne 0x140078730
mov dword [r15 + 0x3c8], 2
lea r9, [rsp + 0x38]
xor r8d, r8d
mov rdx, r12
mov rcx, r15
call fcn.14006a3f0
cmp eax, 1
jne 0x140078755
lea rdx, [rsp + 0x38]
mov rcx, r15
call fcn.1400685c0
mov rcx, qword [rsp + 0x38]
mov dword [r15 + 0x3c8], edi
test rcx, rcx
je 0x1400786d5
mov rcx, qword [rcx]
lea rdx, [rsp + 0xd0]
mov r8d, 0x100
call fcn.14006a030
mov rdx, qword [rsp + 0x38]
mov r9d, r13d
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, [rsp + 0xd0]
mov dword [rsp + 0x28], ecx
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.140075570
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.14006a9c0
cmp r13d, 0x17
jne 0x14007882d
lea edx, [r13 + 0xe]
lea rcx, [rsp + 0xd0]
call fcn.140048760
test rax, rax
mov rdi, rax
je 0x1400787e4
mov byte [rax], r14b
add rdi, 1
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0xd0]
mov ecx, reloc.WS2_32.dll_socket
call fcn.14007d0a0
test eax, eax
jle 0x140078825
movzx ecx, bx
mov word [rsp + 0x50], reloc.WS2_32.dll_socket
call qword [sym.imp.WS2_32.dll_htons]
test rdi, rdi
mov word [rsp + 0x52], ax
je 0x140078825
mov rcx, rdi
call fcn.140047e30
mov dword [rsp + 0x68], eax
mov r14d, Ordinal_30
jmp 0x1400788a6
cmp r13d, 2
jne 0x1400788a6
lea r8, [rsp + 0x54]
lea rdx, [rsp + 0xd0]
mov ecx, r13d
call fcn.14007d0a0
test eax, eax
jle 0x1400788a6
movzx ecx, bx
mov word [rsp + 0x50], r13w
call qword [sym.imp.WS2_32.dll_htons]
lea r14d, [r13 + 0xe]
mov word [rsp + 0x52], ax
jmp 0x1400788a6
cmp r13d, 0x17
jne 0x140078886
movzx ecx, bx
mov word [rsp + 0x50], r13w
call qword [sym.imp.WS2_32.dll_htons]
lea r14d, [r13 + 5]
mov word [rsp + 0x52], ax
jmp 0x1400788a6
cmp r13d, 2
jne 0x1400788a6
movzx ecx, bx
mov word [rsp + 0x50], r13w
call qword [sym.imp.WS2_32.dll_htons]
mov r14d, reloc.WS2_32.dll_recv
mov word [rsp + 0x52], ax
mov rdi, qword [rsp + 0x48]
lea rdx, [rsp + 0x50]
mov r8d, r14d
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x14007891d
sub ebp, 1
test ebp, ebp
jle 0x140078988
lea rdx, str.Bind_to_local_port__hu_failed__trying_next_n
movzx r8d, bx
mov rcx, rsi
call fcn.140075570
add bx, 1
cmp word [rsp + 0x50], 2
jne 0x1400788fa
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rsp + 0x52], ax
jmp 0x140078908
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rsp + 0x52], ax
lea rdx, [rsp + 0x50]
mov r8d, r14d
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x1400788c0
lea rcx, [rsp + 0xd0]
xor edx, edx
mov r8d, 0x80
mov dword [rsp + 0x30], 0x80
call fcn.140041940
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0xd0]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x1400789bc
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, r15
mov edx, eax
mov edi, eax
mov dword [rsi + 0x88dc], eax
call fcn.140066c40
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r8d, edi
mov r9, rax
mov rcx, rsi
call fcn.140075620
mov eax, Ordinal_46
jmp 0x1400789dc
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, r15
mov edx, eax
mov edi, eax
mov dword [rsi + 0x88dc], eax
call fcn.140066c40
lea rdx, str.bind_failed_with_errno__d:__s
mov r8d, edi
mov r9, rax
mov rcx, rsi
call fcn.140075620
mov eax, Ordinal_46
jmp 0x1400789dc
lea rdx, str.Local_port:__hu_n
movzx r8d, bx
mov rcx, rsi
call fcn.140075570
mov dword [r15 + 0x38c], 1
xor eax, eax
mov rdi, qword [rsp + 0x1e8]
mov rcx, qword [rsp + 0x1d0]
xor rcx, rsp
call fcn.140041910
add rsp, 0x1f0
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret