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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
mov eax, dword [0x54300c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x29c], edx
mov dword [ebp - 0x298], 0
mov dword [ebp - 0x290], 0
mov eax, dword [edi + 0xc]
mov ebx, dword [edi + 0x548]
movzx esi, word [edi + 0x190]
mov dword [ebp - 0x2a0], eax
mov eax, dword [edi + 0x194]
mov dword [ebp - 0x294], eax
test ebx, ebx
jne 0x47ab51
test si, si
je 0x47af34
push 0x80
lea eax, [ebp - 0x288]
push 0
push eax
call fcn.004b6620
add esp, 0xc
test ebx, ebx
je 0x47ada0
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x47ab74
sub ecx, edx
cmp ecx, 0xff
jae 0x47ada0
push 0x100
lea eax, [ebp - 0x108]
push 0
push eax
call fcn.004b6620
add esp, 0xc
mov byte [ebp - 0x289], 0
push 3
push ebx
push 0x52ef14
call fcn.004e1350
add esp, 0xc
test eax, eax
jne 0x47abc4
add ebx, 3
mov cl, 1
jmp 0x47acb9
push 5
push ebx
push str.host_
call fcn.004e1350
add esp, 0xc
test eax, eax
jne 0x47acb3
add ebx, 5
cmp dword [ebp + 8], 2
mov edx, dword [ebp - 0x2a0]
mov al, byte [edx + 0x100]
mov byte [ebp - 0x289], al
jne 0x47abfe
mov byte [edx + 0x100], 1
lea eax, [ebp - 0x290]
mov edx, ebx
push eax
push 0
push 0
mov ecx, edi
call fcn.004917f0
add esp, 0xc
cmp eax, 1
jne 0x47ac27
lea edx, [ebp - 0x290]
mov ecx, edi
call fcn.00486230
mov ecx, dword [ebp - 0x2a0]
mov al, byte [ebp - 0x289]
mov byte [ecx + 0x100], al
mov eax, dword [ebp - 0x290]
test eax, eax
je 0x47acdf
mov ecx, dword [eax]
lea edx, [ebp - 0x108]
push 0x100
call fcn.004911a0
mov eax, dword [ebp - 0x290]
add esp, 4
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 8]
push ebx
push str.Name__s_family__i_resolved_to__s_family__i
push edi
call fcn.00479f40
mov ebx, dword [ebp - 0x290]
add esp, 0x18
mov edx, ebx
mov ecx, edi
call fcn.00491a40
mov eax, dword [ebx]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
je 0x47ad25
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b3dd4
mov esp, ebp
pop ebp
ret
mov cl, byte [ebp - 0x289]
sub esp, 0x10
call fcn.004997b0
add esp, 0x10
sub eax, 0
je 0x47ad73
sub eax, 1
je 0x47ac9d
sub eax, 1
je 0x47ad0b
test cl, cl
je 0x47abdf
push ebx
push str.Couldnt_bind_to__s
push edi
mov byte [edi + 0xcf7], 0
call fcn.00479fc0
add esp, 0xc
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b3dd4
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x108]
push ecx
push eax
push ebx
push str.Local_Interface__s_is_ip__s_using_address_family__i
push edi
call fcn.00479f40
add esp, 0x14
cmp dword [ebp + 8], 2
jne 0x47adcd
lea eax, [ebp - 0x284]
push eax
lea edx, [ebp - 0x108]
call fcn.004996d0
add esp, 4
test eax, eax
jle 0x47adcd
mov eax, 2
push esi
mov word [ebp - 0x288], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x286], ax
mov eax, 0x10
mov dword [ebp - 0x298], eax
jmp 0x47adcf
test cl, cl
je 0x47abdf
push ebx
push str.Couldnt_bind_to_interface__s
push edi
call fcn.00479fc0
add esp, 0xc
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b3dd4
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 8], 2
jne 0x47adcd
mov eax, 2
push esi
mov word [ebp - 0x288], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x286], ax
mov eax, 0x10
mov dword [ebp - 0x298], eax
jmp 0x47adcf
xor eax, eax
mov ebx, dword [sym.imp.WS2_32.dll_bind]
push eax
lea eax, [ebp - 0x288]
push eax
push dword [ebp - 0x29c]
call ebx
test eax, eax
jns 0x47ae49
lea esp, [esp]
mov eax, dword [ebp - 0x294]
dec eax
mov dword [ebp - 0x294], eax
test eax, eax
jle 0x47aed0
movzx eax, si
push eax
push str.Bind_to_local_port__hu_failed__trying_next
push edi
call fcn.00479f40
add esp, 0xc
inc esi
cmp word [ebp - 0x288], 2
jne 0x47ae30
push esi
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x286], ax
push dword [ebp - 0x298]
lea eax, [ebp - 0x288]
push eax
push dword [ebp - 0x29c]
call ebx
test eax, eax
js 0x47adf0
push 0x80
lea eax, [ebp - 0x88]
mov dword [ebp - 0x294], 0x80
push 0
push eax
call fcn.004b6620
add esp, 0xc
lea eax, [ebp - 0x294]
push eax
lea eax, [ebp - 0x88]
push eax
push dword [ebp - 0x29c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x47af15
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea edx, [ebp - 0x208]
push ecx
mov ecx, esi
mov dword [edi + 0x964], esi
call fcn.00498f00
add esp, 4
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.00479fc0
add esp, 0x10
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b3dd4
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea edx, [ebp - 0x108]
push ecx
mov ecx, esi
mov dword [edi + 0x964], esi
call fcn.00498f00
add esp, 4
push eax
push esi
push str.bind_failed_with_errno__d:__s
push edi
call fcn.00479fc0
add esp, 0x10
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b3dd4
mov esp, ebp
pop ebp
ret
movzx eax, si
push eax
push str.Local_port:__hu
push edi
call fcn.00479f40
mov eax, dword [ebp - 0x2a0]
add esp, 0xc
mov byte [eax + 0x26c], 1
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b3dd4
mov esp, ebp
pop ebp
ret