Simply put, the capacitor C4C5 is an AC-coupled input and output, so the front stage is an in-phase AC amplifier circuit, and C6 will attenuate the gain of high-frequency signals to some extent and play a filtering role. The latter stage constitutes a comparator circuit, which plays the role of signal shaping;
Hysteresis-free comparison circuit;
Presumably, the circuit you got has been modified many times, with problems in performance and stability, which should be very different from the original circuit;