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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x19c
mov eax, dword [0x7c0ab4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov eax, ecx
mov dword [ebp - 0x194], edx
push esi
push edi
mov dword [ebp - 0x18c], eax
mov edi, dword [eax]
mov dword [ebp - 0x190], 0
mov ebx, dword [edi + 0x3c0]
mov eax, dword [edi + 0x18c]
movzx esi, word [edi + 0x188]
mov dword [ebp - 0x19c], eax
test ebx, ebx
jne 0x4afba6
test si, si
je 0x4aff0b
push 0x80
lea eax, [ebp - 0x188]
push 0
push eax
call fcn.006d4310
add esp, 0xc
test ebx, ebx
je 0x4afd8d
push ebx
call fcn.006e5360
add esp, 4
cmp eax, 0xff
jae 0x4afd8d
push 0x100
lea eax, [ebp - 0x108]
push 0
push eax
call fcn.006d4310
add esp, 0xc
push 0x7937dc
call fcn.006e5360
add esp, 4
push eax
push ebx
push 0x7937dc
call fcn.006eb1a0
add esp, 0xc
test eax, eax
jne 0x4afc42
push 0x7937dc
call fcn.006e5360
add esp, 4
add ebx, eax
push ebx
push str.Couldnt_bind_to_interface__s
push edi
call fcn.004aef10
add esp, 0xc
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
push str.host_
call fcn.006e5360
add esp, 4
push eax
push ebx
push str.host_
call fcn.006eb1a0
add esp, 0xc
test eax, eax
jne 0x4afc71
push str.host_
call fcn.006e5360
add esp, 4
add ebx, eax
cmp dword [ebp + 8], 2
mov eax, dword [ebp - 0x18c]
mov ecx, dword [eax + 0x2d0]
mov dword [ebp - 0x198], ecx
jne 0x4afc93
mov dword [eax + 0x2d0], 1
lea ecx, [ebp - 0x190]
mov edx, ebx
push ecx
push 0
mov ecx, eax
call fcn.004b1a00
add esp, 8
cmp eax, 1
jne 0x4afcbe
mov ecx, dword [ebp - 0x18c]
lea edx, [ebp - 0x190]
call fcn.004b2620
mov eax, dword [ebp - 0x18c]
mov ecx, dword [ebp - 0x198]
mov dword [eax + 0x2d0], ecx
mov eax, dword [ebp - 0x190]
test eax, eax
je 0x4afd68
mov ecx, dword [eax]
lea edx, [ebp - 0x108]
push 0x100
call fcn.004b17d0
mov eax, dword [ebp - 0x190]
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_n
push edi
call fcn.004aee40
mov edx, dword [ebp - 0x190]
add esp, 0x18
mov ecx, edi
call fcn.004b1b90
cmp dword [ebp + 8], 2
jne 0x4afdb4
lea eax, [ebp - 0x184]
push eax
lea edx, [ebp - 0x108]
call fcn.004bb720
add esp, 4
test eax, eax
jle 0x4afdb4
mov eax, 2
push esi
mov word [ebp - 0x188], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x186], ax
mov ebx, 0x10
jmp 0x4afdb6
push ebx
push str.Couldnt_bind_to__s
push edi
call fcn.004aef10
add esp, 0xc
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 8], 2
jne 0x4afdb4
mov eax, 2
push esi
mov word [ebp - 0x188], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x186], ax
mov ebx, 0x10
jmp 0x4afdb6
xor ebx, ebx
push ebx
lea eax, [ebp - 0x188]
push eax
push dword [ebp - 0x194]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x4afe28
nop
mov eax, dword [ebp - 0x19c]
dec eax
mov dword [ebp - 0x19c], eax
test eax, eax
jle 0x4afeab
movzx eax, si
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.004aee40
add esp, 0xc
inc esi
cmp word [ebp - 0x188], 2
jne 0x4afe10
push esi
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x186], ax
push ebx
lea eax, [ebp - 0x188]
push eax
push dword [ebp - 0x194]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x4afdd0
push 0x80
lea eax, [ebp - 0x88]
mov dword [ebp - 0x198], 0x80
push 0
push eax
call fcn.006d4310
add esp, 0xc
lea eax, [ebp - 0x198]
push eax
lea eax, [ebp - 0x88]
push eax
push dword [ebp - 0x194]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x4afeec
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x18c]
mov esi, eax
mov edx, esi
mov dword [edi + 0x46b4], esi
call fcn.004bafa0
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.004aef10
add esp, 0x10
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x18c]
mov esi, eax
mov edx, esi
mov dword [edi + 0x46b4], esi
call fcn.004bafa0
push eax
push esi
push str.bind_failed_with_errno__d:__s
push edi
call fcn.004aef10
add esp, 0x10
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
movzx eax, si
push eax
push str.Local_port:__hu_n
push edi
call fcn.004aee40
mov eax, dword [ebp - 0x18c]
add esp, 0xc
mov byte [eax + 0x2a7], 1
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006d0856
mov esp, ebp
pop ebp
ret