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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x168]
sub rsp, 0x268
mov rax, qword [0x1800f4320]
xor rax, rsp
mov qword [rbp + 0x150], rax
mov rdi, qword [rcx]
xor r14d, r14d
mov qword [rsp + 0x40], r14
mov r13d, r8d
mov dword [rsp + 0x38], r9d
mov r12, rcx
mov dword [rsp + 0x30], r8d
mov rbx, qword [rdi + 0xc08]
mov eax, dword [rdi + 0x6f4]
movzx r15d, word [rdi + 0x6f0]
mov qword [rsp + 0x48], rdx
mov dword [rsp + 0x34], r14d
mov dword [rsp + 0x3c], eax
test rbx, rbx
jne 0x18004e662
test r15w, r15w
je 0x18004e9f9
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x80
call fcn.180084ad0
test rbx, rbx
je 0x18004e8bd
or rsi, 0xffffffffffffffff
mov rax, rsi
inc rax
cmp byte [rbx + rax], r14b
jne 0x18004e684
cmp rax, 0xff
jae 0x18004e8bd
xor edx, edx
lea rcx, [rbp - 0x30]
mov r8d, 0x100
call fcn.180084ad0
mov rcx, qword [0x1800f4080]
mov r8, rsi
mov r13b, r14b
inc r8
cmp byte [rcx + r8], r14b
jne 0x18004e6b7
mov rdx, rbx
call fcn.180090ca0
mov r14d, 2
test eax, eax
jne 0x18004e823
mov rax, qword [0x1800f4080]
inc rsi
cmp byte [rax + rsi], 0
jne 0x18004e6dd
add rbx, rsi
mov r13b, 1
mov esi, dword [rsp + 0x30]
lea rax, [rbp - 0x30]
mov r8d, dword [r12 + 0xb8]
mov ecx, esi
mov edx, dword [rsp + 0x38]
mov r9, rbx
mov dword [rsp + 0x28], 0x100
mov qword [rsp + 0x20], rax
call fcn.18004320c
mov ecx, eax
test eax, eax
je 0x18004e888
sub ecx, 1
je 0x18004e87e
cmp ecx, 1
je 0x18004e85f
test r13b, r13b
jne 0x18004e8ad
mov esi, dword [r12 + 0x3f8]
cmp dword [rsp + 0x30], r14d
jne 0x18004e757
mov dword [r12 + 0x3f8], 1
lea r9, [rsp + 0x40]
xor r8d, r8d
mov rdx, rbx
mov rcx, r12
call fcn.180044038
cmp eax, 1
jne 0x18004e77c
lea rdx, [rsp + 0x40]
mov rcx, r12
call fcn.1800433a8
mov rcx, qword [rsp + 0x40]
mov dword [r12 + 0x3f8], esi
test rcx, rcx
je 0x18004e8ad
mov rcx, qword [rcx]
lea rdx, [rbp - 0x30]
mov r8d, 0x100
call fcn.180044014
mov rax, qword [rsp + 0x40]
lea rdx, str.Name__s_family__i_resolved_to__s_family__i_n
mov esi, dword [rsp + 0x30]
mov r8, rbx
mov r9d, esi
mov rcx, qword [rax]
mov eax, dword [rcx + 4]
mov rcx, rdi
mov dword [rsp + 0x28], eax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x20], rax
call fcn.18004cf4c
mov rdx, qword [rsp + 0x40]
mov rcx, rdi
call fcn.180044254
cmp esi, r14d
jne 0x18004e8cc
lea r8, [rsp + 0x54]
mov ecx, r14d
lea rdx, [rbp - 0x30]
call fcn.18005b0c0
test eax, eax
jle 0x18004e8cc
movzx ecx, r15w
mov word [rsp + 0x50], r14w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x52], ax
mov ebx, reloc.WS2_32.dll_recv
jmp 0x18004e8d0
mov rcx, qword [str.host_]
mov r8, rsi
inc r8
cmp byte [rcx + r8], 0
jne 0x18004e82d
mov rdx, rbx
call fcn.180090ca0
test eax, eax
jne 0x18004e6ec
mov rax, qword [str.host_]
inc rsi
cmp byte [rax + rsi], 0
jne 0x18004e84e
add rbx, rsi
jmp 0x18004e73c
lea r9, [rbp - 0x30]
mov dword [rsp + 0x20], esi
mov r8, rbx
lea rdx, str.Local_Interface__s_is_ip__s_using_address_family__i_n
mov rcx, rdi
call fcn.18004cf4c
jmp 0x18004e7e2
mov eax, 1
jmp 0x18004e9fb
test r13b, r13b
je 0x18004e73c
lea rdx, str.Couldnt_bind_to_interface__s
mov r8, rbx
mov rcx, rdi
call fcn.18004ce58
mov eax, 0x2d
jmp 0x18004e9fb
and dword [rdi + 0x146c], 0xfffffff7
lea rdx, str.Couldnt_bind_to__s
jmp 0x18004e898
mov r14d, 2
cmp r13d, r14d
je 0x18004e804
mov ebx, dword [rsp + 0x34]
mov rsi, qword [rsp + 0x48]
lea rdx, [rsp + 0x50]
mov rcx, rsi
mov r8d, ebx
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x18004e946
mov r13d, 1
mov eax, dword [rsp + 0x3c]
sub eax, r13d
mov dword [rsp + 0x3c], eax
test eax, eax
jle 0x18004e9b1
movzx r8d, r15w
lea rdx, str.Bind_to_local_port__hu_failed__trying_next_n
mov rcx, rdi
call fcn.18004cf4c
add r15w, r13w
cmp word [rsp + 0x50], r14w
jne 0x18004e931
movzx ecx, r15w
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rsp + 0x52], ax
mov r8d, ebx
lea rdx, [rsp + 0x50]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x18004e8f0
mov r14d, 0x80
lea rcx, [rbp + 0xd0]
mov r8d, r14d
mov dword [rsp + 0x38], r14d
xor edx, edx
call fcn.180084ad0
lea r8, [rsp + 0x38]
mov rcx, rsi
lea rdx, [rbp + 0xd0]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x18004e9dc
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, r14d
lea rdx, [rbp - 0x30]
mov ecx, eax
mov dword [rdi + 0x10e8], eax
mov ebx, eax
call fcn.18003b70c
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r8d, ebx
mov r9, rax
mov rcx, rdi
call fcn.18004ce58
jmp 0x18004e8a3
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x80
lea rdx, [rbp + 0xd0]
mov ecx, eax
mov dword [rdi + 0x10e8], eax
mov ebx, eax
call fcn.18003b70c
lea rdx, str.bind_failed_with_errno__d:__s
jmp 0x18004e99e
movzx r8d, r15w
lea rdx, str.Local_port:__hu_n
mov rcx, rdi
call fcn.18004cf4c
bts dword [r12 + 0x3c4], 0x18
xor eax, eax
mov rcx, qword [rbp + 0x150]
xor rcx, rsp
call fcn.180081d90
add rsp, 0x268
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret