The direct way to do this would be to
1) extract the 503 time series from the ROI using a command like
3dmaskdump -noijk -mask ROImask.nii -o ROIdump.1D timeseries.nii
2) transpose the output file so that each column is a voxel timeseries, rather than each row
1dtranspose ROIdump.1D > ROIts.1D
3) Produce a 503 sub-brick dataset of the correlation of each column with all voxels:
3dTcorr1D -pearson -prefix ROIcorr.nii -mask Brainmask.nii timeseries.nii ROIts.1D
The i-th volume in the output dataset ROIcorr.nii will have the correlations of the i-th column in ROIts.1D with all the voxel timeseries from ROIts.1D. If you now want to extract all those to a text file, you can do that with 3dmaskdump. Note that this would be a pretty big file: 503 correlations times (say) 100,000 brain voxels = 50.3 million numbers in text form.