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

Disassembly:
sub esp, 0x220
mov eax, dword [0x5857cc]
xor eax, esp
mov dword [esp + 0x21c], eax
mov eax, dword [esp + 0x224]
push ebx
push ebp
mov ebp, dword [esp + 0x234]
push esi
push edi
mov edi, dword [eax]
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x10], eax
movzx ebx, word [edi + 0x140]
mov ecx, dword [edi + 0x144]
mov esi, dword [edi + 0x354]
push 0xff
push eax
lea edx, [esp + 0x135]
push edx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x20], eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ecx
mov byte [esp + 0x138], al
call fcn.0052143a
add esp, 0xc
test esi, esi
jne 0x4a19ff
test bx, bx
je 0x4a1d3a
push 0x80
lea eax, [esp + 0x30]
push 0
push eax
call fcn.0052143a
add esp, 0xc
test esi, esi
je 0x4a1c25
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a1a20
sub eax, edx
cmp eax, 0xff
jae 0x4a1c25
mov edx, dword [0x583928]
mov eax, edx
lea ebp, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a1a40
sub eax, ebp
mov ebp, dword [0x545368]
push eax
push esi
push edx
call ebp
add esp, 0xc
test eax, eax
jne 0x4a1a70
mov eax, dword [0x583928]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a1a63
sub eax, edx
add esi, eax
jmp 0x4a1adf
mov edx, dword [str.host_]
mov eax, edx
lea ebx, [eax + 1]
jmp 0x4a1a80
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a1a80
sub eax, ebx
push eax
push esi
push edx
call ebp
add esp, 0xc
test eax, eax
jne 0x4a1ace
mov eax, dword [str.host_]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a1aa0
sub eax, edx
add esi, eax
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
mov eax, dword [ebx + 0x29c]
mov dword [esp + 0x20], eax
cmp ebp, 2
jne 0x4a1b1f
mov dword [ebx + 0x29c], 1
jmp 0x4a1b2e
push esi
call fcn.0041a710
add esp, 4
test eax, eax
je 0x4a1aab
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x1c]
push pe_nt_image_headers32
lea ecx, [esp + 0x130]
push ecx
push esi
push ebp
call fcn.0041a710
add esp, 0x10
test eax, eax
je 0x4a1d67
push ebp
lea edx, [esp + 0x130]
push edx
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push edi
call fcn.0049f850
add esp, 0x14
jmp 0x4a1bae
cmp ebp, 0x17
jne 0x4a1b2e
mov dword [ebx + 0x29c], 2
lea ecx, [esp + 0x10]
push ecx
push 0
push esi
push ebx
call fcn.00497280
add esp, 0x10
cmp eax, 1
jne 0x4a1b52
lea edx, [esp + 0x10]
push edx
push ebx
call fcn.004963e0
add esp, 8
mov eax, dword [esp + 0x20]
mov dword [ebx + 0x29c], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4a1c11
mov edx, dword [eax]
push pe_nt_image_headers32
lea ecx, [esp + 0x130]
push ecx
push edx
call fcn.00496fc0
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push edx
lea eax, [esp + 0x13c]
push eax
push ebp
push esi
push str.Name__s_family__i_resolved_to__s_family__i_n
push edi
call fcn.0049f850
mov ecx, dword [esp + 0x34]
push ecx
push edi
call fcn.00497470
mov ebx, dword [esp + 0x50]
add esp, 0x2c
cmp ebp, 0x17
jne 0x4a1be9
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x130]
push eax
push ebp
call fcn.004a48b0
add esp, 0xc
test eax, eax
jle 0x4a1c62
mov ecx, ebp
push ebx
mov word [esp + 0x30], cx
call dword [sym.imp.WS2_32.dll_htons]
mov dword [esp + 0x14], 0x1c
jmp 0x4a1c5d
cmp ebp, 2
jne 0x4a1c62
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x130]
push eax
push ebp
call fcn.004a48b0
add esp, 0xc
test eax, eax
jle 0x4a1c62
mov ecx, ebp
mov word [esp + 0x2c], cx
jmp 0x4a1c4e
push esi
push str.Couldnt_bind_to__s
push edi
call fcn.0049f8e0
add esp, 0xc
jmp 0x4a1d67
cmp ebp, 0x17
jne 0x4a1c42
mov edx, ebp
push ebx
mov word [esp + 0x30], dx
call dword [sym.imp.WS2_32.dll_htons]
mov dword [esp + 0x14], 0x1c
jmp 0x4a1c5d
cmp ebp, 2
jne 0x4a1c62
mov eax, ebp
mov word [esp + 0x2c], ax
push ebx
call dword [sym.imp.WS2_32.dll_htons]
mov dword [esp + 0x14], 0x10
mov word [esp + 0x2e], ax
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x238]
push ebp
lea ecx, [esp + 0x30]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x4a1cc1
mov edi, edi
mov eax, dword [esp + 0x28]
dec eax
mov dword [esp + 0x28], eax
test eax, eax
jle 0x4a1d3e
movzx edx, bx
push edx
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.0049f850
add esp, 0xc
inc ebx
push ebx
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [esp + 0x2e], ax
push ebp
lea eax, [esp + 0x30]
push eax
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x4a1c80
push 0x80
lea ecx, [esp + 0xb0]
push 0
push ecx
mov dword [esp + 0x2c], 0x80
call fcn.0052143a
add esp, 0xc
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0xb0]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x4a1d1a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x18]
mov esi, eax
push esi
push ecx
mov dword [edi + 0x859c], esi
call fcn.00495800
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x4a1d5e
movzx edx, bx
push edx
push str.Local_port:__hu_n
push edi
call fcn.0049f850
mov eax, dword [esp + 0x24]
add esp, 0xc
mov dword [eax + 0x27c], 1
xor eax, eax
jmp 0x4a1d6c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x18]
mov esi, eax
push esi
push ecx
mov dword [edi + 0x859c], esi
call fcn.00495800
push eax
push esi
push str.bind_failed_with_errno__d:__s
push edi
call fcn.0049f8e0
add esp, 0x18
mov eax, 0x2d
mov ecx, dword [esp + 0x22c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00521458
add esp, 0x220
ret