Help understanding encoder
It's an Allegro Microsystems A3187L. This is a Hall sensor IC. Search for 'A3187L allegro' and it's the first Google hit. Seems like it's discontinued.

Datasheet Link

There are two sensors. Each one will output a square wave, based on the flux changes it senses as the magnetic disc spins past it. The sensors are arranged to make a 90-degree quadrature waveform, which not only increases the number of pulses per revolution for counting but can be used to detect direction as well.

You probably don't need to fully reverse-engineer this. The sensor outputs will be open drain, and can be used with standard logic with a pull-up. If you have access to an oscilloscope you can measure the number of pulses / rev, and figure out the phasing of the two signals for direction sensing.

Generally, the best way to deal with these in a microcontroller is to wire up each one to an interrupt.