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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x4a0590]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov ebx, dword [edi]
movzx ecx, word [ebx + 0x180]
xor eax, eax
mov dword [ebp - 0x210], ecx
mov ecx, dword [ebx + 0x184]
mov esi, 0xff
mov dword [ebp - 0x218], ecx
mov ecx, dword [ebx + 0x394]
push esi
push eax
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x220], eax
mov byte [ebp - 0x108], al
lea eax, [ebp - 0x107]
push eax
mov dword [ebp - 0x224], edi
mov dword [ebp - 0x20c], ecx
call fcn.0045f360
xor eax, eax
add esp, 0xc
cmp dword [ebp - 0x20c], eax
jne 0x40ec0c
cmp word [ebp - 0x210], ax
jne 0x40ec0c
xor eax, eax
jmp 0x40eecb
push 0x80
push eax
lea eax, [ebp - 0x188]
push eax
call fcn.0045f360
mov eax, dword [ebp - 0x20c]
add esp, 0xc
test eax, eax
je 0x40ed95
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ec32
sub eax, edx
cmp eax, esi
jae 0x40ed95
push 3
push dword [ebp - 0x20c]
push 0x47f0f0
call fcn.00453b9b
add esp, 0xc
test eax, eax
jne 0x40ec7c
add dword [ebp - 0x20c], 3
push dword [ebp - 0x20c]
push str.Couldnt_bind_to_interface__s
mov esi, ebx
call fcn.00429149
pop ecx
pop ecx
jmp 0x40eec8
push 5
push dword [ebp - 0x20c]
push str.host_
call fcn.00453b9b
add esp, 0xc
test eax, eax
jne 0x40ec9c
add dword [ebp - 0x20c], 5
cmp dword [ebp + 0xc], 2
mov eax, dword [edi + 0x244]
mov dword [ebp - 0x21c], eax
jne 0x40ecb8
mov dword [edi + 0x244], 1
lea eax, [ebp - 0x220]
push eax
push 0
push dword [ebp - 0x20c]
push edi
call fcn.0041a196
add esp, 0x10
cmp eax, 1
jne 0x40ece2
lea eax, [ebp - 0x220]
mov esi, edi
call fcn.0040e25f
mov eax, dword [ebp - 0x21c]
mov dword [edi + 0x244], eax
mov edi, dword [ebp - 0x220]
test edi, edi
je 0x40ed85
mov ecx, dword [edi]
push 0x100
lea esi, [ebp - 0x108]
call fcn.00419f91
mov eax, dword [edi]
pop ecx
push dword [eax + 4]
mov eax, esi
push eax
push dword [ebp + 0xc]
mov esi, ebx
push dword [ebp - 0x20c]
push str.Name__s_family__i_resolved_to__s_family__i_n
call fcn.004290d9
add esp, 0x14
call fcn.0041a31d
cmp dword [ebp + 0xc], 2
jne 0x40ed7a
lea eax, [ebp - 0x184]
push eax
lea eax, [ebp - 0x108]
push eax
call fcn.00420ec8
pop ecx
pop ecx
test eax, eax
jle 0x40ed7a
push 2
pop eax
push dword [ebp - 0x210]
mov word [ebp - 0x188], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x186], ax
mov dword [ebp - 0x214], 0x10
mov edi, dword [ebp - 0x224]
jmp 0x40ee09
push dword [ebp - 0x20c]
push str.Couldnt_bind_to__s
jmp 0x40ec6e
cmp dword [ebp + 0xc], 2
jne 0x40ee09
push 2
pop eax
push dword [ebp - 0x210]
mov word [ebp - 0x188], ax
call dword [sym.imp.WS2_32.dll_htons]
mov dword [ebp - 0x214], 0x10
jmp 0x40ee02
dec dword [ebp - 0x218]
cmp dword [ebp - 0x218], 0
jle 0x40eea0
movzx eax, word [ebp - 0x210]
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
mov esi, ebx
call fcn.004290d9
inc dword [ebp - 0x210]
cmp word [ebp - 0x188], 2
pop ecx
pop ecx
jne 0x40ee09
push dword [ebp - 0x210]
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x186], ax
push dword [ebp - 0x214]
lea eax, [ebp - 0x188]
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x40edbd
mov eax, 0x80
push eax
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x208]
push 0
push eax
call fcn.0045f360
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x208]
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x40ee7b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push edi
mov edi, esi
mov dword [ebx + 0x85dc], esi
call fcn.0042cb77
pop ecx
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x40eebe
movzx eax, word [ebp - 0x210]
push eax
push str.Local_port:__hu_n
mov esi, ebx
call fcn.004290d9
pop ecx
pop ecx
mov dword [edi + 0x224], 1
jmp 0x40ec05
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push edi
mov edi, esi
mov dword [ebx + 0x85dc], esi
call fcn.0042cb77
pop ecx
push eax
push esi
push str.bind_failed_with_errno__d:__s
mov esi, ebx
call fcn.00429149
add esp, 0xc
push 0x2d
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00453655
leave
ret