It's a simple R-S Latch made of two NOR logic gates in separate packages. Several pull-up resistors forcing it to be in reset state by default. NOR gate latch will react on high-level SET and RESET signals. High logic level PButton signal changes it's state to SET and U12 will produce low level on it's output. This output is connected to INHIBIT signal of U17 regulator. Regulator only works if INHIBIT signal is low-logic level. Otherwise it will cut the power to rest of the system.
Latch and U17 are powered directly from the battery, so they continue to work even when the rest of the system is not powerd. D2 diode is used to provide a voltage drop of about 0.7V, so that latch and power switch voltage would be about 3.3V with fully charged battery (that would be about 3.9~4.1V). This is important because the same switch wll be used with microcontroller directly (which is powered by U17 regulator with 3.1V).