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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a0
mov eax, dword [0x8d5f40]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x290], ebx
mov dword [ebp - 0x28c], ebx
mov eax, dword [edi + 0xc]
mov esi, dword [edi + 0x538]
mov ecx, dword [edi + 0x1a4]
mov dword [ebp - 0x298], eax
movzx eax, word [edi + 0x1a0]
mov dword [ebp - 0x294], eax
mov dword [ebp - 0x2a0], ecx
test esi, esi
jne 0x6ad283
test ax, ax
je 0x6ad637
push 0x80
lea eax, [ebp - 0x284]
push ebx
push eax
call fcn.00718210
add esp, 0xc
test esi, esi
je 0x6ad50a
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x6ad2a5
sub ecx, edx
cmp ecx, 0xff
jae 0x6ad50a
push 0x100
lea eax, [ebp - 0x104]
push ebx
push eax
call fcn.00718210
mov edx, dword [0x8d5e80]
add esp, 0xc
mov ecx, edx
mov byte [ebp - 0x285], bl
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x6ad2e0
sub ecx, ebx
push ecx
push esi
push edx
call fcn.0072e230
add esp, 0xc
push 2
pop ebx
test eax, eax
jne 0x6ad428
mov ecx, dword [0x8d5e80]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x6ad308
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.004072b0
add esp, 0x18
sub eax, 0
je 0x6ad4d7
sub eax, 1
je 0x6ad420
sub eax, 1
je 0x6ad472
cmp byte [ebp - 0x285], 0
jne 0x6ad4fb
mov ecx, dword [ebp - 0x298]
mov al, byte [ecx + 0x108]
mov byte [ebp - 0x285], al
cmp dword [ebp + 0x10], ebx
jne 0x6ad384
mov byte [ecx + 0x108], 1
lea eax, [ebp - 0x28c]
push eax
push 0
push 0
push esi
push edi
call fcn.006b04e2
add esp, 0x14
cmp eax, 1
jne 0x6ad3ad
lea eax, [ebp - 0x28c]
push eax
push edi
call fcn.006a3c9d
pop ecx
pop ecx
mov ecx, dword [ebp - 0x298]
mov al, byte [ebp - 0x285]
mov byte [ecx + 0x108], al
mov eax, dword [ebp - 0x28c]
test eax, eax
je 0x6ad4fb
push 0x100
lea ecx, [ebp - 0x104]
push ecx
push dword [eax]
call fcn.006b04b6
mov eax, dword [ebp - 0x28c]
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.006abe00
push dword [ebp - 0x28c]
push edi
call fcn.006b0719
mov ecx, dword [ebp - 0x28c]
add esp, 0x2c
mov eax, dword [ebp + 0x10]
mov ecx, dword [ecx]
cmp eax, dword [ecx + 4]
je 0x6ad48e
xor eax, eax
inc eax
jmp 0x6ad639
mov edx, dword [str.host_]
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x29c], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x6ad439
sub ecx, dword [ebp - 0x29c]
push ecx
push esi
push edx
call fcn.0072e230
add esp, 0xc
test eax, eax
jne 0x6ad31a
mov ecx, dword [str.host_]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x6ad462
sub ecx, edx
add esi, ecx
jmp 0x6ad366
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.006abe00
mov eax, dword [ebp + 0x10]
add esp, 0x14
cmp eax, ebx
jne 0x6ad51a
lea eax, [ebp - 0x280]
push eax
lea eax, [ebp - 0x104]
push eax
push ebx
call fcn.006bb1d1
mov esi, dword [ebp - 0x294]
add esp, 0xc
test eax, eax
jle 0x6ad520
push esi
mov word [ebp - 0x284], bx
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
mov word [ebp - 0x282], ax
pop eax
mov dword [ebp - 0x290], eax
jmp 0x6ad526
cmp byte [ebp - 0x285], 0
je 0x6ad366
push esi
push str.Couldnt_bind_to_interface__s
push edi
call fcn.006abd54
add esp, 0xc
push 0x2d
pop eax
jmp 0x6ad639
push esi
mov byte [edi + 0xcb7], 0
push str.Couldnt_bind_to__s
jmp 0x6ad4ea
mov esi, dword [ebp - 0x294]
push 2
pop ebx
cmp dword [ebp + 0x10], ebx
jne 0x6ad520
jmp 0x6ad4b7
mov esi, dword [ebp - 0x294]
mov eax, dword [ebp - 0x290]
push eax
jmp 0x6ad56e
mov eax, dword [ebp - 0x2a0]
dec eax
mov dword [ebp - 0x2a0], eax
test eax, eax
jle 0x6ad5ef
movzx eax, si
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.006abe00
add esp, 0xc
inc esi
cmp word [ebp - 0x284], bx
jne 0x6ad568
push esi
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x282], ax
push dword [ebp - 0x290]
lea eax, [ebp - 0x284]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x6ad529
mov eax, 0x80
push eax
mov dword [ebp - 0x29c], eax
lea eax, [ebp - 0x84]
push 0
push eax
call fcn.00718210
add esp, 0xc
lea eax, [ebp - 0x29c]
push eax
lea eax, [ebp - 0x84]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x6ad618
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.006a1591
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.006abd54
add esp, 0x1c
jmp 0x6ad4f3
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.006a1591
push eax
push esi
push str.bind_failed_with_errno__d:__s
jmp 0x6ad5e1
movzx eax, si
push eax
push str.Local_port:__hu_n
push edi
call fcn.006abe00
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.006fedff
leave
ret