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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, dword [eax]
xor eax, eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
mov ebx, dword [esi + 0x3a0]
mov di, word [esi + 0x178]
mov ecx, dword [esi + 0x17c]
cmp ebx, eax
mov dword [ebp - 4], edi
mov dword [ebp - 0x14], ecx
jne 0x410833
cmp di, ax
je 0x410b1b
push 0x80
push eax
lea eax, [ebp - 0x94]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
test ebx, ebx
je 0x410a20
push ebx
call sub.MSVCRT.dll_strlen
cmp eax, 0xff
pop ecx
jae 0x410a20
mov al, byte [0x429d0c]
push 0x3f
mov byte [ebp - 0x194], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x193]
rep stosd dword es:[edi], eax
push dword [0x4248e8]
and dword [ebp - 0x10], 0
stosw word es:[edi], ax
stosb byte es:[edi], al
call sub.MSVCRT.dll_strlen
mov edi, dword [sym.imp.MSVCRT.dll_strncmp]
push eax
push ebx
push dword [0x4248e8]
call edi
add esp, 0x10
test eax, eax
jne 0x410906
push dword [0x4248e8]
call sub.MSVCRT.dll_strlen
pop ecx
add ebx, eax
mov dword [ebp - 0x10], 1
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x194]
push 0x100
push eax
push ebx
push dword [edi + 0x88]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.00404eeb
xor ecx, ecx
add esp, 0x18
sub eax, ecx
je 0x41093c
dec eax
je 0x410935
dec eax
jne 0x41094c
push dword [ebp + 0x10]
lea eax, [ebp - 0x194]
push eax
push ebx
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push esi
call fcn.0040e1a7
add esp, 0x14
jmp 0x4109dc
push dword [0x4248ec]
call sub.MSVCRT.dll_strlen
push eax
push ebx
push dword [0x4248ec]
call edi
add esp, 0x10
test eax, eax
jne 0x4108b8
push dword [0x4248ec]
call sub.MSVCRT.dll_strlen
mov edi, dword [ebp + 8]
pop ecx
add ebx, eax
jmp 0x410955
push 1
jmp 0x410b48
cmp dword [ebp - 0x10], ecx
je 0x410955
push ebx
push str.Couldnt_bind_to_interface__s
jmp 0x410a12
cmp dword [ebp - 0x10], ecx
jne 0x410a0c
mov eax, dword [edi + 0x334]
cmp dword [ebp + 0x10], 2
mov dword [ebp + 0x14], eax
jne 0x41096e
mov dword [edi + 0x334], 1
lea eax, [ebp - 8]
push eax
push 0
push ebx
push edi
call fcn.00405ded
add esp, 0x10
cmp eax, 1
jne 0x41098f
lea eax, [ebp - 8]
push eax
push edi
call fcn.00404d2a
pop ecx
pop ecx
mov eax, dword [ebp + 0x14]
mov dword [edi + 0x334], eax
mov eax, dword [ebp - 8]
test eax, eax
je 0x410a0c
lea ecx, [ebp - 0x194]
push 0x100
push ecx
push dword [eax]
call fcn.00405b6f
mov eax, dword [ebp - 8]
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [ebp - 0x194]
push eax
push dword [ebp + 0x10]
push ebx
push str.Name__s_family__i_resolved_to__s_family__i_n
push esi
call fcn.0040e1a7
push dword [ebp - 8]
push esi
call fcn.00405f30
add esp, 0x2c
cmp dword [ebp + 0x10], 2
jne 0x410a44
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0x194]
push eax
push 2
call fcn.00413886
add esp, 0xc
test eax, eax
jle 0x410a44
push dword [ebp - 4]
mov word [ebp - 0x94], 2
jmp 0x410a30
push ebx
push str.Couldnt_bind_to__s
push esi
call fcn.0040e1fd
add esp, 0xc
jmp 0x410b46
cmp dword [ebp + 0x10], 2
jne 0x410a44
mov word [ebp - 0x94], 2
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x92], ax
mov dword [ebp - 0xc], 0x10
push dword [ebp - 0xc]
mov edi, dword [sym.imp.WS2_32.dll_bind]
lea eax, [ebp - 0x94]
push eax
push dword [ebp + 0xc]
call edi
test eax, eax
jge 0x410aa9
dec dword [ebp - 0x14]
cmp dword [ebp - 0x14], 0
jle 0x410b1f
movzx eax, word [ebp - 4]
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push esi
call fcn.0040e1a7
add esp, 0xc
inc dword [ebp - 4]
cmp word [ebp - 0x94], 2
jne 0x410a9a
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x92], ax
push dword [ebp - 0xc]
lea eax, [ebp - 0x94]
push eax
push dword [ebp + 0xc]
jmp 0x410a57
mov eax, 0x80
mov dword [ebp + 0x10], eax
push eax
lea eax, [ebp - 0x114]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 0x114]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x410afb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
mov dword [esi + 0x8628], edi
push dword [ebp + 8]
call fcn.00412dfe
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x410b3d
movzx eax, word [ebp - 4]
push eax
push str.Local_port:__hu_n
push esi
call fcn.0040e1a7
mov eax, dword [ebp + 8]
add esp, 0xc
mov dword [eax + 0x304], 1
xor eax, eax
jmp 0x410b49
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
mov dword [esi + 0x8628], edi
push dword [ebp + 8]
call fcn.00412dfe
push eax
push edi
push str.bind_failed_with_errno__d:__s
push esi
call fcn.0040e1fd
add esp, 0x18
push 0x2d
pop eax
pop edi
pop esi
pop ebx
leave
ret