Function at 0x413d81
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 0x413dc1
test bx, bx
je 0x41415c
push 0x80
push ecx
lea eax, [ebp - 0x90]
push eax
call fcn.00437000
add esp, 0xc
push 2
pop ecx
test esi, esi
je 0x414033
push esi
call fcn.0043b7c0
pop ecx
cmp eax, 0xff
jae 0x414030
push 0x100
lea eax, [ebp - 0x190]
push 0
push eax
call fcn.00437000
push dword [0x46c024]
mov byte [ebp + 0xb], 0
call fcn.0043b7c0
push eax
push esi
push dword [0x46c024]
call fcn.004408e0
add esp, 0x1c
test eax, eax
jne 0x413ea3
push dword [0x46c024]
call fcn.0043b7c0
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.0040a79e
add esp, 0x18
sub eax, 0
je 0x413f26
sub eax, 1
je 0x413fda
sub eax, 1
je 0x413ed6
cmp byte [ebp + 0xb], 0
jne 0x41401e
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 0x413f47
mov byte [ecx + 0x100], 1
jmp 0x413f52
push dword [0x46c028]
call fcn.0043b7c0
push eax
push esi
push dword [0x46c028]
call fcn.004408e0
add esp, 0x10
test eax, eax
jne 0x413e3b
push dword [0x46c028]
call fcn.0043b7c0
pop ecx
add esi, eax
jmp 0x413e7d
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.00412a73
mov eax, dword [ebp + 0x10]
add esp, 0x14
push 0x17
pop esi
cmp eax, esi
jne 0x413fe2
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 0x414050
mov word [ebp - 0x90], si
jmp 0x414042
cmp byte [ebp + 0xb], 0
je 0x413e7d
push esi
push str.Couldnt_bind_to_interface__s
push edi
call fcn.004129df
add esp, 0xc
push 0x2d
pop eax
jmp 0x41415e
cmp eax, 0x17
jne 0x413f52
mov byte [ecx + 0x100], dl
lea eax, [ebp - 4]
push eax
push 0
push 0
push esi
push edi
call fcn.004169aa
add esp, 0x14
cmp eax, 1
jne 0x413f75
lea eax, [ebp - 4]
push eax
push edi
call fcn.0040a90a
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 0x41401e
push 0x100
lea ecx, [ebp - 0x190]
push ecx
push dword [eax]
call fcn.0041696a
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.00412a73
push dword [ebp - 4]
push edi
call fcn.00416c04
mov ecx, dword [ebp - 4]
add esp, 0x2c
mov eax, dword [ebp + 0x10]
mov ecx, dword [ecx]
cmp eax, dword [ecx + 4]
je 0x413ef2
xor eax, eax
inc eax
jmp 0x41415e
push 2
pop ecx
cmp eax, ecx
jne 0x414063
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 0x414063
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 0x414052
push esi
mov byte [edi + 0xccf], 0
push str.Couldnt_bind_to__s
jmp 0x413f36
push 2
pop ecx
push 0x17
pop eax
cmp dword [ebp + 0x10], eax
jne 0x414055
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 0x41409b
cmp dword [ebp + 0x10], ecx
jne 0x414063
mov word [ebp - 0x90], cx
jmp 0x41400c
mov esi, dword [ebp - 0xc]
jmp 0x41409b
mov eax, dword [ebp - 0x10]
dec eax
mov dword [ebp - 0x10], eax
test eax, eax
jle 0x414117
movzx eax, bx
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.00412a73
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 0x414068
mov eax, 0x80
push eax
mov dword [ebp + 8], eax
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.00437000
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 0x414140
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.0042c63f
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.004129df
add esp, 0x1c
jmp 0x413f3f
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.0042c63f
push eax
push esi
push str.bind_failed_with_errno__d:__s
jmp 0x414109
movzx eax, bx
push eax
push str.Local_port:__hu_n
push edi
call fcn.00412a73
mov eax, dword [ebp - 8]
add esp, 0xc
mov byte [eax + 0x258], 1
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret