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

Disassembly:
push rbp
push rbx
push rsi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x160]
sub rsp, 0x260
mov rax, qword [0x1803c1370]
xor rax, rsp
mov qword [rbp + 0x150], rax
mov rsi, qword [rcx]
mov qword [rsp + 0x40], rcx
xor r14d, r14d
mov qword [rsp + 0x38], r14
movzx ebx, word [rsi + 0x1f0]
mov r12d, dword [rsi + 0x1f4]
mov r13, qword [rsi + 0x430]
mov r15d, r8d
mov qword [rsp + 0x48], rdx
lea rcx, [rbp + 0x51]
xor edx, edx
mov r8d, 0xff
mov byte [rbp + 0x50], r14b
call sub.MSVCR100.dll_memset
test r13, r13
jne 0x18020e3ef
test bx, bx
jne 0x18020e3ef
xor eax, eax
jmp 0x18020e6a1
lea rcx, [rsp + 0x50]
xor edx, edx
mov r8d, 0x80
mov qword [rsp + 0x2b8], rdi
call sub.MSVCR100.dll_memset
test r13, r13
je 0x18020e54c
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r13
repne scasb al, byte [rdi]
not rcx
dec rcx
cmp rcx, 0xff
jae 0x18020e54c
lea r8, [rbp + 0x50]
mov r9d, 0x100
mov rdx, r13
mov ecx, r15d
call fcn.180224450
test rax, rax
je 0x18020e46a
lea r9, [rbp + 0x50]
lea rdx, str.Local_Interface__s_is_ip__s_using_address_family__i_n
mov r8, r13
mov rcx, rsi
mov dword [rsp + 0x20], r15d
call fcn.180203670
jmp 0x18020e510
mov eax, dword [rsi + 0x3a8]
mov rdi, qword [rsp + 0x40]
mov ecx, 1
mov dword [rsp + 0x30], eax
cmp r15d, 2
lea r9, [rsp + 0x38]
cmove eax, ecx
xor r8d, r8d
mov rcx, rdi
mov rdx, r13
mov dword [rsi + 0x3a8], eax
call fcn.180203f20
cmp eax, 1
jne 0x18020e4b0
lea rdx, [rsp + 0x38]
mov rcx, rdi
call fcn.180214900
mov eax, dword [rsp + 0x30]
mov dword [rsi + 0x3a8], eax
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x18020e530
mov rcx, qword [rcx]
lea rdx, [rbp + 0x50]
mov r8d, 0x100
call fcn.180203c40
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, r13
mov ecx, dword [rax + 4]
lea rax, [rbp + 0x50]
mov dword [rsp + 0x28], ecx
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.180203670
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.1802040e0
cmp r15d, 2
jne 0x18020e56e
lea r8, [rsp + 0x54]
lea rdx, [rbp + 0x50]
mov ecx, r15d
mov edi, r15d
call fcn.180224420
test eax, eax
jle 0x18020e56e
jmp 0x18020e555
lea rdx, str.Couldnt_bind_to__s
mov r8, r13
mov rcx, rsi
call fcn.180203720
mov eax, 0x2d
jmp 0x18020e699
cmp r15d, 2
jne 0x18020e56e
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 0x18020e5dd
nop dword [rax + rax]
dec r12d
test r12d, r12d
jle 0x18020e642
lea rdx, str.Bind_to_local_port__d_failed__trying_next_n
movzx r8d, bx
mov rcx, rsi
call fcn.180203670
inc bx
cmp word [rsp + 0x50], 2
jne 0x18020e5c8
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 0x18020e590
lea rcx, [rbp - 0x30]
xor edx, edx
mov r8d, 0x80
mov dword [rsp + 0x30], 0x80
call sub.MSVCR100.dll_memset
lea r8, [rsp + 0x30]
lea rdx, [rbp - 0x30]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x18020e678
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rsp + 0x40]
mov edx, eax
mov edi, eax
mov dword [rsi + 0x86ec], eax
call fcn.180213960
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r8d, edi
mov r9, rax
mov rcx, rsi
call fcn.180203720
mov eax, 0x2d
jmp 0x18020e699
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rsp + 0x40]
mov edx, eax
mov edi, eax
mov dword [rsi + 0x86ec], eax
call fcn.180213960
lea rdx, str.bind_failed_with_errno__d:__s
mov r8d, edi
mov r9, rax
mov rcx, rsi
call fcn.180203720
mov eax, 0x2d
jmp 0x18020e699
lea rdx, str.Local_port:__d_n
movzx r8d, bx
mov rcx, rsi
call fcn.180203670
mov rax, qword [rsp + 0x40]
mov byte [rax + 0x1be], 1
xor eax, eax
mov rdi, qword [rsp + 0x2b8]
mov rcx, qword [rbp + 0x150]
xor rcx, rsp
call fcn.180227610
add rsp, 0x260
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rbx
pop rbp
ret