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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x270
push esi
push edi
lea edi, [ebp - 0x270]
mov ecx, 0x9c
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x5759c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 8], ecx
lea edx, [ebp - 0x8c]
mov dword [ebp - 0x94], edx
mov dword [ebp - 0x98], 0
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x9c], eax
lea ecx, [ebp - 0x8c]
mov dword [ebp - 0xa0], ecx
mov dword [ebp - 0xa8], 0
mov edx, dword [ebp - 8]
mov ax, word [edx + 0x168]
mov word [ebp - 0xb0], ax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x16c]
mov dword [ebp - 0xb4], edx
mov eax, 4
shl eax, 3
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + eax + 0x380]
mov dword [ebp - 0xb8], edx
cmp dword [ebp - 0xb8], 0
jne 0x4efdfa
movzx eax, word [ebp - 0xb0]
test eax, eax
jne 0x4efdfa
xor eax, eax
jmp 0x4f04a2
push 0x80
push 0
lea ecx, [ebp - 0x8c]
push ecx
call fcn.00471293
add esp, 0xc
cmp dword [ebp - 0xb8], 0
je 0x4f023d
mov edx, dword [ebp - 0xb8]
push edx
call fcn.00472f49
add esp, 4
cmp eax, 0xff
jae 0x4f023d
mov al, byte [0x577110]
mov byte [ebp - 0x1c0], al
push 0xff
push 0
lea ecx, [ebp - 0x1bf]
push ecx
call fcn.00471293
add esp, 0xc
mov dword [ebp - 0x1c8], 0
mov byte [ebp - 0x1c9], 0
mov byte [ebp - 0x1ca], 0
mov edx, dword [0x5698f4]
push edx
call fcn.00472f49
add esp, 4
push eax
mov eax, dword [ebp - 0xb8]
push eax
mov ecx, dword [0x5698f4]
push ecx
call fcn.004732e1
add esp, 0xc
test eax, eax
jne 0x4efebe
mov edx, dword [0x5698f4]
push edx
call fcn.00472f49
add esp, 4
add eax, dword [ebp - 0xb8]
mov dword [ebp - 0xb8], eax
mov byte [ebp - 0x1c9], 1
jmp 0x4eff08
mov eax, dword [str.host_]
push eax
call fcn.00472f49
add esp, 4
push eax
mov ecx, dword [ebp - 0xb8]
push ecx
mov edx, dword [str.host_]
push edx
call fcn.004732e1
add esp, 0xc
test eax, eax
jne 0x4eff08
mov eax, dword [str.host_]
push eax
call fcn.00472f49
add esp, 4
add eax, dword [ebp - 0xb8]
mov dword [ebp - 0xb8], eax
mov byte [ebp - 0x1ca], 1
movzx ecx, byte [ebp - 0x1ca]
test ecx, ecx
jne 0x4effd4
push 0x100
lea edx, [ebp - 0x1c0]
push edx
mov eax, dword [ebp - 0xb8]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x88]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.0047010e
add esp, 0x18
mov dword [ebp - 0x270], eax
cmp dword [ebp - 0x270], 0
je 0x4eff67
cmp dword [ebp - 0x270], 1
je 0x4eff96
cmp dword [ebp - 0x270], 2
je 0x4effa0
jmp 0x4effd4
movzx edx, byte [ebp - 0x1c9]
test edx, edx
je 0x4eff94
mov eax, dword [ebp - 0xb8]
push eax
push str.Couldnt_bind_to_interface__s
mov ecx, dword [ebp - 8]
push ecx
call fcn.00472a30
add esp, 0xc
mov eax, 0x2d
jmp 0x4f04a2
jmp 0x4effd4
mov eax, 1
jmp 0x4f04a2
mov byte [ebp - 0x1c9], 1
mov edx, dword [ebp + 0x10]
push edx
lea eax, [ebp - 0x1c0]
push eax
mov ecx, dword [ebp - 0xb8]
push ecx
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
mov edx, dword [ebp - 8]
push edx
call fcn.00470e9c
add esp, 0x14
mov dword [ebp - 0x1c8], 1
movzx eax, byte [ebp - 0x1c9]
test eax, eax
jne 0x4f00e5
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3a8]
mov dword [ebp - 0x1d0], edx
cmp dword [ebp + 0x10], 2
jne 0x4f0007
mov eax, dword [ebp + 8]
mov dword [eax + 0x3a8], 1
jmp 0x4f001a
cmp dword [ebp + 0x10], 0x17
jne 0x4f001a
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x3a8], 2
lea edx, [ebp - 0xa8]
push edx
push 0
mov eax, dword [ebp - 0xb8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00472ee5
add esp, 0x10
mov dword [ebp - 0x1d4], eax
cmp dword [ebp - 0x1d4], 1
jne 0x4f0058
lea edx, [ebp - 0xa8]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0047316a
add esp, 8
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x1d0]
mov dword [ecx + 0x3a8], edx
cmp dword [ebp - 0xa8], 0
je 0x4f00db
push 0x100
lea eax, [ebp - 0x1c0]
push eax
mov ecx, dword [ebp - 0xa8]
mov edx, dword [ecx]
push edx
call fcn.00472c83
add esp, 0xc
mov eax, dword [ebp - 0xa8]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push edx
lea eax, [ebp - 0x1c0]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0xb8]
push edx
push str.Name__s_family__i_resolved_to__s_family__i_n
mov eax, dword [ebp - 8]
push eax
call fcn.00470e9c
add esp, 0x18
mov ecx, dword [ebp - 0xa8]
push ecx
mov edx, dword [ebp - 8]
push edx
call fcn.00470b9f
add esp, 8
mov dword [ebp - 0x1c8], 1
jmp 0x4f00e5
mov dword [ebp - 0x1c8], 0xffffffff
cmp dword [ebp - 0x1c8], 0
jle 0x4f020d
cmp dword [ebp + 0x10], 0x17
jne 0x4f01af
push 0x25
lea eax, [ebp - 0x1c0]
push eax
call fcn.0047087f
add esp, 8
mov dword [ebp - 0x1d8], eax
cmp dword [ebp - 0x1d8], 0
je 0x4f0134
mov ecx, dword [ebp - 0x1d8]
mov byte [ecx], 0
mov edx, dword [ebp - 0x1d8]
add edx, 1
mov dword [ebp - 0x1d8], edx
mov eax, dword [ebp - 0xa0]
add eax, 8
push eax
lea ecx, [ebp - 0x1c0]
push ecx
push 0x17
call fcn.00470acd
add esp, 0xc
test eax, eax
jle 0x4f01a3
mov edx, 0x17
mov eax, dword [ebp - 0xa0]
mov word [eax], dx
mov esi, esp
movzx ecx, word [ebp - 0xb0]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
cmp esi, esp
call fcn.00471e7d
mov edx, dword [ebp - 0xa0]
mov word [edx + 2], ax
cmp dword [ebp - 0x1d8], 0
je 0x4f01a3
mov eax, dword [ebp - 0x1d8]
push eax
call fcn.00470ece
add esp, 4
mov ecx, dword [ebp - 0xa0]
mov dword [ecx + 0x18], eax
mov dword [ebp - 0x98], 0x1c
jmp 0x4f020d
cmp dword [ebp + 0x10], 2
jne 0x4f020d
mov edx, dword [ebp - 0x9c]
add edx, 4
push edx
lea eax, [ebp - 0x1c0]
push eax
push 2
call fcn.00470acd
add esp, 0xc
test eax, eax
jle 0x4f020d
mov ecx, 2
mov edx, dword [ebp - 0x9c]
mov word [edx], cx
mov esi, esp
movzx eax, word [ebp - 0xb0]
push eax
call dword [sym.imp.WS2_32.dll_htons]
cmp esi, esp
call fcn.00471e7d
mov ecx, dword [ebp - 0x9c]
mov word [ecx + 2], ax
mov dword [ebp - 0x98], 0x10
cmp dword [ebp - 0x1c8], 1
jge 0x4f0238
mov edx, dword [ebp - 0xb8]
push edx
push str.Couldnt_bind_to__s
mov eax, dword [ebp - 8]
push eax
call fcn.00472a30
add esp, 0xc
mov eax, 0x2d
jmp 0x4f04a2
jmp 0x4f02bd
cmp dword [ebp + 0x10], 0x17
jne 0x4f027e
mov ecx, 0x17
mov edx, dword [ebp - 0xa0]
mov word [edx], cx
mov esi, esp
movzx eax, word [ebp - 0xb0]
push eax
call dword [sym.imp.WS2_32.dll_htons]
cmp esi, esp
call fcn.00471e7d
mov ecx, dword [ebp - 0xa0]
mov word [ecx + 2], ax
mov dword [ebp - 0x98], 0x1c
jmp 0x4f02bd
cmp dword [ebp + 0x10], 2
jne 0x4f02bd
mov edx, 2
mov eax, dword [ebp - 0x9c]
mov word [eax], dx
mov esi, esp
movzx ecx, word [ebp - 0xb0]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
cmp esi, esp
call fcn.00471e7d
mov edx, dword [ebp - 0x9c]
mov word [edx + 2], ax
mov dword [ebp - 0x98], 0x10
mov esi, esp
mov eax, dword [ebp - 0x98]
push eax
mov ecx, dword [ebp - 0x94]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_bind]
cmp esi, esp
call fcn.00471e7d
test eax, eax
jl 0x4f03af
mov dword [ebp - 0x268], 0x80
push 0x80
push 0
lea eax, [ebp - 0x25c]
push eax
call fcn.00471293
add esp, 0xc
mov esi, esp
lea ecx, [ebp - 0x268]
push ecx
lea edx, [ebp - 0x25c]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_getsockname]
cmp esi, esp
call fcn.00471e7d
test eax, eax
jge 0x4f0385
mov esi, esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, esp
call fcn.00471e7d
mov dword [ebp - 0xbc], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xbc]
mov dword [ecx + 0x4694], edx
mov eax, dword [ebp - 0xbc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004711a8
add esp, 8
push eax
mov edx, dword [ebp - 0xbc]
push edx
push 0x5699a8
mov eax, dword [ebp - 8]
push eax
call fcn.00472a30
add esp, 0x10
mov eax, 0x2d
jmp 0x4f04a2
movzx ecx, word [ebp - 0xb0]
push ecx
push str.Local_port:__hu_n
mov edx, dword [ebp - 8]
push edx
call fcn.00470e9c
add esp, 0xc
mov eax, dword [ebp + 8]
mov byte [eax + 0x37f], 1
xor eax, eax
jmp 0x4f04a2
mov ecx, dword [ebp - 0xb4]
sub ecx, 1
mov dword [ebp - 0xb4], ecx
cmp dword [ebp - 0xb4], 0
jle 0x4f0446
movzx edx, word [ebp - 0xb0]
push edx
push str.Bind_to_local_port__hu_failed__trying_next_n
mov eax, dword [ebp - 8]
push eax
call fcn.00470e9c
add esp, 0xc
mov cx, word [ebp - 0xb0]
add cx, 1
mov word [ebp - 0xb0], cx
mov edx, dword [ebp - 0x94]
movzx eax, word [edx]
cmp eax, 2
jne 0x4f0423
mov esi, esp
movzx ecx, word [ebp - 0xb0]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
cmp esi, esp
call fcn.00471e7d
mov edx, dword [ebp - 0x9c]
mov word [edx + 2], ax
jmp 0x4f0444
mov esi, esp
movzx eax, word [ebp - 0xb0]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
cmp esi, esp
call fcn.00471e7d
mov ecx, dword [ebp - 0xa0]
mov word [ecx + 2], ax
jmp 0x4f0448
jmp 0x4f044d
jmp 0x4f02bd
mov esi, esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, esp
call fcn.00471e7d
mov dword [ebp - 0xbc], eax
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xbc]
mov dword [edx + 0x4694], eax
mov ecx, dword [ebp - 0xbc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004711a8
add esp, 8
push eax
mov eax, dword [ebp - 0xbc]
push eax
push str.bind_failed_with_errno__d:__s
mov ecx, dword [ebp - 8]
push ecx
call fcn.00472a30
add esp, 0x10
mov eax, 0x2d
push edx
mov ecx, ebp
push eax
lea edx, [0x4f04d0]
call fcn.0047194b
pop eax
pop edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00471225
add esp, 0x270
cmp ebp, esp
call fcn.00471e7d
mov esp, ebp
pop ebp
ret