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

Disassembly:
sub esp, 0x224
mov eax, dword [0x592830]
xor eax, esp
mov dword [esp + 0x21c], eax
push ebx
push ebp
push esi
mov eax, ecx
push edi
mov edi, dword [eax]
mov dword [esp + 0x1c], edx
mov ebx, dword [edi + 0x940]
movzx esi, word [edi + 0x5e0]
mov ebp, dword [edi + 0x5e4]
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], 0
mov dword [esp + 0x14], 0
test ebx, ebx
jne 0x515e84
test si, si
je 0x51617d
push 0x80
lea eax, [esp + 0x2c]
push 0
push eax
call fcn.004f2670
add esp, 0xc
test ebx, ebx
je 0x516050
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x515ea5
sub ecx, edx
cmp ecx, 0xff
jae 0x516050
push 0xff
mov byte [esp + 0x12c], al
lea eax, [esp + 0x12d]
push 0
push eax
call fcn.004f2670
add esp, 0xc
push 3
push ebx
push 0x569504
call fcn.004eef80
add esp, 0xc
test eax, eax
jne 0x515f08
add ebx, 3
push ebx
push str.Couldnt_bind_to_interface__s
push edi
call fcn.0051a7e0
add esp, 0xc
mov eax, 0x2d
jmp 0x51617f
push 5
push ebx
push str.host_
call fcn.004eef80
add esp, 0xc
test eax, eax
jne 0x515f1f
add ebx, 5
cmp dword [esp + 0x238], 2
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x2d0]
mov dword [esp + 0x24], ecx
jne 0x515f41
mov dword [eax + 0x2d0], 1
lea ecx, [esp + 0x14]
push ecx
push 0
push 0
mov edx, ebx
mov ecx, eax
call fcn.00520400
add esp, 0xc
cmp eax, 1
jne 0x515f6c
mov ecx, dword [esp + 0x18]
push eax
lea edx, [esp + 0x18]
call fcn.00517110
add esp, 4
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
mov dword [eax + 0x2d0], ecx
mov eax, dword [esp + 0x14]
test eax, eax
je 0x516030
mov ecx, dword [eax]
mov eax, dword [ecx + 4]
sub eax, 2
jne 0x515faa
mov ecx, dword [ecx + 0x18]
add ecx, 4
push pe_nt_image_headers32
lea edx, [esp + 0x12c]
call fcn.0052e310
add esp, 4
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [esp + 0x12c]
push eax
push dword [esp + 0x240]
push ebx
push str.Name__s_family__i_resolved_to__s_family__i_n
push edi
call fcn.0051a600
mov ebx, dword [esp + 0x2c]
add esp, 0x18
mov edx, ebx
mov ecx, edi
call fcn.005209b0
mov eax, dword [ebx]
mov ecx, dword [esp + 0x238]
cmp ecx, dword [eax + 4]
je 0x515ff6
mov eax, 1
jmp 0x51617f
cmp ecx, 2
jne 0x51605a
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x128]
call fcn.0052ecd0
test eax, eax
jle 0x51605a
mov eax, 2
push esi
mov word [esp + 0x2c], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2a], ax
mov eax, 0x10
mov dword [esp + 0x20], eax
jmp 0x51605c
and dword [edi + 0xf84], 0xfffffff7
push ebx
push str.Couldnt_bind_to__s
push edi
call fcn.0051a7e0
add esp, 0xc
mov eax, 0x2d
jmp 0x51617f
cmp dword [esp + 0x238], 2
je 0x51600f
xor eax, eax
mov ebx, dword [sym.imp.WS2_32.dll_bind]
push eax
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x24]
call ebx
test eax, eax
jns 0x5160b5
dec ebp
test ebp, ebp
jle 0x516126
movzx eax, si
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.0051a600
add esp, 0xc
inc esi
cmp word [esp + 0x28], 2
jne 0x5160a2
push esi
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [esp + 0x2a], ax
push dword [esp + 0x20]
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x24]
call ebx
test eax, eax
js 0x516072
push 0x80
lea eax, [esp + 0xac]
push 0
push eax
mov dword [esp + 0x30], 0x80
call fcn.004f2670
add esp, 0xc
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0xac]
push eax
push dword [esp + 0x24]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x51615d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push ecx
lea edx, [esp + 0x12c]
mov ecx, esi
mov dword [edi + 0xc9c], esi
call fcn.0052ebf0
add esp, 4
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.0051a7e0
add esp, 0x10
mov eax, 0x2d
jmp 0x51617f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push ecx
lea edx, [esp + 0xac]
mov ecx, esi
mov dword [edi + 0xc9c], esi
call fcn.0052ebf0
add esp, 4
push eax
push esi
push str.bind_failed_with_errno__d:__s
push edi
call fcn.0051a7e0
add esp, 0x10
mov eax, 0x2d
jmp 0x51617f
movzx eax, si
push eax
push str.Local_port:__hu_n
push edi
call fcn.0051a600
mov eax, dword [esp + 0x24]
add esp, 0xc
or dword [eax + 0x2a4], 0x200000
xor eax, eax
mov ecx, dword [esp + 0x22c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004ebb9e
add esp, 0x224
ret