It looks like a crude delta V charge termination using the opamp as a comparator, with D4 and C4 holding the max voltage of the cells, and R8/C5 the actual voltage of the cells. When the voltage across the cells starts to fall, the voltage on C5 will drop below the voltage of C4, making the opamps output high, turning off charge. R2 and D1 look like they add some hysteresis (the diode to stop C4 discharging through R3 when charging), so charging is held off until the button is pressed again.
Kind of a cool circuit, but I would use an actual comparator instead of an opamp. The TL072 has inputs that can sense up to VCC but not to its negative rail, so in this circuit it cannot sense Vbatt below about 2.5V.
Using "used" parts is problematic for a couple of reasons, namely that you don't know if they are in any way damaged, and also that their specs may differ enough from the intended parts to negative affect the circuit.