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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x29c
mov eax, dword [0x904fe8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ecx, ecx
mov dword [ebp - 0x28c], ecx
mov dword [ebp - 0x290], ecx
mov eax, dword [edi + 0xc]
mov esi, dword [edi + 0x538]
movzx ebx, word [edi + 0x1a0]
mov dword [ebp - 0x298], eax
mov eax, dword [edi + 0x1a4]
mov dword [ebp - 0x29c], eax
test esi, esi
jne 0x6ce57b
test bx, bx
je 0x6ce9f7
push 0x80
push ecx
lea eax, [ebp - 0x284]
push eax
call fcn.00739c90
add esp, 0xc
push 2
pop ecx
test esi, esi
je 0x6ce89c
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x6ce5a0
sub ecx, edx
cmp ecx, 0xff
jae 0x6ce899
push 0x100
lea eax, [ebp - 0x104]
push 0
push eax
call fcn.00739c90
mov edx, dword [0x904f28]
add esp, 0xc
mov ecx, edx
mov byte [ebp - 0x285], 0
lea eax, [ecx + 1]
mov dword [ebp - 0x294], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x6ce5e3
sub ecx, dword [ebp - 0x294]
push ecx
push esi
push edx
call fcn.0074fcb0
add esp, 0xc
test eax, eax
jne 0x6ce696
mov ecx, dword [0x904f28]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x6ce60c
sub ecx, edx
mov byte [ebp - 0x285], 1
add esi, ecx
mov ecx, dword [ebp - 0x298]
lea eax, [ebp - 0x104]
push 0x100
push eax
push esi
push dword [ecx + 0x5c]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.00407628
add esp, 0x18
sub eax, 0
je 0x6ce76e
sub eax, 1
je 0x6ce83d
sub eax, 1
je 0x6ce6dd
cmp byte [ebp - 0x285], 0
jne 0x6ce887
mov ecx, dword [ebp - 0x298]
push 2
pop edx
mov al, byte [ecx + 0x108]
mov byte [ebp - 0x285], al
mov eax, dword [ebp + 0x10]
cmp eax, edx
jne 0x6ce792
mov byte [ecx + 0x108], 1
jmp 0x6ce79d
mov edx, dword [str.host_]
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x294], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x6ce6a7
sub ecx, dword [ebp - 0x294]
push ecx
push esi
push edx
call fcn.0074fcb0
add esp, 0xc
test eax, eax
jne 0x6ce61e
mov ecx, dword [str.host_]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x6ce6d0
sub ecx, edx
add esi, ecx
jmp 0x6ce66a
push dword [ebp + 0x10]
lea eax, [ebp - 0x104]
push eax
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push edi
call fcn.006cd0b1
mov eax, dword [ebp + 0x10]
add esp, 0x14
cmp eax, 0x17
jne 0x6ce845
lea eax, [ebp - 0x104]
push 0x25
push eax
call fcn.0073a2f0
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x6ce71c
mov byte [esi], 0
inc esi
lea eax, [ebp - 0x27c]
push eax
lea eax, [ebp - 0x104]
push eax
push 0x17
call fcn.006dc6a6
add esp, 0xc
test eax, eax
jle 0x6ce8b9
push 0x17
pop eax
push ebx
mov word [ebp - 0x284], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x282], ax
test esi, esi
je 0x6ce8b9
push esi
call fcn.007494ab
pop ecx
mov dword [ebp - 0x26c], eax
jmp 0x6ce8b9
cmp byte [ebp - 0x285], 0
je 0x6ce66a
push esi
push str.Couldnt_bind_to_interface__s
push edi
call fcn.006cd005
add esp, 0xc
push 0x2d
pop eax
jmp 0x6ce9f9
cmp eax, 0x17
jne 0x6ce79d
mov byte [ecx + 0x108], dl
lea eax, [ebp - 0x290]
push eax
push 0
push 0
push esi
push edi
call fcn.006d18f4
add esp, 0x14
cmp eax, 1
jne 0x6ce7c6
lea eax, [ebp - 0x290]
push eax
push edi
call fcn.006c4eb6
pop ecx
pop ecx
mov ecx, dword [ebp - 0x298]
mov al, byte [ebp - 0x285]
mov byte [ecx + 0x108], al
mov eax, dword [ebp - 0x290]
test eax, eax
je 0x6ce887
push 0x100
lea ecx, [ebp - 0x104]
push ecx
push dword [eax]
call fcn.006d18b4
mov eax, dword [ebp - 0x290]
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 0x10]
push esi
push str.Name__s_family__i_resolved_to__s_family__i_n
push edi
call fcn.006cd0b1
push dword [ebp - 0x290]
push edi
call fcn.006d1b80
mov ecx, dword [ebp - 0x290]
add esp, 0x2c
mov eax, dword [ebp + 0x10]
mov ecx, dword [ecx]
cmp eax, dword [ecx + 4]
je 0x6ce6f9
xor eax, eax
inc eax
jmp 0x6ce9f9
push 2
pop ecx
cmp eax, ecx
jne 0x6ce8d2
lea eax, [ebp - 0x280]
push eax
lea eax, [ebp - 0x104]
push eax
push ecx
call fcn.006dc6a6
add esp, 0xc
test eax, eax
jle 0x6ce8d2
push 2
pop eax
mov word [ebp - 0x284], ax
push ebx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x282], ax
push 0x10
jmp 0x6ce8bb
push esi
mov byte [edi + 0xcb7], 0
push str.Couldnt_bind_to__s
jmp 0x6ce781
push 2
pop ecx
push 0x17
pop eax
cmp dword [ebp + 0x10], eax
jne 0x6ce8c4
push ebx
mov word [ebp - 0x284], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x282], ax
push 0x1c
pop eax
mov dword [ebp - 0x28c], eax
jmp 0x6ce8d8
cmp dword [ebp + 0x10], ecx
jne 0x6ce8d2
mov word [ebp - 0x284], cx
jmp 0x6ce875
mov eax, dword [ebp - 0x28c]
push eax
lea eax, [ebp - 0x284]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x6ce942
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov eax, dword [ebp - 0x29c]
dec eax
mov dword [ebp - 0x29c], eax
test eax, eax
jle 0x6ce9af
movzx eax, bx
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.006cd0b1
add esp, 0xc
inc ebx
push 2
pop eax
push ebx
call esi
push dword [ebp - 0x28c]
mov word [ebp - 0x282], ax
lea eax, [ebp - 0x284]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x6ce8f3
mov eax, 0x80
push eax
mov dword [ebp - 0x294], eax
lea eax, [ebp - 0x84]
push 0
push eax
call fcn.00739c90
add esp, 0xc
lea eax, [ebp - 0x294]
push eax
lea eax, [ebp - 0x84]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x6ce9d8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x204]
push 0x100
push eax
push esi
mov dword [edi + 0x948], esi
call fcn.006c2751
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.006cd005
add esp, 0x1c
jmp 0x6ce78a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x104]
push 0x100
push eax
push esi
mov dword [edi + 0x948], esi
call fcn.006c2751
push eax
push esi
push str.bind_failed_with_errno__d:__s
jmp 0x6ce9a1
movzx eax, bx
push eax
push str.Local_port:__hu_n
push edi
call fcn.006cd0b1
mov eax, dword [ebp - 0x298]
add esp, 0xc
mov byte [eax + 0x264], 1
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.007207bc
leave
ret