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

Disassembly:
mov r11, rsp
sub rsp, 0x298
mov rax, qword [0x005c3458]
mov qword [rsp + 0x250], rax
mov qword [r11 + 0x20], rbx
mov qword [r11 - 8], rbp
mov qword [r11 - 0x10], rsi
mov rsi, qword [rcx]
mov qword [r11 - 0x20], r12
mov qword [r11 - 0x28], r13
mov qword [r11 - 0x30], r14
mov qword [rsp + 0x40], rcx
xor r13d, r13d
mov qword [rsp + 0x38], r13
movzx ebx, word [rsi + 0x1a0]
mov ebp, dword [rsi + 0x1a4]
mov r12, qword [rsi + 0x3f8]
mov qword [r11 - 0x38], r15
mov r14d, r8d
mov r15, rdx
lea rcx, [r11 - 0x147]
mov r8d, 0xff
xor edx, edx
mov byte [r11 - 0x148], r13b
call sub.msvcrt.dll_memset
test r12, r12
jne 0x49777b
test bx, bx
jne 0x49777b
xor eax, eax
jmp 0x497a3a
lea rcx, [rsp + 0x50]
xor edx, edx
mov r8d, 0x80
mov qword [rsp + 0x280], rdi
call sub.msvcrt.dll_memset
test r12, r12
je 0x497901
xor eax, eax
mov rcx, 0xffffffffffffffff
mov rdi, r12
repne scasb al, byte [rdi]
not rcx
dec rcx
cmp rcx, 0xff
jae 0x497901
lea r8, [rsp + 0x150]
mov r9d, 0x100
mov rdx, r12
mov ecx, r14d
call fcn.004b61f0
test rax, rax
je 0x497801
lea r9, [rsp + 0x150]
lea rdx, str.Local_Interface__s_is_ip__s_using_address_family__i_n
mov r8, r12
mov rcx, rsi
mov dword [rsp + 0x20], r14d
call fcn.00496cb0
jmp 0x4978b1
cmp r14d, 2
mov eax, dword [rsi + 0x360]
mov dword [rsp + 0x30], eax
jne 0x49781b
mov dword [rsi + 0x360], 1
mov rdi, qword [rsp + 0x40]
lea r9, [rsp + 0x38]
xor r8d, r8d
mov rcx, rdi
mov rdx, r12
call fcn.0048c030
cmp eax, 1
jne 0x497845
lea rdx, [rsp + 0x38]
mov rcx, rdi
call fcn.0049a470
mov eax, dword [rsp + 0x30]
mov dword [rsi + 0x360], eax
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x4978ea
mov rcx, qword [rcx]
lea rdx, [rsp + 0x150]
mov r8d, 0x100
call fcn.0048bd70
mov rdx, qword [rsp + 0x38]
mov r9d, r14d
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 + 0x150]
mov dword [rsp + 0x28], ecx
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.00496cb0
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.0048c260
cmp r14d, 2
jne 0x497921
lea r8, [rsp + 0x54]
lea rdx, [rsp + 0x150]
mov ecx, r14d
call fcn.004b61c0
test eax, eax
jle 0x497921
movzx ecx, bx
mov word [rsp + 0x50], r14w
call qword [sym.imp.WS2_32.dll_htons]
lea r13d, [r14 + 0xe]
mov word [rsp + 0x52], ax
jmp 0x497921
lea rdx, str.Couldnt_bind_to__s
mov r8, r12
mov rcx, rsi
call fcn.00496db0
jmp 0x497a2d
cmp r14d, 2
jne 0x497921
movzx ecx, bx
mov word [rsp + 0x50], r14w
call qword [sym.imp.WS2_32.dll_htons]
mov r13d, reloc.WS2_32.dll_recv
mov word [rsp + 0x52], ax
lea rdx, [rsp + 0x50]
mov r8d, r13d
mov rcx, r15
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x497981
dec ebp
test ebp, ebp
jle 0x4979fe
lea rdx, str.Bind_to_local_port__hu_failed__trying_next_n
movzx r8d, bx
mov rcx, rsi
call fcn.00496cb0
inc bx
cmp word [rsp + 0x50], 2
jne 0x49796c
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rsp + 0x52], ax
lea rdx, [rsp + 0x50]
mov r8d, r13d
mov rcx, r15
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x497936
lea rcx, [rsp + 0xd0]
xor edx, edx
mov r8d, 0x80
mov dword [rsp + 0x30], 0x80
call sub.msvcrt.dll_memset
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0xd0]
mov rcx, r15
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x4979db
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rsp + 0x40]
mov edx, eax
mov edi, eax
mov dword [rsi + 0x86cc], eax
call fcn.0048a2b0
lea rdx, str.getsockname___failed_with_errno__d:__s
jmp 0x497a1f
lea rdx, str.Local_port:__hu_n
movzx r8d, bx
mov rcx, rsi
call fcn.00496cb0
mov rcx, qword [rsp + 0x40]
xor eax, eax
mov byte [rcx + 0x1b7], 1
jmp 0x497a32
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rsp + 0x40]
mov edx, eax
mov edi, eax
mov dword [rsi + 0x86cc], eax
call fcn.0048a2b0
lea rdx, str.bind_failed_with_errno__d:__s
mov r9, rax
mov r8d, edi
mov rcx, rsi
call fcn.00496db0
mov eax, 0x2d
mov rdi, qword [rsp + 0x280]
mov r15, qword [rsp + 0x260]
mov r14, qword [rsp + 0x268]
mov r13, qword [rsp + reloc.MFC42u.dll_CDaoException::CDaoException]
mov r12, qword [rsp + 0x278]
mov rsi, qword [rsp + 0x288]
mov rbp, qword [rsp + 0x290]
mov rbx, qword [rsp + 0x2b8]
mov rcx, qword [rsp + 0x250]
call fcn.005555b0
add rsp, 0x298
ret