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

Disassembly:
sub esp, 0x194
mov eax, dword [0x100a5688]
xor eax, esp
mov dword [esp + 0x190], eax
push ebx
mov ebx, dword [esp + 0x19c]
push ebp
push esi
xor ecx, ecx
push edi
mov edi, dword [ebx]
mov dword [esp + 0x18], ecx
mov esi, dword [edi + 0x474]
mov eax, dword [edi + 0x1bc]
movzx ebp, word [edi + 0x1b8]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], eax
test esi, esi
jne 0x100317cf
test bp, bp
je 0x10031b00
push 0x80
push ecx
lea eax, [esp + 0x28]
push eax
call fcn.10059510
add esp, 0xc
test esi, esi
je 0x100319fe
push esi
call fcn.100596a0
pop ecx
mov ecx, 0xff
cmp eax, ecx
jae 0x100319fe
push ecx
lea eax, [esp + 0xa5]
push 0
push eax
mov byte [esp + 0xac], 0
call fcn.10059510
push dword [0x100a5354]
and dword [esp + 0x24], 0
call fcn.100596a0
push eax
push esi
push dword [0x100a5354]
call fcn.1005c3f0
add esp, 0x1c
test eax, eax
jne 0x100318b4
push dword [0x100a5354]
call fcn.100596a0
pop ecx
add esi, eax
mov dword [esp + 0x14], 1
push 0x100
lea eax, [esp + 0xa4]
push eax
push esi
push dword [ebx + 0x90]
push dword [esp + 0x1c4]
push dword [esp + 0x1c4]
call fcn.100330fc
add esp, 0x18
sub eax, 0
je 0x100319dc
dec eax
je 0x100319d4
dec eax
jne 0x100319c1
push dword [esp + 0x1b0]
lea eax, [esp + 0xa4]
push eax
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push edi
call fcn.10030603
add esp, 0x14
jmp 0x10031981
push dword [0x100a5358]
call fcn.100596a0
push eax
push esi
push dword [0x100a5358]
call fcn.1005c3f0
add esp, 0x10
test eax, eax
jne 0x10031850
push dword [0x100a5358]
call fcn.100596a0
pop ecx
add esi, eax
cmp dword [esp + 0x1b0], 2
mov eax, dword [ebx + 0x478]
mov dword [esp + 0x14], eax
jne 0x10031903
mov dword [ebx + 0x478], 1
lea eax, [esp + 0x18]
push eax
push 0
push esi
push ebx
call fcn.100283f3
add esp, 0x10
cmp eax, 1
jne 0x10031926
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.10027c26
pop ecx
pop ecx
mov eax, dword [esp + 0x14]
mov dword [ebx + 0x478], eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x100319cc
push 0x100
lea ecx, [esp + 0xa4]
push ecx
push dword [eax]
call fcn.100283cb
mov eax, dword [esp + 0x24]
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [esp + 0xb0]
push eax
push dword [esp + 0x1c4]
push esi
push str.Name__s_family__i_resolved_to__s_family__i_n
push edi
call fcn.10030603
push dword [esp + 0x3c]
push edi
call fcn.10028549
add esp, 0x2c
push 2
pop esi
cmp dword [esp + 0x1b0], esi
jne 0x10031a0a
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0xa4]
push eax
push esi
call fcn.1003ad62
add esp, 0xc
test eax, eax
jle 0x10031a0a
push ebp
mov word [esp + 0x24], si
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
mov word [esp + 0x26], ax
pop eax
mov dword [esp + 0x10], eax
jmp 0x10031a0e
cmp dword [esp + 0x14], 0
je 0x100318e5
push esi
push str.Couldnt_bind_to__s
jmp 0x100319ed
xor eax, eax
inc eax
jmp 0x10031b02
cmp dword [esp + 0x14], 0
je 0x100318e5
push esi
push str.Couldnt_bind_to_interface__s
push edi
call fcn.1003054c
add esp, 0xc
push 0x2d
pop eax
jmp 0x10031b02
push 2
pop esi
cmp dword [esp + 0x1b0], esi
je 0x100319a7
mov eax, dword [esp + 0x10]
push eax
jmp 0x10031a4c
mov eax, dword [esp + 0x1c]
dec eax
mov dword [esp + 0x1c], eax
test eax, eax
jle 0x10031ac6
movzx eax, bp
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.10030603
add esp, 0xc
inc ebp
cmp word [esp + 0x20], si
jne 0x10031a48
push ebp
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [esp + 0x22], ax
push dword [esp + 0x10]
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x1b4]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x10031a11
mov eax, 0x80
push eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0xa4]
push 0
push eax
call fcn.10059510
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0xa4]
push eax
push dword [esp + 0x1b4]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x10031ae4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebx
mov dword [edi + 0x47e4], esi
call fcn.1003cb1a
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.1003054c
add esp, 0x18
jmp 0x100319f6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebx
mov dword [edi + 0x47e4], esi
call fcn.1003cb1a
push eax
push esi
push str.bind_failed_with_errno__d:__s
jmp 0x10031ab8
movzx eax, bp
push eax
push str.Local_port:__hu_n
push edi
call fcn.10030603
add esp, 0xc
mov dword [ebx + 0x42c], 1
xor eax, eax
mov ecx, dword [esp + 0x1a0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1005ae75
add esp, 0x194
ret