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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x100a82b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [eax]
mov dword [ebp - 0x20c], eax
xor eax, eax
mov dword [ebp - 0x210], eax
movzx ecx, word [esi + 0x148]
push edi
mov edi, dword [esi + 0x344]
mov ebx, 0xff
mov dword [ebp - 0x208], ecx
mov ecx, dword [esi + 0x14c]
push ebx
push eax
mov dword [ebp - 0x214], eax
mov byte [ebp - 0x104], al
lea eax, [ebp - 0x103]
push eax
mov dword [ebp - 0x218], ecx
call fcn.1005c860
add esp, 0xc
test edi, edi
jne 0x1004764e
cmp word [ebp - 0x208], di
jne 0x1004764e
xor eax, eax
jmp 0x100478da
push 0x80
lea eax, [ebp - 0x184]
push 0
push eax
call fcn.1005c860
add esp, 0xc
test edi, edi
je 0x10047790
push edi
call fcn.1005efa0
pop ecx
cmp eax, ebx
jae 0x10047790
mov ebx, pe_nt_image_headers32
push ebx
lea eax, [ebp - 0x104]
push eax
push edi
push dword [ebp + 0x10]
call fcn.10052e1a
add esp, 0x10
test eax, eax
je 0x100476b6
push dword [ebp + 0x10]
lea eax, [ebp - 0x104]
push eax
push edi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push esi
call fcn.1004663b
add esp, 0x14
jmp 0x10047758
cmp dword [ebp + 0x10], 2
mov eax, dword [esi + 0x270]
mov dword [ebp - 0x21c], eax
jne 0x100476d2
mov dword [esi + 0x270], 1
lea eax, [ebp - 0x210]
push eax
push 0
push edi
push dword [ebp - 0x20c]
call fcn.10043bca
add esp, 0x10
cmp eax, 1
jne 0x10047703
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x20c]
call fcn.10045b18
pop ecx
pop ecx
mov eax, dword [ebp - 0x21c]
mov dword [esi + 0x270], eax
mov eax, dword [ebp - 0x210]
test eax, eax
je 0x1004777c
push ebx
lea ecx, [ebp - 0x104]
push ecx
push dword [eax]
call fcn.100439d9
mov eax, dword [ebp - 0x210]
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 0x10]
push edi
push str.Name__s_family__i_resolved_to__s_family__i_n
push esi
call fcn.1004663b
push dword [ebp - 0x210]
push esi
call fcn.10043d2c
add esp, 0x2c
cmp dword [ebp + 0x10], 2
jne 0x100477bd
lea eax, [ebp - 0x180]
push eax
lea eax, [ebp - 0x104]
push eax
push 2
call fcn.10052df1
add esp, 0xc
test eax, eax
jle 0x100477bd
jmp 0x10047796
push edi
push str.Couldnt_bind_to__s
push esi
call fcn.100466a5
add esp, 0xc
jmp 0x100478d7
cmp dword [ebp + 0x10], 2
jne 0x100477bd
push 2
pop eax
push dword [ebp - 0x208]
mov word [ebp - 0x184], ax
call dword [sym.imp.WS2_32.dll_htons]
mov dword [ebp - 0x214], 0x10
mov word [ebp - 0x182], ax
mov edi, dword [sym.imp.WS2_32.dll_bind]
jmp 0x10047811
dec dword [ebp - 0x218]
cmp dword [ebp - 0x218], 0
jle 0x100478ad
movzx eax, word [ebp - 0x208]
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push esi
call fcn.1004663b
add esp, 0xc
inc dword [ebp - 0x208]
cmp word [ebp - 0x184], 2
jne 0x10047811
push dword [ebp - 0x208]
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x182], ax
push dword [ebp - 0x214]
lea eax, [ebp - 0x184]
push eax
push dword [ebp + 0xc]
call edi
test eax, eax
jl 0x100477c5
mov eax, 0x80
push eax
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x204]
push 0
push eax
call fcn.1005c860
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x204]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x10047882
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push dword [ebp - 0x20c]
mov dword [esi + 0x8554], edi
call fcn.10052b76
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x100478ce
movzx eax, word [ebp - 0x208]
push eax
push str.Local_port:__hu_n
push esi
call fcn.1004663b
mov eax, dword [ebp - 0x20c]
add esp, 0xc
mov dword [eax + 0x18c], 1
jmp 0x10047647
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push dword [ebp - 0x20c]
mov dword [esi + 0x8554], edi
call fcn.10052b76
push eax
push edi
push str.bind_failed_with_errno__d:__s
push esi
call fcn.100466a5
add esp, 0x18
push 0x2d
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10059ccb
leave
ret