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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x1013a420]
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 fcn.1003e9c0
add esp, 0xc
test esi, esi
jne 0x100168ec
cmp word [ebp - 0x214], si
je 0x10016b81
push 0x80
lea eax, [ebp - 0x18c]
push 0
push eax
call fcn.1003e9c0
add esp, 0xc
test esi, esi
je 0x10016a56
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1001690f
sub ecx, edx
cmp ecx, 0xff
jae 0x10016a56
push 3
push esi
push 0x1012fa3c
call fcn.1003c0d0
add esp, 0xc
test eax, eax
je 0x10016a4e
push 5
push esi
push str.host_
call fcn.1003c0d0
add esp, 0xc
test eax, eax
jne 0x10016953
add esi, 5
cmp dword [ebp - 0x21c], 2
mov eax, dword [ebx + 0x240]
mov dword [ebp - 0x224], eax
jne 0x10016972
mov dword [ebx + 0x240], 1
lea eax, [ebp - 0x218]
mov edx, esi
push eax
push 0
mov ecx, ebx
call fcn.1001789a
pop ecx
pop ecx
cmp eax, 1
jne 0x10016998
lea edx, [ebp - 0x218]
mov ecx, ebx
call fcn.10017f1b
mov eax, dword [ebp - 0x224]
mov dword [ebx + 0x240], eax
mov eax, dword [ebp - 0x218]
test eax, eax
je 0x10016a3f
mov ecx, dword [eax]
lea edx, [ebp - 0x10c]
push 0x100
call fcn.10017659
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.10018194
mov edx, dword [ebp - 0x218]
add esp, 0x18
mov ecx, edi
call fcn.100179f9
push 2
pop esi
cmp dword [ebp - 0x21c], esi
jne 0x10016a70
lea edx, [ebp - 0x188]
lea ecx, [ebp - 0x10c]
call fcn.10030eff
test eax, eax
jle 0x10016a70
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 0x10016a7c
push esi
push str.Couldnt_bind_to__s
push edi
call fcn.10018208
add esp, 0xc
push 0x2d
pop eax
jmp 0x10016b83
mov esi, dword [ebp - 0x214]
push 2
pop eax
cmp dword [ebp - 0x21c], eax
jne 0x10016a76
mov word [ebp - 0x18c], ax
jmp 0x10016a26
mov esi, dword [ebp - 0x214]
mov eax, dword [ebp - 0x210]
push eax
jmp 0x10016ac7
mov eax, dword [ebp - 0x228]
dec eax
mov dword [ebp - 0x228], eax
test eax, eax
jle 0x10016b45
movzx eax, si
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.10018194
add esp, 0xc
inc esi
push 2
pop eax
cmp word [ebp - 0x18c], ax
jne 0x10016ac1
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 0x10016a7f
mov eax, 0x80
push eax
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.1003e9c0
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 0x10016b65
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, ebx
mov edx, esi
mov dword [edi + 0x858c], esi
call fcn.10030e33
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.10018208
add esp, 0x10
jmp 0x10016a4e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, ebx
mov edx, esi
mov dword [edi + 0x858c], esi
call fcn.10030e33
push eax
push esi
push str.bind_failed_with_errno__d:__s
jmp 0x10016b37
movzx eax, si
push eax
push str.Local_port:__hu_n
push edi
call fcn.10018194
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.1003890f
mov esp, ebp
pop ebp
ret