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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x5ca1c8]
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 0x510ff0
cmp word [ebp - 0x214], si
je 0x511287
push 0x80
lea eax, [ebp - 0x18c]
push 0
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
test esi, esi
je 0x51115c
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x511013
sub ecx, edx
cmp ecx, 0xff
jae 0x51115c
push 3
push esi
push 0x59db40
call dword [sym.imp.MSVCR120.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x511154
push 5
push esi
push str.host_
call dword [sym.imp.MSVCR120.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x511059
add esi, 5
cmp dword [ebp - 0x21c], 2
mov eax, dword [ebx + 0x23c]
mov dword [ebp - 0x224], eax
jne 0x511078
mov dword [ebx + 0x23c], 1
lea eax, [ebp - 0x218]
mov edx, esi
push eax
push 0
mov ecx, ebx
call fcn.00511ff6
pop ecx
pop ecx
cmp eax, 1
jne 0x51109e
lea edx, [ebp - 0x218]
mov ecx, ebx
call fcn.005126cf
mov eax, dword [ebp - 0x224]
mov dword [ebx + 0x23c], eax
mov eax, dword [ebp - 0x218]
test eax, eax
je 0x511145
mov ecx, dword [eax]
lea edx, [ebp - 0x10c]
push 0x100
call fcn.00511db1
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.00512948
mov edx, dword [ebp - 0x218]
add esp, 0x18
mov ecx, edi
call fcn.00512155
push 2
pop esi
cmp dword [ebp - 0x21c], esi
jne 0x511176
lea edx, [ebp - 0x188]
lea ecx, [ebp - 0x10c]
call fcn.0052aff5
test eax, eax
jle 0x511176
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 0x511182
push esi
push str.Couldnt_bind_to__s
push edi
call fcn.005129bc
add esp, 0xc
push 0x2d
pop eax
jmp 0x511289
mov esi, dword [ebp - 0x214]
push 2
pop eax
cmp dword [ebp - 0x21c], eax
jne 0x51117c
mov word [ebp - 0x18c], ax
jmp 0x51112c
mov esi, dword [ebp - 0x214]
mov eax, dword [ebp - 0x210]
push eax
jmp 0x5111cd
mov eax, dword [ebp - 0x228]
dec eax
mov dword [ebp - 0x228], eax
test eax, eax
jle 0x51124b
movzx eax, si
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.00512948
add esp, 0xc
inc esi
push 2
pop eax
cmp word [ebp - 0x18c], ax
jne 0x5111c7
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 0x511185
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 0x51126b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, ebx
mov edx, esi
mov dword [edi + 0x858c], esi
call fcn.0052af26
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.005129bc
add esp, 0x10
jmp 0x511154
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, ebx
mov edx, esi
mov dword [edi + 0x858c], esi
call fcn.0052af26
push eax
push esi
push str.bind_failed_with_errno__d:__s
jmp 0x51123d
movzx eax, si
push eax
push str.Local_port:__hu_n
push edi
call fcn.00512948
add esp, 0xc
mov dword [ebx + 0x21c], 1
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0055fedc
mov esp, ebp
pop ebp
ret