Retina, 3131 24 bytes
7 bytes thanks to Martin Ender.
.+ $* MrM!&`11+ m`^&`(1+)\1+$ $1(?=\1+$) 1 How it works
The regex /^(1+)\1+$/ captures the largest proper divisor of a certain number represented in unary. In the code, the \1+ is turned to a lookahead syntax.