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

Disassembly:
sub esp, 0x19c
mov eax, dword [0x5d6c64]
xor eax, esp
mov dword [esp + 0x198], eax
mov eax, dword [esp + 0x1a0]
push ebx
push ebp
push esi
xor ebp, ebp
push edi
mov edi, dword [eax]
mov dword [esp + 0x14], ebp
movzx ebx, word [edi + 0x1c0]
mov esi, dword [edi + 0x3e8]
mov dword [esp + 0x10], eax
mov eax, dword [edi + 0x1c4]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], eax
cmp esi, ebp
jne 0x477157
cmp bx, bp
je 0x4774be
push 0x80
lea ecx, [esp + 0x2c]
push ebp
push ecx
call sub.MSVCR100.dll_memset
add esp, 0xc
cmp esi, ebp
je 0x47746d
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x477177
sub eax, edx
cmp eax, 0xff
jae 0x47746d
push 0xff
lea edx, [esp + 0xad]
push ebp
push edx
mov byte [esp + 0xb4], cl
call sub.MSVCR100.dll_memset
mov edx, dword [0x5e1068]
mov eax, edx
mov dword [esp + 0x24], ebp
add esp, 0xc
lea ebp, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4771b7
sub eax, ebp
mov ebp, dword [sym.imp.MSVCR100.dll_strncmp]
push eax
push esi
push edx
call ebp
add esp, 0xc
test eax, eax
jne 0x4771f2
mov eax, dword [0x5e1068]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4771e0
sub eax, edx
add esi, eax
mov ebx, 1
jmp 0x47723b
mov edx, dword [str.host_]
mov eax, edx
lea ebx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x477200
sub eax, ebx
push eax
push esi
push edx
call ebp
add esp, 0xc
test eax, eax
jne 0x477237
mov eax, dword [str.host_]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x477220
mov ebp, dword [esp + 0x1b8]
sub eax, edx
add esi, eax
jmp 0x4772be
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x88]
mov ebp, dword [esp + 0x1b8]
push 0x100
lea eax, [esp + 0xac]
push eax
mov eax, dword [esp + 0x1c4]
push esi
push edx
push eax
push ebp
call fcn.004d19c0
add esp, 0x18
sub eax, 0
je 0x47729e
dec eax
je 0x477294
dec eax
jne 0x4772b6
push ebp
lea ecx, [esp + 0xac]
push ecx
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push edi
call fcn.00474a10
add esp, 0x14
jmp 0x477357
mov eax, 1
jmp 0x4774f0
test ebx, ebx
je 0x4772be
push esi
push str.Couldnt_bind_to_interface__s
push edi
call fcn.00474aa0
add esp, 0xc
jmp 0x4774eb
test ebx, ebx
jne 0x47745c
mov ebx, dword [esp + 0x10]
mov edx, dword [ebx + 0x270]
mov dword [esp + 0x18], edx
cmp ebp, 2
jne 0x4772db
mov dword [ebx + 0x270], 1
lea eax, [esp + 0x14]
push eax
push 0
push esi
push ebx
call fcn.0046db50
add esp, 0x10
cmp eax, 1
jne 0x4772ff
lea ecx, [esp + 0x14]
push ecx
push ebx
call fcn.0046c550
add esp, 8
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [ebx + 0x270], edx
test eax, eax
je 0x47745c
mov edx, dword [eax]
push 0x100
lea ecx, [esp + 0xac]
push ecx
push edx
call fcn.0046d7f0
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push edx
lea eax, [esp + 0xb8]
push eax
push ebp
push esi
push str.Name__s_family__i_resolved_to__s_family__i_n
push edi
call fcn.00474a10
mov ecx, dword [esp + 0x38]
push ecx
push edi
call fcn.0046e030
add esp, 0x2c
cmp ebp, 2
jne 0x477395
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0xac]
push eax
push ebp
call fcn.00481de0
add esp, 0xc
test eax, eax
jle 0x477395
mov edx, dword [esp + 0x20]
mov ecx, ebp
push edx
mov word [esp + 0x2c], cx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2a], ax
mov dword [esp + 0x1c], 0x10
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov esi, dword [esp + 0x1b4]
mov ebp, dword [sym.imp.WS2_32.dll_bind]
push ecx
lea edx, [esp + 0x2c]
push edx
push esi
call ebp
test eax, eax
jns 0x477400
mov eax, dword [esp + 0x24]
dec eax
mov dword [esp + 0x24], eax
test eax, eax
jle 0x4774c2
movzx eax, bx
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.00474a10
add esp, 0xc
inc ebx
cmp word [esp + 0x28], 2
jne 0x4773ef
push ebx
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [esp + 0x2a], ax
mov ecx, dword [esp + 0x1c]
push ecx
lea edx, [esp + 0x2c]
push edx
push esi
call ebp
test eax, eax
js 0x4773b7
push 0x80
lea eax, [esp + 0xac]
push 0
push eax
mov dword [esp + 0x24], 0x80
call sub.MSVCR100.dll_memset
add esp, 0xc
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0xac]
push edx
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x47749e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov eax, dword [esp + 0x10]
push esi
push eax
mov dword [edi + 0x8654], esi
call fcn.00468020
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x4774e2
push esi
push str.Couldnt_bind_to__s
push edi
call fcn.00474aa0
add esp, 0xc
jmp 0x4774eb
cmp dword [esp + 0x1b8], 2
jne 0x477399
mov eax, 2
push ebx
mov word [esp + 0x2c], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2a], ax
mov dword [esp + 0x1c], 0x10
jmp 0x477399
movzx ecx, bx
push ecx
push str.Local_port:__hu_n
push edi
call fcn.00474a10
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov dword [edx + 0x24c], 1
xor eax, eax
jmp 0x4774f0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov eax, dword [esp + 0x10]
push esi
push eax
mov dword [edi + 0x8654], esi
call fcn.00468020
push eax
push esi
push str.bind_failed_with_errno__d:__s
push edi
call fcn.00474aa0
add esp, 0x18
mov eax, 0x2d
mov ecx, dword [esp + 0x1a8]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004610a0
add esp, 0x19c
ret