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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9b0
mov eax, dword [0x5002b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
or dword [ebp - 0x990], 0xffffffff
push ebx
push edi
mov edi, dword [esi]
xor ebx, ebx
push 0xff
mov dword [ebp - 0x9ac], eax
lea eax, [ebp - 0x103]
push ebx
push eax
mov dword [ebp - 0x994], edi
mov byte [ebp - 0x104], bl
call fcn.00495b20
lea eax, [edi + 0x3ac]
mov edi, dword [eax]
mov dword [ebp - 0x9b0], ebx
mov eax, dword [eax]
add esp, 0xc
mov dword [ebp - 0x9a0], ebx
mov dword [ebp - 0x9a4], ebx
mov dword [ebp - 0x9a8], 1
mov dword [ebp - 0x98c], ebx
cmp eax, ebx
je 0x47f6af
push eax
call fcn.00495f10
pop ecx
cmp eax, 1
jbe 0x47f6af
push edi
call fcn.00495f10
pop ecx
cmp eax, 0x16
jae 0x47f57a
push 0x16
pop eax
jmp 0x47f581
push edi
call fcn.00495f10
pop ecx
inc eax
push 1
push eax
call dword [0x4ff390]
pop ecx
pop ecx
mov dword [ebp - 0x98c], eax
cmp eax, ebx
jne 0x47f59f
push 0x1b
pop eax
jmp 0x47fac7
cmp byte [edi], 0x3a
jne 0x47f5ac
mov dword [ebp - 0x998], edi
jmp 0x47f5e2
push 0x3a
push edi
call fcn.0049b700
pop ecx
pop ecx
mov dword [ebp - 0x998], eax
cmp eax, ebx
je 0x47f5d4
sub eax, edi
push eax
push edi
push dword [ebp - 0x98c]
call fcn.00499940
add esp, 0xc
jmp 0x47f5e2
push edi
push dword [ebp - 0x98c]
call fcn.0049a4d0
pop ecx
pop ecx
cmp dword [ebp - 0x998], ebx
je 0x47f663
push 0x3a
push dword [ebp - 0x998]
call fcn.0049b700
mov edi, eax
pop ecx
pop ecx
cmp edi, ebx
je 0x47f663
push 0xa
lea eax, [edi + 1]
push ebx
push eax
call fcn.0049ce68
push eax
call fcn.00488770
movzx eax, ax
push 0x2d
push edi
mov dword [ebp - 0x9a0], eax
call fcn.0049b700
add esp, 0x18
cmp eax, ebx
je 0x47f641
push 0xa
inc eax
push ebx
push eax
call fcn.0049ce68
push eax
call fcn.00488770
add esp, 0x10
movzx eax, ax
jmp 0x47f648
movzx eax, word [ebp - 0x9a0]
mov dword [ebp - 0x9a4], eax
cmp word [ebp - 0x9a0], ax
jbe 0x47f663
mov dword [ebp - 0x9a4], ebx
mov dword [ebp - 0x9a0], ebx
mov eax, dword [ebp - 0x98c]
cmp byte [eax], bl
je 0x47f6a5
push 0x401
lea ecx, [ebp - 0x508]
push ecx
push eax
push dword [esi + 0x88]
mov eax, dword [esi + 0x4c]
push dword [eax + 4]
call fcn.0041dc22
add esp, 0x14
sub eax, ebx
je 0x47f69d
dec eax
je 0x47f70d
dec eax
jne 0x47f6af
jmp 0x47f73d
mov edi, dword [ebp - 0x98c]
jmp 0x47f6a7
xor edi, edi
cmp edi, ebx
jne 0x47f743
lea eax, [ebp - 0x99c]
push eax
lea eax, [ebp - 0x988]
push eax
push dword [esi + 0x154]
mov dword [ebp - 0x99c], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x47f714
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.004750b3
push eax
push str.getsockname___failed:__s
push dword [ebp - 0x994]
call fcn.004707df
add esp, 0x14
cmp dword [ebp - 0x98c], ebx
je 0x47f70d
push dword [ebp - 0x98c]
call dword [0x4ff384]
pop ecx
push 0x1e
jmp 0x47f599
push 0x401
lea eax, [ebp - 0x508]
push eax
lea eax, [ebp - 0x984]
push eax
movzx eax, word [ebp - 0x988]
push eax
call fcn.004752da
add esp, 0x10
mov dword [ebp - 0x9a8], ebx
lea edi, [ebp - 0x508]
lea eax, [ebp - 0x9b0]
push eax
push ebx
push edi
push esi
call fcn.00468dee
add esp, 0x10
cmp eax, 1
jne 0x47f769
lea eax, [ebp - 0x9b0]
push eax
push esi
call fcn.004688bb
pop ecx
pop ecx
mov eax, dword [ebp - 0x9b0]
cmp eax, ebx
je 0x47f78b
mov ecx, dword [eax]
push eax
push dword [ebp - 0x994]
mov dword [ebp - 0x998], ecx
call fcn.00468f59
pop ecx
pop ecx
jmp 0x47f791
mov dword [ebp - 0x998], ebx
cmp dword [ebp - 0x998], ebx
jne 0x47f7b2
push edi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push dword [ebp - 0x994]
call fcn.004707df
add esp, 0xc
jmp 0x47f6f8
cmp dword [ebp - 0x98c], ebx
je 0x47f7c7
push dword [ebp - 0x98c]
call dword [0x4ff384]
pop ecx
or dword [ebp - 0x990], 0xffffffff
mov edi, dword [ebp - 0x998]
mov dword [ebp - 0x98c], ebx
lea eax, [ebp - 0x990]
push eax
push ebx
push edi
push esi
call fcn.00472cc1
add esp, 0x10
mov dword [ebp - 0x998], eax
cmp eax, ebx
je 0x47f809
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, dword [edi + 0x1c]
mov dword [ebp - 0x98c], eax
cmp edi, ebx
jne 0x47f7da
cmp edi, ebx
jne 0x47f832
push dword [ebp - 0x98c]
push esi
call fcn.004750b3
push eax
push str.socket_failure:__s
push dword [ebp - 0x994]
call fcn.004707df
add esp, 0x14
jmp 0x47f70d
push dword [edi + 0x10]
lea eax, [ebp - 0x988]
push dword [edi + 0x18]
push eax
call fcn.00495100
mov eax, dword [edi + 0x10]
movzx ebx, word [ebp - 0x9a0]
mov dword [ebp - 0x99c], eax
mov ax, word [ebp - 0x9a4]
add esp, 0xc
cmp word [ebp - 0x9a0], ax
ja 0x47f937
cmp word [ebp - 0x988], 2
jne 0x47f883
push ebx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x986], ax
push dword [ebp - 0x99c]
lea eax, [ebp - 0x988]
push eax
push dword [ebp - 0x990]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x47f92a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [ebp - 0x9a8], 0
je 0x47f910
cmp eax, 0x2741
jne 0x47f910
push eax
push esi
call fcn.004750b3
push eax
movzx eax, bx
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push dword [ebp - 0x994]
call fcn.00470775
add esp, 0x18
lea eax, [ebp - 0x99c]
push eax
lea eax, [ebp - 0x988]
push eax
push dword [esi + 0x154]
mov dword [ebp - 0x99c], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x47f95b
movzx ebx, word [ebp - 0x9a0]
and dword [ebp - 0x9a8], eax
jmp 0x47f91d
cmp eax, 0x2740
je 0x47f91c
cmp eax, 0xd
jne 0x47f98d
inc ebx
cmp bx, word [ebp - 0x9a4]
jbe 0x47f86b
cmp bx, word [ebp - 0x9a4]
jbe 0x47f9bd
push str.bind___failed__we_ran_out_of_ports_
push dword [ebp - 0x994]
call fcn.004707df
push dword [ebp - 0x990]
push esi
call fcn.00472c6f
add esp, 0x10
jmp 0x47f70d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.004750b3
push eax
push str.getsockname___failed:__s
push dword [ebp - 0x994]
call fcn.004707df
push dword [ebp - 0x990]
push esi
call fcn.00472c6f
add esp, 0x1c
jmp 0x47f70d
push eax
push esi
call fcn.004750b3
push eax
movzx eax, bx
push eax
push str.bind_port_hu__failed:__s
push dword [ebp - 0x994]
call fcn.004707df
push dword [ebp - 0x990]
push esi
call fcn.00472c6f
add esp, 0x20
jmp 0x47f70d
lea eax, [ebp - 0x99c]
push eax
lea eax, [ebp - 0x988]
push eax
push dword [ebp - 0x990]
mov dword [ebp - 0x99c], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x47f95b
push 1
push dword [ebp - 0x990]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x47fa13
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.004750b3
push eax
push str.socket_failure:__s
jmp 0x47f96e
push 0x100
lea eax, [ebp - 0x104]
push eax
push edi
call fcn.00468b4a
mov ebx, dword [ebp - 0x9ac]
add esp, 0xc
jmp 0x47fa7a
cmp dword [esi + 0x210], 0
jne 0x47fa3d
test ebx, ebx
je 0x47fa73
cmp ebx, 1
jne 0x47fa4c
cmp word [ebp - 0x988], 2
jne 0x47fa73
movzx eax, word [ebp - 0x988]
dec eax
dec eax
jne 0x47fa73
push dword [ebp - 0x986]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edi, ax
test ebx, ebx
je 0x47fad5
cmp ebx, 1
je 0x47fb43
inc ebx
mov dword [ebp - 0x9ac], ebx
cmp ebx, 2
jne 0x47fa30
mov ebx, dword [ebp - 0x998]
mov eax, dword [ebp - 0x9ac]
mov dword [esi + 0x468], eax
mov eax, dword [esi + 0x158]
cmp eax, 0xffffffff
je 0x47faa5
push eax
push esi
call fcn.00472c6f
pop ecx
pop ecx
mov eax, dword [ebp - 0x990]
push 0x1c
mov dword [esi + 0x158], eax
mov dword [esi + 0x1f4], 1
pop eax
mov ecx, esi
call fcn.0047f3de
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.004959f8
leave
ret
push edi
lea eax, [ebp - 0x104]
push eax
xor eax, eax
cmp word [ebp - 0x988], 2
lea edi, [esi + 0x400]
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push edi
call fcn.0048cac4
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x47fa85
push ebx
call fcn.0047499d
push eax
push str.Failure_sending_EPRT_command:__s
push dword [ebp - 0x994]
call fcn.004707df
push dword [ebp - 0x990]
push esi
call fcn.00472c6f
mov dword [edi + 0x68], 1
add esp, 0x18
xor eax, eax
jmp 0x47fabe
lea ecx, [ebp - 0x908]
lea edx, [ebp - 0x104]
mov al, byte [edx]
test al, al
je 0x47fb64
cmp al, 0x2e
jne 0x47fb5e
mov byte [ecx], 0x2c
jmp 0x47fb60
mov byte [ecx], al
inc ecx
inc edx
jne 0x47fb4f
mov eax, edi
mov edx, edi
and edx, 0xff
push edx
shr eax, 8
push eax
push str.__d__d
push 0x14
push ecx
mov byte [ecx], 0
call fcn.00473e4e
lea eax, [ebp - 0x908]
push eax
push str.PORT
lea eax, [esi + 0x400]
push 0x4dc7f4
push eax
call fcn.0048cac4
mov ebx, eax
add esp, 0x24
test ebx, ebx
je 0x47fa85
push ebx
call fcn.0047499d
push eax
push str.Failure_sending_PORT_command:__s
push dword [ebp - 0x994]
call fcn.004707df
push dword [ebp - 0x990]
push esi
call fcn.00472c6f
jmp 0x47fb39