Function at 0x413eb2
Capabilities:
Convert ip address from string
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x290
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ecx, ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], ecx
mov eax, dword [edi + 0xc]
mov esi, dword [edi + 0x534]
movzx ebx, word [edi + 0x190]
mov dword [ebp - 8], eax
mov eax, dword [edi + 0x194]
mov dword [ebp - 0x10], eax
test esi, esi
jne 0x413ef2
test bx, bx
je 0x41428d
push 0x80
push ecx
lea eax, [ebp - 0x90]
push eax
call fcn.00437130
add esp, 0xc
push 2
pop ecx
test esi, esi
je 0x414164
push esi
call fcn.0043b900
pop ecx
cmp eax, 0xff
jae 0x414161
push 0x100
lea eax, [ebp - 0x190]
push 0
push eax
call fcn.00437130
push dword [0x46c024]
mov byte [ebp + 0xb], 0
call fcn.0043b900
push eax
push esi
push dword [0x46c024]
call fcn.00440a20
add esp, 0x1c
test eax, eax
jne 0x413fd4
push dword [0x46c024]
call fcn.0043b900
pop ecx
add esi, eax
mov byte [ebp + 0xb], 1
push 0x100
lea eax, [ebp - 0x190]
push eax
mov eax, dword [ebp - 8]
push esi
push dword [eax + 0x54]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.0040a8ce
add esp, 0x18
sub eax, 0
je 0x414057
sub eax, 1
je 0x41410b
sub eax, 1
je 0x414007
cmp byte [ebp + 0xb], 0
jne 0x41414f
mov ecx, dword [ebp - 8]
push 2
pop edx
mov al, byte [ecx + 0x100]
mov byte [ebp + 0xb], al
mov eax, dword [ebp + 0x10]
cmp eax, edx
jne 0x414078
mov byte [ecx + 0x100], 1
jmp 0x414083
push dword [0x46c028]
call fcn.0043b900
push eax
push esi
push dword [0x46c028]
call fcn.00440a20
add esp, 0x10
test eax, eax
jne 0x413f6c
push dword [0x46c028]
call fcn.0043b900
pop ecx
add esi, eax
jmp 0x413fae
push dword [ebp + 0x10]
lea eax, [ebp - 0x190]
push eax
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push edi
call fcn.00412ba4
mov eax, dword [ebp + 0x10]
add esp, 0x14
push 0x17
pop esi
cmp eax, esi
jne 0x414113
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x190]
push eax
push esi
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x414181
mov word [ebp - 0x90], si
jmp 0x414173
cmp byte [ebp + 0xb], 0
je 0x413fae
push esi
push str.Couldnt_bind_to_interface__s
push edi
call fcn.00412b10
add esp, 0xc
push 0x2d
pop eax
jmp 0x41428f
cmp eax, 0x17
jne 0x414083
mov byte [ecx + 0x100], dl
lea eax, [ebp - 4]
push eax
push 0
push 0
push esi
push edi
call fcn.00416adb
add esp, 0x14
cmp eax, 1
jne 0x4140a6
lea eax, [ebp - 4]
push eax
push edi
call fcn.0040aa3a
pop ecx
pop ecx
mov eax, dword [ebp - 8]
mov cl, byte [ebp + 0xb]
mov byte [eax + 0x100], cl
mov eax, dword [ebp - 4]
test eax, eax
je 0x41414f
push 0x100
lea ecx, [ebp - 0x190]
push ecx
push dword [eax]
call fcn.00416a9b
mov eax, dword [ebp - 4]
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [ebp - 0x190]
push eax
push dword [ebp + 0x10]
push esi
push str.Name__s_family__i_resolved_to__s_family__i_n
push edi
call fcn.00412ba4
push dword [ebp - 4]
push edi
call fcn.00416d35
mov ecx, dword [ebp - 4]
add esp, 0x2c
mov eax, dword [ebp + 0x10]
mov ecx, dword [ecx]
cmp eax, dword [ecx + 4]
je 0x414023
xor eax, eax
inc eax
jmp 0x41428f
push 2
pop ecx
cmp eax, ecx
jne 0x414194
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0x190]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x414194
push 2
pop eax
mov word [ebp - 0x90], ax
push ebx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x8e], ax
push 0x10
jmp 0x414183
push esi
mov byte [edi + 0xccf], 0
push str.Couldnt_bind_to__s
jmp 0x414067
push 2
pop ecx
push 0x17
pop eax
cmp dword [ebp + 0x10], eax
jne 0x414186
mov word [ebp - 0x90], ax
push ebx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x8e], ax
push 0x1c
pop esi
jmp 0x4141cc
cmp dword [ebp + 0x10], ecx
jne 0x414194
mov word [ebp - 0x90], cx
jmp 0x41413d
mov esi, dword [ebp - 0xc]
jmp 0x4141cc
mov eax, dword [ebp - 0x10]
dec eax
mov dword [ebp - 0x10], eax
test eax, eax
jle 0x414248
movzx eax, bx
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.00412ba4
add esp, 0xc
inc ebx
push 2
pop eax
push ebx
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x8e], ax
push esi
lea eax, [ebp - 0x90]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x414199
mov eax, 0x80
push eax
mov dword [ebp + 8], eax
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.00437130
add esp, 0xc
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x110]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x414271
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x290]
push 0x100
push eax
push esi
mov dword [edi + 0x93c], esi
call fcn.0042c76d
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.00412b10
add esp, 0x1c
jmp 0x414070
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x190]
push 0x100
push eax
push esi
mov dword [edi + 0x93c], esi
call fcn.0042c76d
push eax
push esi
push str.bind_failed_with_errno__d:__s
jmp 0x41423a
movzx eax, bx
push eax
push str.Local_port:__hu_n
push edi
call fcn.00412ba4
mov eax, dword [ebp - 8]
add esp, 0xc
mov byte [eax + 0x258], 1
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret