That double sprocket will be screwed on, with a LH thread.
The square on the shaft end is for the purpose of holding the shaft, while getting the sprocket to start unscrewing.
Its having been butchered pretty much makes it useless, though.
It may be better to regard this machine as a learning/training exercise, rather than a practical restoration. Due to lack of availability of machine-specific info and parts, and the 'past tenant's improvements'

.