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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x47c
push esi
push edi
lea edi, [ebp - 0x47c]
mov ecx, 0x11f
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x7a3104]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 8], ecx
lea edx, [ebp - 0x8c]
mov dword [ebp - 0x94], edx
mov dword [ebp - 0x98], 0
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x9c], eax
lea ecx, [ebp - 0x8c]
mov dword [ebp - 0xa0], ecx
mov dword [ebp - 0xa8], 0
mov edx, dword [ebp + 8]
mov ax, word [edx + 0x1a0]
mov word [ebp - 0xb0], ax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x1a4]
mov dword [ebp - 0xb4], edx
mov eax, 4
shl eax, 3
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + eax + 0x524]
mov dword [ebp - 0xb8], edx
cmp dword [ebp - 0xb8], 0
jne 0x59d66b
movzx eax, word [ebp - 0xb0]
test eax, eax
jne 0x59d66b
xor eax, eax
jmp 0x59dd44
push 0x80
push 0
lea ecx, [ebp - 0x8c]
push ecx
call fcn.00515250
add esp, 0xc
cmp dword [ebp - 0xb8], 0
je 0x59dacf
mov edx, dword [ebp - 0xb8]
push edx
call fcn.00519bbb
add esp, 4
cmp eax, 0xff
jae 0x59dacf
mov al, byte [0x7a57dc]
mov byte [ebp - 0x1c0], al
push 0xff
push 0
lea ecx, [ebp - 0x1bf]
push ecx
call fcn.00515250
add esp, 0xc
mov dword [ebp - 0x1c8], 0
mov byte [ebp - 0x1c9], 0
mov byte [ebp - 0x1ca], 0
mov edx, dword [0x7977ac]
push edx
call fcn.00519bbb
add esp, 4
push eax
mov eax, dword [ebp - 0xb8]
push eax
mov ecx, dword [0x7977ac]
push ecx
call fcn.0051a480
add esp, 0xc
test eax, eax
jne 0x59d72f
mov edx, dword [0x7977ac]
push edx
call fcn.00519bbb
add esp, 4
add eax, dword [ebp - 0xb8]
mov dword [ebp - 0xb8], eax
mov byte [ebp - 0x1c9], 1
jmp 0x59d779
mov eax, dword [str.host_]
push eax
call fcn.00519bbb
add esp, 4
push eax
mov ecx, dword [ebp - 0xb8]
push ecx
mov edx, dword [str.host_]
push edx
call fcn.0051a480
add esp, 0xc
test eax, eax
jne 0x59d779
mov eax, dword [str.host_]
push eax
call fcn.00519bbb
add esp, 4
add eax, dword [ebp - 0xb8]
mov dword [ebp - 0xb8], eax
mov byte [ebp - 0x1ca], 1
movzx ecx, byte [ebp - 0x1ca]
test ecx, ecx
jne 0x59d842
push 0x100
lea edx, [ebp - 0x1c0]
push edx
mov eax, dword [ebp - 0xb8]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x5c]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.0051229e
add esp, 0x18
mov dword [ebp - 0x47c], eax
cmp dword [ebp - 0x47c], 0
je 0x59d7d5
cmp dword [ebp - 0x47c], 1
je 0x59d804
cmp dword [ebp - 0x47c], 2
je 0x59d80e
jmp 0x59d842
movzx edx, byte [ebp - 0x1c9]
test edx, edx
je 0x59d802
mov eax, dword [ebp - 0xb8]
push eax
push str.Couldnt_bind_to_interface__s
mov ecx, dword [ebp + 8]
push ecx
call fcn.00518f9a
add esp, 0xc
mov eax, 0x2d
jmp 0x59dd44
jmp 0x59d842
mov eax, 1
jmp 0x59dd44
mov byte [ebp - 0x1c9], 1
mov edx, dword [ebp + 0x10]
push edx
lea eax, [ebp - 0x1c0]
push eax
mov ecx, dword [ebp - 0xb8]
push ecx
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
mov edx, dword [ebp + 8]
push edx
call fcn.00514800
add esp, 0x14
mov dword [ebp - 0x1c8], 1
movzx eax, byte [ebp - 0x1c9]
test eax, eax
jne 0x59d96d
mov ecx, dword [ebp - 8]
mov dl, byte [ecx + 0x108]
mov byte [ebp - 0x1cb], dl
cmp dword [ebp + 0x10], 2
jne 0x59d872
mov eax, dword [ebp - 8]
mov byte [eax + 0x108], 1
jmp 0x59d882
cmp dword [ebp + 0x10], 0x17
jne 0x59d882
mov ecx, dword [ebp - 8]
mov byte [ecx + 0x108], 2
lea edx, [ebp - 0xa8]
push edx
push 0
push 0
mov eax, dword [ebp - 0xb8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00519ae4
add esp, 0x14
mov dword [ebp - 0x1d0], eax
cmp dword [ebp - 0x1d0], 1
jne 0x59d8c2
lea edx, [ebp - 0xa8]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0051a124
add esp, 8
mov ecx, dword [ebp - 8]
mov dl, byte [ebp - 0x1cb]
mov byte [ecx + 0x108], dl
cmp dword [ebp - 0xa8], 0
je 0x59d963
push 0x100
lea eax, [ebp - 0x1c0]
push eax
mov ecx, dword [ebp - 0xa8]
mov edx, dword [ecx]
push edx
call fcn.005194d6
add esp, 0xc
mov eax, dword [ebp - 0xa8]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push edx
lea eax, [ebp - 0x1c0]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0xb8]
push edx
push str.Name__s_family__i_resolved_to__s_family__i_n
mov eax, dword [ebp + 8]
push eax
call fcn.00514800
add esp, 0x18
mov ecx, dword [ebp - 0xa8]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00513ec8
add esp, 8
mov eax, dword [ebp - 0xa8]
mov ecx, dword [eax]
mov edx, dword [ebp + 0x10]
cmp edx, dword [ecx + 4]
je 0x59d957
mov eax, 1
jmp 0x59dd44
mov dword [ebp - 0x1c8], 1
jmp 0x59d96d
mov dword [ebp - 0x1c8], 0xffffffff
cmp dword [ebp - 0x1c8], 0
jle 0x59da95
cmp dword [ebp + 0x10], 0x17
jne 0x59da37
push 0x25
lea eax, [ebp - 0x1c0]
push eax
call fcn.005136b7
add esp, 8
mov dword [ebp - 0x1d4], eax
cmp dword [ebp - 0x1d4], 0
je 0x59d9bc
mov ecx, dword [ebp - 0x1d4]
mov byte [ecx], 0
mov edx, dword [ebp - 0x1d4]
add edx, 1
mov dword [ebp - 0x1d4], edx
mov eax, dword [ebp - 0xa0]
add eax, 8
push eax
lea ecx, [ebp - 0x1c0]
push ecx
push 0x17
call fcn.00513c75
add esp, 0xc
test eax, eax
jle 0x59da2b
mov edx, 0x17
mov eax, dword [ebp - 0xa0]
mov word [eax], dx
mov esi, esp
movzx ecx, word [ebp - 0xb0]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
cmp esi, esp
call fcn.00516fe7
mov edx, dword [ebp - 0xa0]
mov word [edx + 2], ax
cmp dword [ebp - 0x1d4], 0
je 0x59da2b
mov eax, dword [ebp - 0x1d4]
push eax
call fcn.00514882
add esp, 4
mov ecx, dword [ebp - 0xa0]
mov dword [ecx + 0x18], eax
mov dword [ebp - 0x98], 0x1c
jmp 0x59da95
cmp dword [ebp + 0x10], 2
jne 0x59da95
mov edx, dword [ebp - 0x9c]
add edx, 4
push edx
lea eax, [ebp - 0x1c0]
push eax
push 2
call fcn.00513c75
add esp, 0xc
test eax, eax
jle 0x59da95
mov ecx, 2
mov edx, dword [ebp - 0x9c]
mov word [edx], cx
mov esi, esp
movzx eax, word [ebp - 0xb0]
push eax
call dword [sym.imp.WS2_32.dll_htons]
cmp esi, esp
call fcn.00516fe7
mov ecx, dword [ebp - 0x9c]
mov word [ecx + 2], ax
mov dword [ebp - 0x98], 0x10
cmp dword [ebp - 0x1c8], 1
jge 0x59daca
mov edx, dword [ebp + 8]
mov byte [edx + 0xcc7], 0
mov eax, dword [ebp - 0xb8]
push eax
push str.Couldnt_bind_to__s
mov ecx, dword [ebp + 8]
push ecx
call fcn.00518f9a
add esp, 0xc
mov eax, 0x2d
jmp 0x59dd44
jmp 0x59db4f
cmp dword [ebp + 0x10], 0x17
jne 0x59db10
mov edx, 0x17
mov eax, dword [ebp - 0xa0]
mov word [eax], dx
mov esi, esp
movzx ecx, word [ebp - 0xb0]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
cmp esi, esp
call fcn.00516fe7
mov edx, dword [ebp - 0xa0]
mov word [edx + 2], ax
mov dword [ebp - 0x98], 0x1c
jmp 0x59db4f
cmp dword [ebp + 0x10], 2
jne 0x59db4f
mov eax, 2
mov ecx, dword [ebp - 0x9c]
mov word [ecx], ax
mov esi, esp
movzx edx, word [ebp - 0xb0]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp esi, esp
call fcn.00516fe7
mov ecx, dword [ebp - 0x9c]
mov word [ecx + 2], ax
mov dword [ebp - 0x98], 0x10
mov esi, esp
mov edx, dword [ebp - 0x98]
push edx
mov eax, dword [ebp - 0x94]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_bind]
cmp esi, esp
call fcn.00516fe7
test eax, eax
jl 0x59dc49
mov dword [ebp - 0x264], 0x80
push 0x80
push 0
lea edx, [ebp - 0x258]
push edx
call fcn.00515250
add esp, 0xc
mov esi, esp
lea eax, [ebp - 0x264]
push eax
lea ecx, [ebp - 0x258]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_getsockname]
cmp esi, esp
call fcn.00516fe7
test eax, eax
jge 0x59dc1f
mov esi, esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, esp
call fcn.00516fe7
mov dword [ebp - 0xbc], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xbc]
mov dword [eax + 0x958], ecx
push 0x100
lea edx, [ebp - 0x36c]
push edx
mov eax, dword [ebp - 0xbc]
push eax
call fcn.00514f4e
add esp, 0xc
push eax
mov ecx, dword [ebp - 0xbc]
push ecx
push 0x797854
mov edx, dword [ebp + 8]
push edx
call fcn.00518f9a
add esp, 0x10
mov eax, 0x2d
jmp 0x59dd44
movzx eax, word [ebp - 0xb0]
push eax
push str.Local_port:__hu_n
mov ecx, dword [ebp + 8]
push ecx
call fcn.00514800
add esp, 0xc
mov edx, dword [ebp - 8]
mov byte [edx + 0x268], 1
xor eax, eax
jmp 0x59dd44
mov eax, dword [ebp - 0xb4]
sub eax, 1
mov dword [ebp - 0xb4], eax
cmp dword [ebp - 0xb4], 0
jle 0x59dce0
movzx ecx, word [ebp - 0xb0]
push ecx
push str.Bind_to_local_port__hu_failed__trying_next_n
mov edx, dword [ebp + 8]
push edx
call fcn.00514800
add esp, 0xc
mov ax, word [ebp - 0xb0]
add ax, 1
mov word [ebp - 0xb0], ax
mov ecx, dword [ebp - 0x94]
movzx edx, word [ecx]
cmp edx, 2
jne 0x59dcbd
mov esi, esp
movzx eax, word [ebp - 0xb0]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
cmp esi, esp
call fcn.00516fe7
mov ecx, dword [ebp - 0x9c]
mov word [ecx + 2], ax
jmp 0x59dcde
mov esi, esp
movzx edx, word [ebp - 0xb0]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
cmp esi, esp
call fcn.00516fe7
mov ecx, dword [ebp - 0xa0]
mov word [ecx + 2], ax
jmp 0x59dce2
jmp 0x59dce7
jmp 0x59db4f
mov esi, esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, esp
call fcn.00516fe7
mov dword [ebp - 0xbc], eax
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0xbc]
mov dword [edx + 0x958], eax
push 0x100
lea ecx, [ebp - 0x474]
push ecx
mov edx, dword [ebp - 0xbc]
push edx
call fcn.00514f4e
add esp, 0xc
push eax
mov eax, dword [ebp - 0xbc]
push eax
push str.bind_failed_with_errno__d:__s
mov ecx, dword [ebp + 8]
push ecx
call fcn.00518f9a
add esp, 0x10
mov eax, 0x2d
push edx
mov ecx, ebp
push eax
lea edx, [0x59dd74]
call fcn.005163b2
pop eax
pop edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005150f7
add esp, 0x47c
cmp ebp, esp
call fcn.00516fe7
mov esp, ebp
pop ebp
ret