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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x5c31c8]
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 0x50f2f6
cmp word [ebp - 0x214], si
je 0x50f58d
push 0x80
lea eax, [ebp - 0x18c]
push 0
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
test esi, esi
je 0x50f462
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x50f319
sub ecx, edx
cmp ecx, 0xff
jae 0x50f462
push 3
push esi
push 0x59a3ac
call dword [sym.imp.MSVCR120.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x50f45a
push 5
push esi
push str.host_
call dword [sym.imp.MSVCR120.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x50f35f
add esi, 5
cmp dword [ebp - 0x21c], 2
mov eax, dword [ebx + 0x240]
mov dword [ebp - 0x224], eax
jne 0x50f37e
mov dword [ebx + 0x240], 1
lea eax, [ebp - 0x218]
mov edx, esi
push eax
push 0
mov ecx, ebx
call fcn.005102fc
pop ecx
pop ecx
cmp eax, 1
jne 0x50f3a4
lea edx, [ebp - 0x218]
mov ecx, ebx
call fcn.005109d5
mov eax, dword [ebp - 0x224]
mov dword [ebx + 0x240], eax
mov eax, dword [ebp - 0x218]
test eax, eax
je 0x50f44b
mov ecx, dword [eax]
lea edx, [ebp - 0x10c]
push 0x100
call fcn.005100b7
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.00510c4e
mov edx, dword [ebp - 0x218]
add esp, 0x18
mov ecx, edi
call fcn.0051045b
push 2
pop esi
cmp dword [ebp - 0x21c], esi
jne 0x50f47c
lea edx, [ebp - 0x188]
lea ecx, [ebp - 0x10c]
call fcn.005292fb
test eax, eax
jle 0x50f47c
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 0x50f488
push esi
push str.Couldnt_bind_to__s
push edi
call fcn.00510cc2
add esp, 0xc
push 0x2d
pop eax
jmp 0x50f58f
mov esi, dword [ebp - 0x214]
push 2
pop eax
cmp dword [ebp - 0x21c], eax
jne 0x50f482
mov word [ebp - 0x18c], ax
jmp 0x50f432
mov esi, dword [ebp - 0x214]
mov eax, dword [ebp - 0x210]
push eax
jmp 0x50f4d3
mov eax, dword [ebp - 0x228]
dec eax
mov dword [ebp - 0x228], eax
test eax, eax
jle 0x50f551
movzx eax, si
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.00510c4e
add esp, 0xc
inc esi
push 2
pop eax
cmp word [ebp - 0x18c], ax
jne 0x50f4cd
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 0x50f48b
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 0x50f571
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, ebx
mov edx, esi
mov dword [edi + 0x858c], esi
call fcn.0052922c
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.00510cc2
add esp, 0x10
jmp 0x50f45a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, ebx
mov edx, esi
mov dword [edi + 0x858c], esi
call fcn.0052922c
push eax
push esi
push str.bind_failed_with_errno__d:__s
jmp 0x50f543
movzx eax, si
push eax
push str.Local_port:__hu_n
push edi
call fcn.00510c4e
add esp, 0xc
mov dword [ebx + 0x220], 1
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0055daac
mov esp, ebp
pop ebp
ret