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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x19c
mov eax, dword [0x100b5350]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
xor edx, edx
push edi
mov edi, dword [ebx]
mov dword [ebp - 0x194], edx
movzx eax, word [edi + 0x1b8]
mov esi, dword [edi + 0x474]
mov ecx, dword [edi + 0x1bc]
mov dword [ebp - 0x18c], edx
mov dword [ebp - 0x190], eax
mov dword [ebp - 0x19c], ecx
test esi, esi
jne 0x10047a16
test ax, ax
je 0x10047d9f
push 0x80
push edx
lea eax, [ebp - 0x184]
push eax
call fcn.10073290
add esp, 0xc
test esi, esi
je 0x10047c81
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10047a38
sub ecx, edx
mov eax, 0xff
cmp ecx, eax
jae 0x10047c81
push eax
lea eax, [ebp - 0x103]
push 0
push eax
mov byte [ebp - 0x104], 0
call fcn.10073290
mov edx, dword [0x100b5014]
mov ecx, edx
add esp, 0xc
and dword [ebp - 0x198], 0
lea eax, [ecx + 1]
mov dword [ebp - 0x188], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10047a7f
sub ecx, dword [ebp - 0x188]
push ecx
push esi
push edx
call fcn.100741c0
add esp, 0xc
test eax, eax
jne 0x10047b0f
mov ecx, dword [0x100b5014]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10047aa4
sub ecx, edx
add esi, ecx
mov dword [ebp - 0x198], 1
push 0x100
lea eax, [ebp - 0x104]
push eax
push esi
push dword [ebx + 0x90]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.1006503c
add esp, 0x18
sub eax, 0
je 0x10047c5d
dec eax
je 0x10047c55
dec eax
jne 0x10047c40
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.100468bd
add esp, 0x14
jmp 0x10047bf4
mov edx, dword [str.host_]
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x188], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10047b20
sub ecx, dword [ebp - 0x188]
push ecx
push esi
push edx
call fcn.100741c0
add esp, 0xc
test eax, eax
jne 0x10047ab9
mov ecx, dword [str.host_]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10047b49
sub ecx, edx
add esi, ecx
cmp dword [ebp + 0x10], 2
mov eax, dword [ebx + 0x478]
mov dword [ebp - 0x188], eax
jne 0x10047b70
mov dword [ebx + 0x478], 1
lea eax, [ebp - 0x194]
push eax
push 0
push esi
push ebx
call fcn.1003e7bf
add esp, 0x10
cmp eax, 1
jne 0x10047b97
lea eax, [ebp - 0x194]
push eax
push ebx
call fcn.1003dfa4
pop ecx
pop ecx
mov eax, dword [ebp - 0x188]
mov dword [ebx + 0x478], eax
mov eax, dword [ebp - 0x194]
test eax, eax
je 0x10047c4d
push 0x100
lea ecx, [ebp - 0x104]
push ecx
push dword [eax]
call fcn.1003e795
mov eax, dword [ebp - 0x194]
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.100468bd
push dword [ebp - 0x194]
push edi
call fcn.1003e90a
add esp, 0x2c
push 2
pop esi
cmp dword [ebp + 0x10], esi
jne 0x10047c89
lea eax, [ebp - 0x180]
push eax
lea eax, [ebp - 0x104]
push eax
push esi
call fcn.1005100f
add esp, 0xc
test eax, eax
jle 0x10047c89
push dword [ebp - 0x190]
mov word [ebp - 0x184], si
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
mov word [ebp - 0x182], ax
pop eax
mov dword [ebp - 0x18c], eax
jmp 0x10047c8f
cmp dword [ebp - 0x198], 0
je 0x10047b54
push esi
push str.Couldnt_bind_to__s
jmp 0x10047c70
xor eax, eax
inc eax
jmp 0x10047da1
cmp dword [ebp - 0x198], 0
je 0x10047b54
push esi
push str.Couldnt_bind_to_interface__s
push edi
call fcn.10046801
add esp, 0xc
push 0x2d
pop eax
jmp 0x10047da1
push 2
pop esi
cmp dword [ebp + 0x10], esi
je 0x10047c1b
mov eax, dword [ebp - 0x18c]
push eax
jmp 0x10047ce9
mov eax, dword [ebp - 0x19c]
dec eax
mov dword [ebp - 0x19c], eax
test eax, eax
jle 0x10047d5f
mov eax, dword [ebp - 0x190]
movzx eax, ax
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.100468bd
mov eax, dword [ebp - 0x190]
add esp, 0xc
inc eax
mov dword [ebp - 0x190], eax
cmp word [ebp - 0x184], si
jne 0x10047ce3
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x182], ax
push dword [ebp - 0x18c]
lea eax, [ebp - 0x184]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x10047c92
mov eax, 0x80
push eax
mov dword [ebp - 0x188], eax
lea eax, [ebp - 0x84]
push 0
push eax
call fcn.10073290
add esp, 0xc
lea eax, [ebp - 0x188]
push eax
lea eax, [ebp - 0x84]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x10047d7d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebx
mov dword [edi + 0x47e4], esi
call fcn.10052f6d
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.10046801
add esp, 0x18
jmp 0x10047c79
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebx
mov dword [edi + 0x47e4], esi
call fcn.10052f6d
push eax
push esi
push str.bind_failed_with_errno__d:__s
jmp 0x10047d51
mov eax, dword [ebp - 0x190]
movzx eax, ax
push eax
push str.Local_port:__hu_n
push edi
call fcn.100468bd
add esp, 0xc
mov dword [ebx + 0x42c], 1
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100704e7
leave
ret