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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x56adc0]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [eax]
mov ecx, dword [ebx + 0x184]
push esi
movzx esi, word [ebx + 0x180]
push edi
mov edi, dword [ebx + 0x394]
mov dword [ebp - 0x210], eax
xor eax, eax
push 0xff
push eax
lea edx, [ebp - 0x10b]
push edx
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x220], esi
mov dword [ebp - 0x224], ecx
mov byte [ebp - 0x10c], al
call fcn.004fbb00
add esp, 0xc
mov dword [ebp - 0x21c], 0
test edi, edi
jne 0x4bf8c0
test si, si
je 0x4bfb9a
push 0x80
lea eax, [ebp - 0x18c]
push 0
push eax
call fcn.004fbb00
add esp, 0xc
test edi, edi
je 0x4bfa79
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4bf8e3
sub eax, edx
cmp eax, 0xff
jae 0x4bfa79
push 3
push edi
push 0x551948
call fcn.004fbc61
add esp, 0xc
test eax, eax
jne 0x4bf913
add edi, 3
lea ecx, [eax + 1]
jmp 0x4bf932
push 5
push edi
push str.host_
call fcn.004fbc61
add esp, 0xc
test eax, eax
jne 0x4bf92c
add edi, 5
jmp 0x4bf997
mov ecx, dword [ebp - 0x21c]
call fcn.004711b0
sub eax, 0
je 0x4bf977
dec eax
je 0x4bf961
dec eax
jne 0x4bf98f
mov ecx, dword [ebp + 0x10]
push ecx
lea edx, [ebp - 0x10c]
push edx
push edi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push ebx
call fcn.004c1df0
add esp, 0x14
jmp 0x4bfa3c
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004f6bad
mov esp, ebp
pop ebp
ret
test ecx, ecx
je 0x4bf997
push edi
push str.Couldnt_bind_to_interface__s
push ebx
call fcn.004c1e70
add esp, 0xc
jmp 0x4bfbda
test ecx, ecx
jne 0x4bfa65
cmp dword [ebp + 0x10], 2
mov esi, dword [ebp - 0x210]
mov eax, dword [esi + 0x234]
mov dword [ebp - 0x21c], eax
jne 0x4bf9b9
mov dword [esi + 0x234], 1
lea ecx, [ebp - 0x218]
push ecx
push 0
push edi
push esi
call fcn.004c0cd0
add esp, 0x10
cmp eax, 1
jne 0x4bf9dc
lea eax, [ebp - 0x218]
call fcn.004c1470
mov eax, dword [ebp - 0x218]
mov edx, dword [ebp - 0x21c]
mov dword [esi + 0x234], edx
test eax, eax
je 0x4bfa65
mov ecx, dword [eax]
push 0x100
lea esi, [ebp - 0x10c]
call fcn.004c0a30
mov esi, dword [ebp - 0x218]
mov eax, dword [esi]
mov ecx, dword [eax + 4]
mov eax, dword [ebp + 0x10]
add esp, 4
push ecx
lea edx, [ebp - 0x10c]
push edx
push eax
push edi
push str.Name__s_family__i_resolved_to__s_family__i_n
push ebx
call fcn.004c1df0
add esp, 0x18
mov edi, esi
mov eax, ebx
call fcn.004c0ea0
mov esi, dword [ebp - 0x220]
cmp dword [ebp + 0x10], 2
jne 0x4bfaa3
lea eax, [ebp - 0x188]
lea ecx, [ebp - 0x10c]
call fcn.004e10e0
test eax, eax
jle 0x4bfaa3
mov ecx, 2
mov word [ebp - 0x18c], cx
jmp 0x4bfa8b
push edi
push str.Couldnt_bind_to__s
push ebx
call fcn.004c1e70
add esp, 0xc
jmp 0x4bfbda
cmp dword [ebp + 0x10], 2
jne 0x4bfaa3
mov edx, 2
mov word [ebp - 0x18c], dx
push esi
call dword [sym.imp.WS2_32.dll_htons]
mov dword [ebp - 0x214], 0x10
mov word [ebp - 0x18a], ax
mov eax, dword [ebp - 0x214]
mov edi, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x18c]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x4bfb19
nop
mov eax, dword [ebp - 0x224]
dec eax
mov dword [ebp - 0x224], eax
test eax, eax
jle 0x4bfbad
movzx edx, si
push edx
push str.Bind_to_local_port__hu_failed__trying_next_n
push ebx
call fcn.004c1df0
add esp, 0xc
inc esi
cmp word [ebp - 0x18c], 2
jne 0x4bfb00
push esi
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x18a], ax
mov eax, dword [ebp - 0x214]
push eax
lea ecx, [ebp - 0x18c]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x4bfac0
push 0x80
lea edx, [ebp - 0x20c]
push 0
push edx
mov dword [ebp - 0x220], 0x80
call fcn.004fbb00
add esp, 0xc
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x20c]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x4bfb78
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [ebp - 0x210]
mov edi, eax
push edx
mov dword [ebx + 0x85dc], edi
call fcn.004e1010
add esp, 4
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x4bfbd1
movzx eax, si
push eax
push str.Local_port:__hu_n
push ebx
call fcn.004c1df0
mov ecx, dword [ebp - 0x210]
add esp, 0xc
mov dword [ecx + 0x214], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004f6bad
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [ebp - 0x210]
mov edi, eax
push edx
mov dword [ebx + 0x85dc], edi
call fcn.004e1010
add esp, 4
push eax
push edi
push str.bind_failed_with_errno__d:__s
push ebx
call fcn.004c1e70
add esp, 0x10
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
mov eax, 0x2d
pop ebx
call fcn.004f6bad
mov esp, ebp
pop ebp
ret