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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x5b31c8]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov ebx, ecx
mov dword [ebp - 0x21c], eax
push edi
xor ecx, ecx
mov dword [ebp - 0x220], edx
push 0xff
mov edi, dword [ebx]
push ecx
mov dword [ebp - 0x210], ecx
mov dword [ebp - 0x218], ecx
movzx eax, word [edi + 0x140]
mov esi, dword [edi + 0x354]
mov dword [ebp - 0x214], eax
mov eax, dword [edi + 0x144]
mov dword [ebp - 0x228], eax
lea eax, [ebp - 0x10b]
push eax
mov byte [ebp - 0x10c], cl
call sub.MSVCR120.dll_memset
add esp, 0xc
test esi, esi
jne 0x4ff37c
cmp word [ebp - 0x214], si
je 0x4ff613
push 0x80
lea eax, [ebp - 0x18c]
push 0
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
test esi, esi
je 0x4ff4e8
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4ff39f
sub ecx, edx
cmp ecx, 0xff
jae 0x4ff4e8
push 3
push esi
push 0x588b30
call dword [sym.imp.MSVCR120.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x4ff4e0
push 5
push esi
push str.host_
call dword [sym.imp.MSVCR120.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x4ff3e5
add esi, 5
cmp dword [ebp - 0x21c], 2
mov eax, dword [ebx + 0x21c]
mov dword [ebp - 0x224], eax
jne 0x4ff404
mov dword [ebx + 0x21c], 1
lea eax, [ebp - 0x218]
mov edx, esi
push eax
push 0
mov ecx, ebx
call fcn.0050036f
pop ecx
pop ecx
cmp eax, 1
jne 0x4ff42a
lea edx, [ebp - 0x218]
mov ecx, ebx
call fcn.00500a48
mov eax, dword [ebp - 0x224]
mov dword [ebx + 0x21c], eax
mov eax, dword [ebp - 0x218]
test eax, eax
je 0x4ff4d1
mov ecx, dword [eax]
lea edx, [ebp - 0x10c]
push 0x100
call fcn.0050012a
mov eax, dword [ebp - 0x218]
pop ecx
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [ebp - 0x10c]
push eax
push dword [ebp - 0x21c]
push esi
push str.Name__s_family__i_resolved_to__s_family__i_n
push edi
call fcn.00500cc1
mov edx, dword [ebp - 0x218]
add esp, 0x18
mov ecx, edi
call fcn.005004ce
push 2
pop esi
cmp dword [ebp - 0x21c], esi
jne 0x4ff502
lea edx, [ebp - 0x188]
lea ecx, [ebp - 0x10c]
call fcn.005189cd
test eax, eax
jle 0x4ff502
mov word [ebp - 0x18c], si
mov esi, dword [ebp - 0x214]
push esi
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
mov word [ebp - 0x18a], ax
pop eax
mov dword [ebp - 0x210], eax
jmp 0x4ff50e
push esi
push str.Couldnt_bind_to__s
push edi
call fcn.00500d35
add esp, 0xc
push 0x2d
pop eax
jmp 0x4ff615
mov esi, dword [ebp - 0x214]
push 2
pop eax
cmp dword [ebp - 0x21c], eax
jne 0x4ff508
mov word [ebp - 0x18c], ax
jmp 0x4ff4b8
mov esi, dword [ebp - 0x214]
mov eax, dword [ebp - 0x210]
push eax
jmp 0x4ff559
mov eax, dword [ebp - 0x228]
dec eax
mov dword [ebp - 0x228], eax
test eax, eax
jle 0x4ff5d7
movzx eax, si
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.00500cc1
add esp, 0xc
inc esi
push 2
pop eax
cmp word [ebp - 0x18c], ax
jne 0x4ff553
push esi
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x18a], ax
push dword [ebp - 0x210]
lea eax, [ebp - 0x18c]
push eax
push dword [ebp - 0x220]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x4ff511
mov eax, 0x80
push eax
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x20c]
push 0
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x220]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x4ff5f7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, ebx
mov edx, esi
mov dword [edi + 0x858c], esi
call fcn.005188fe
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.00500d35
add esp, 0x10
jmp 0x4ff4e0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, ebx
mov edx, esi
mov dword [edi + 0x858c], esi
call fcn.005188fe
push eax
push esi
push str.bind_failed_with_errno__d:__s
jmp 0x4ff5c9
movzx eax, si
push eax
push str.Local_port:__hu_n
push edi
call fcn.00500cc1
add esp, 0xc
mov dword [ebx + 0x1fc], 1
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0054e63c
mov esp, ebp
pop ebp
ret