Function at 0x180036180
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 [0x1800ac2b8]
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 + 0x530]
movzx ebx, word [rsi + 0x228]
mov ebp, dword [rsi + 0x22c]
mov r15d, r8d
mov qword [rsp + 0x48], rdx
mov r13, rcx
test r12, r12
jne 0x1800361e5
test bx, bx
jne 0x1800361e5
xor eax, eax
jmp 0x1800365c2
lea rcx, [rsp + 0x50]
xor edx, edx
mov r8d, 0x80
mov qword [rsp + 0x1e8], rdi
call fcn.18005f790
test r12, r12
je 0x18003646e
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r12
repne scasb al, byte [rdi]
not rcx
dec rcx
cmp rcx, 0xff
jae 0x18003646e
lea rcx, [rsp + 0xd1]
xor edx, edx
mov r8d, 0xff
mov byte [rsp + 0xd0], al
call fcn.18005f790
mov r9, qword [case.0x180034a3c.2]
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.180064c10
test eax, eax
jne 0x18003628a
mov rdi, qword [case.0x180034a3c.2]
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasb al, byte [rdi]
lea edi, [rax + 1]
not rcx
dec rcx
add r12, rcx
jmp 0x1800363bd
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.180064c10
test eax, eax
jne 0x1800363ba
mov rdi, qword [str.host_]
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasb al, byte [rdi]
not rcx
dec rcx
add r12, rcx
mov edi, dword [r13 + 0x300]
cmp r15d, 2
jne 0x1800362e6
mov dword [r13 + 0x300], 1
lea r9, [rsp + 0x38]
xor r8d, r8d
mov rdx, r12
mov rcx, r13
call fcn.18002a600
cmp eax, 1
jne 0x18003630b
lea rdx, [rsp + 0x38]
mov rcx, r13
call fcn.180029f20
mov rcx, qword [rsp + 0x38]
mov dword [r13 + 0x300], edi
test rcx, rcx
je 0x180036424
mov rcx, qword [rcx]
lea rdx, [rsp + 0xd0]
mov r8d, pe_nt_image_headers64
call fcn.18002a250
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, [rsp + 0xd0]
mov dword [rsp + 0x28], ecx
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.180033a50
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.18002ab70
cmp r15d, 2
jne 0x180036490
lea r8, [rsp + 0x54]
lea rdx, [rsp + 0xd0]
mov ecx, r15d
mov edi, r15d
call fcn.180039b20
test eax, eax
jle 0x180036490
movzx ecx, bx
mov word [rsp + 0x50], di
call qword [sym.imp.WS2_32.dll_htons]
lea r14d, [r15 + 0xe]
mov word [rsp + 0x52], ax
jmp 0x180036490
mov edi, r14d
mov r8d, dword [r13 + 0xa0]
mov edx, dword [rsp + 0x30]
lea rax, [rsp + 0xd0]
mov r9, r12
mov ecx, r15d
mov dword [rsp + 0x28], pe_nt_image_headers64
mov qword [rsp + 0x20], rax
call fcn.180016b80
mov edx, eax
test eax, eax
je 0x18003644a
sub edx, 1
je 0x180036440
cmp edx, 1
jne 0x18003641c
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], r15d
call fcn.180033a50
jmp 0x180036374
test edi, edi
je 0x1800362ce
lea rdx, str.Couldnt_bind_to__s
mov r8, r12
mov rcx, rsi
call fcn.180033b00
mov eax, Ordinal_46
jmp 0x1800365ba
mov eax, 1
jmp 0x1800365ba
test edi, edi
je 0x1800362ce
lea rdx, str.Couldnt_bind_to_interface__s
mov r8, r12
mov rcx, rsi
call fcn.180033b00
mov eax, Ordinal_46
jmp 0x1800365ba
cmp r15d, 2
jne 0x180036490
mov edi, r15d
movzx ecx, bx
mov word [rsp + 0x50], di
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 0x1800364fb
nop word [rax + rax]
dec ebp
test ebp, ebp
jle 0x180036566
lea rdx, str.Bind_to_local_port__hu_failed__trying_next_n
movzx r8d, bx
mov rcx, rsi
call fcn.180033a50
inc bx
cmp word [rsp + 0x50], 2
jne 0x1800364e6
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 0x1800364b0
lea rcx, [rsp + 0xd0]
xor edx, edx
mov r8d, 0x80
mov dword [rsp + 0x30], 0x80
call fcn.18005f790
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0xd0]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x18003659a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, r13
mov edx, eax
mov edi, eax
mov dword [rsi + 0x889c], eax
call fcn.180039920
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r8d, edi
mov r9, rax
mov rcx, rsi
call fcn.180033b00
mov eax, Ordinal_46
jmp 0x1800365ba
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, r13
mov edx, eax
mov edi, eax
mov dword [rsi + 0x889c], eax
call fcn.180039920
lea rdx, str.bind_failed_with_errno__d:__s
mov r8d, edi
mov r9, rax
mov rcx, rsi
call fcn.180033b00
mov eax, Ordinal_46
jmp 0x1800365ba
lea rdx, str.Local_port:__hu_n
movzx r8d, bx
mov rcx, rsi
call fcn.180033a50
mov dword [r13 + 0x2d0], 1
xor eax, eax
mov rdi, qword [rsp + 0x1e8]
mov rcx, qword [rsp + 0x1d0]
xor rcx, rsp
call fcn.18005f4d0
add rsp, 0x1f0
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret