I don't believe it will work accurately with the LM358 anyway and I can't understand why you have two of them in parallel but the point about the potential divider is this:
Input voltage>----- R1-----R2-----R3-----R4--M--R18-----+5V where 'M' is the Measurement point. Its a 2M to 1.2K potential divider, it drops the input voltage by about 1667 times before it reaches the op-amp.
The other half of the circuit is identical using R5, R6,R7,R8 ad R17.
I think is a circuit used to measure a floating voltage with an high impedance probing.
If we call Rx=R1+R2+R3+R4 and Ry=R5+R6+R7+R8 and we focus on the meshes Vi-Rx-R18-Vcc(the 5 V voltage) and Vi-Ry-R17-Vcc we can find the voltage
seen at the left side of R9 that is connected also to R16 and R12 that is connected also to R13. Let's call the first node M and the second one N. Applying the superposition we have the voltages:
VM=[R18*(Vcc+Vi)+(Rx+Ry*R17)*Vcc]/(Rx+Ry*R17+R18) and
VN=[R18*(Vcc-Vi)+(Rx+Ry*R17)*Vcc]/(Rx+Ry*R17+R18)
Now the high side op-amp does Vout1=k*(VM-VN) while the second one Vout2=k*(VN-VM) where k is the gain k=R10/R9 (all the series and feedback resistor are identical to these).
Notice that the op-amp are single voltage supplied, then Vout1=k*(VM-VN) if VM>VN, otherwise is 0 and Vout2=k*(VN-VM) if VN>VM otherwise is 0. This means that, depending from the polarity of Vi one of the two Vout1 or Vout2 is 0. Then on the output capacitor you will always have a positive voltage that means the circuit is also a rectifier, this is why two op-amp are used.
Since Rx=Ry (we can call them Rs) and R17=R18 (we can call them Rp) then VM-VN=Rp/(Rs+Rp)*Vi
having Rs>>Rp, then VM-VN=Rp/Rs*Vi or 0 if Vi>0, in an analog way VN-VM
The total gain, from Vi to the output will be H=Rp/Rs*k*0.5. This last 0.5 is due to the voltage divider R19-R20 (don't forget that Vout1 or Vout2 is zero depending from the polarity of Vi)
Numerically H=1.2k/2M*806k/24.9k*0.5≈1/100
It seems to me that the transfer function is Vout=|Vi|/100
R17 and R18 are used to make the single supplied op-amps working with proper common mode voltage, since the inputs are floating.
Please check my calculations I'm not 100% sure I didn't do some mistake.
You are right.
I explained how the circuit works and the meaning of the two resistors R17 and R18. I didn't check (even if it was very easy) if the common mode voltage was in range. However I'm not sure (even if the used symbols suggest so) if the supply of the op-amps is 5V or higher (at least 7.5V).