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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov ecx, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [ecx]
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov ebx, dword [edi + 0x94c]
mov eax, dword [edi + 0x5ec]
movzx esi, word [edi + 0x5e8]
mov dword [ebp - 0x10], eax
test ebx, ebx
jne 0x57c2b2
test si, si
je 0x57c696
push 0x80
lea eax, [ebp - 0x90]
push 0
push eax
call fcn.006c2360
add esp, 0xc
test ebx, ebx
je 0x57c51b
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x57c2d5
sub ecx, edx
cmp ecx, 0xff
jae 0x57c51b
push 0x100
lea eax, [ebp - 0x190]
push 0
push eax
call fcn.006c2360
mov edx, dword [0x7f1540]
add esp, 0xc
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 4], eax
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x57c310
sub ecx, dword [ebp - 4]
push ecx
push ebx
push edx
call fcn.006d73e0
add esp, 0xc
test eax, eax
jne 0x57c358
mov ecx, dword [0x7f1540]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x57c332
sub ecx, edx
add ebx, ecx
push ebx
push str.Couldnt_bind_to_interface__s
push edi
call fcn.0056f390
add esp, 0xc
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [str.host_]
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 4], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x57c366
sub ecx, dword [ebp - 4]
push ecx
push ebx
push edx
call fcn.006d73e0
add esp, 0xc
test eax, eax
jne 0x57c393
mov ecx, dword [str.host_]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x57c388
sub ecx, edx
add ebx, ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x2b0]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
cmp eax, 2
jne 0x57c3b3
mov dword [ecx + 0x2b0], 1
jmp 0x57c3c2
cmp eax, 0x17
jne 0x57c3c2
mov dword [ecx + 0x2b0], 2
lea eax, [ebp - 8]
push eax
push 0
push ebx
push ecx
call fcn.00578be0
add esp, 0x10
cmp eax, 1
jne 0x57c3e6
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
call fcn.00579270
add esp, 8
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 4]
mov dword [ecx + 0x2b0], eax
mov eax, dword [ebp - 8]
test eax, eax
je 0x57c4f9
push 0x100
lea ecx, [ebp - 0x190]
push ecx
push dword [eax]
call fcn.00578040
mov eax, dword [ebp - 8]
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [ebp - 0x190]
push eax
push dword [ebp + 0x10]
push ebx
push str.Name__s_family__i_resolved_to__s_family__i_n
push edi
call fcn.005738f0
push dword [ebp - 8]
push edi
call fcn.00579200
mov eax, dword [ebp + 0x10]
add esp, 0x2c
cmp eax, 0x17
jne 0x57c4ae
lea eax, [ebp - 0x190]
push 0x25
push eax
call fcn.006c2590
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x57c45d
mov byte [ebx], 0
inc ebx
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x190]
push eax
call fcn.005856e0
add esp, 8
test eax, eax
jle 0x57c4a1
mov eax, 0x17
push esi
mov word [ebp - 0x90], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x8e], ax
test ebx, ebx
je 0x57c4a1
push ebx
call fcn.006d1f24
add esp, 4
mov dword [ebp - 0x78], eax
mov eax, 0x1c
mov dword [ebp - 0xc], eax
jmp 0x57c568
cmp eax, 2
jne 0x57c566
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0x190]
push eax
call fcn.00585620
add esp, 8
test eax, eax
jle 0x57c566
mov eax, 2
push esi
mov word [ebp - 0x90], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x8e], ax
mov eax, 0x10
mov dword [ebp - 0xc], eax
jmp 0x57c568
and dword [edi + 0xf6c], 0xfffffff7
push ebx
push str.Couldnt_bind_to__s
push edi
call fcn.0056f390
add esp, 0xc
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
cmp eax, 0x17
jne 0x57c542
push esi
mov word [ebp - 0x90], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x8e], ax
mov eax, 0x1c
mov dword [ebp - 0xc], eax
jmp 0x57c568
cmp eax, 2
jne 0x57c566
push esi
mov word [ebp - 0x90], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x8e], ax
mov eax, 0x10
mov dword [ebp - 0xc], eax
jmp 0x57c568
xor eax, eax
push eax
lea eax, [ebp - 0x90]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x57c5c6
mov ebx, dword [sym.imp.WS2_32.dll_ntohs]
mov eax, dword [ebp - 0x10]
dec eax
mov dword [ebp - 0x10], eax
test eax, eax
jle 0x57c63b
movzx eax, si
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.005738f0
add esp, 0xc
inc esi
push esi
call ebx
push dword [ebp - 0xc]
mov word [ebp - 0x8e], ax
lea eax, [ebp - 0x90]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x57c583
push 0x80
lea eax, [ebp - 0x210]
mov dword [ebp - 4], 0x80
push 0
push eax
call fcn.006c2360
add esp, 0xc
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x210]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x57c677
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x110]
push 0x80
push eax
push esi
mov dword [edi + 0xcac], esi
call fcn.0057ae20
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.0056f390
add esp, 0x1c
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x210]
push 0x80
push eax
push esi
mov dword [edi + 0xcac], esi
call fcn.0057ae20
push eax
push esi
push str.bind_failed_with_errno__d:__s
push edi
call fcn.0056f390
add esp, 0x1c
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx eax, si
push eax
push str.Local_port:__hu_n
push edi
call fcn.005738f0
mov eax, dword [ebp + 8]
add esp, 0xc
or dword [eax + 0x284], 0x1000000
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret