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

Disassembly:
sub esp, 0x218
mov eax, dword [0x5405a0]
xor eax, esp
mov dword [esp + 0x214], eax
mov eax, dword [esp + 0x21c]
push ebx
push ebp
push esi
mov esi, dword [eax]
push edi
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0x14], eax
movzx ebp, word [esi + 0x148]
mov edi, dword [esi + 0x344]
push 0xff
mov ebx, ecx
mov ecx, dword [esi + 0x14c]
push eax
lea edx, [esp + 0x12d]
push edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], ecx
mov byte [esp + 0x130], al
call fcn.004d3fc0
add esp, 0xc
test edi, edi
jne 0x4af212
test bp, bp
je 0x4af462
push 0x80
lea eax, [esp + 0x28]
push 0
push eax
call fcn.004d3fc0
add esp, 0xc
test edi, edi
je 0x4af363
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4af233
sub eax, edx
cmp eax, 0xff
jae 0x4af363
push pe_nt_image_headers32
lea ecx, [esp + 0x128]
push ecx
push edi
push ebx
call fcn.004f24e0
add esp, 0x10
test eax, eax
je 0x4af27f
push ebx
lea edx, [esp + 0x128]
push edx
push edi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push esi
call fcn.004aec50
add esp, 0x14
jmp 0x4af318
mov eax, dword [esi + 0x270]
mov dword [esp + 0x1c], eax
cmp ebx, 2
jne 0x4af298
mov dword [esi + 0x270], 1
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push 0
push edi
push edx
call fcn.004adb70
add esp, 0x10
cmp eax, 1
jne 0x4af2c4
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push ecx
call fcn.004b2020
add esp, 8
mov edx, dword [esp + 0x1c]
mov dword [esi + 0x270], edx
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4af34f
mov edx, dword [eax]
push pe_nt_image_headers32
lea ecx, [esp + 0x128]
push ecx
push edx
call fcn.004ad9e0
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push edx
lea eax, [esp + 0x134]
push eax
push ebx
push edi
push str.Name__s_family__i_resolved_to__s_family__i_n
push esi
call fcn.004aec50
mov ecx, dword [esp + 0x38]
push ecx
push esi
call fcn.004add30
add esp, 0x2c
cmp ebx, 2
jne 0x4af383
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x128]
push eax
push ebx
call fcn.004c4b10
add esp, 0xc
test eax, eax
jle 0x4af383
mov ecx, ebx
push ebp
mov word [esp + 0x28], cx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x26], ax
lea edi, [ebx + 0xe]
jmp 0x4af387
push edi
push str.Couldnt_bind_to__s
push esi
call fcn.004aece0
add esp, 0xc
jmp 0x4af48f
cmp ebx, 2
jne 0x4af383
mov edx, ebx
push ebp
mov word [esp + 0x28], dx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x26], ax
mov dword [esp + 0x18], 0x10
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x230]
push edi
lea eax, [esp + 0x28]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jge 0x4af3e9
nop
mov eax, dword [esp + 0x20]
dec eax
mov dword [esp + 0x20], eax
test eax, eax
jle 0x4af466
movzx ecx, bp
push ecx
push str.Bind_to_local_port__hu_failed__trying_next_n
push esi
call fcn.004aec50
add esp, 0xc
inc ebp
cmp word [esp + 0x24], 2
jne 0x4af3d8
push ebp
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [esp + 0x26], ax
push edi
lea edx, [esp + 0x28]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x4af3a0
push 0x80
lea eax, [esp + 0xa8]
push 0
push eax
mov dword [esp + 0x28], 0x80
call fcn.004d3fc0
add esp, 0xc
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0xa8]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x4af442
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
mov eax, dword [esp + 0x10]
push edi
push eax
mov dword [esi + 0x8554], edi
call fcn.004c4270
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x4af486
movzx ecx, bp
push ecx
push str.Local_port:__hu_n
push esi
call fcn.004aec50
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov dword [edx + 0x18c], 1
xor eax, eax
jmp 0x4af494
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
mov eax, dword [esp + 0x10]
push edi
push eax
mov dword [esi + 0x8554], edi
call fcn.004c4270
push eax
push edi
push str.bind_failed_with_errno__d:__s
push esi
call fcn.004aece0
add esp, 0x18
mov eax, 0x2d
mov ecx, dword [esp + 0x224]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004ccee1
add esp, 0x218
ret