1 High Beam stalk at steering wheel
2 terminal 30 (continious power)
3 switch low beam/dip light
4 data to CCM = check control module
5 data to CCM = check control module
6 F1 terminal R, IC supply
7 from k7 P2 - tail light right

8 tail light right
9 tail light left
10 parking light right
11 parking light left
12 from brake light switch

13 brake light left
14 switch licence plate light on
15 3rd brake light
16 fog light front left
17 F7 15A, terminal 30
18 fog light switch
19 rear fog light switch

20 high beam via fuse F13, F14
21 low beam left F10
22 low beam right F11
23 check via CCM + CC + OBC (check control module-check control-on board computer)
24 ground
25 data to CCM

26 from K7P6 tail light left
27 from K7P9 parking light right
28 from K7P5 parking light left
29 brake light right

30 licence plate right
31 licence plate left
32 fog light right, front
33 fog light right, rear
34 fog light left, rear
35 F8 15A for rear fog light

Note: this is the ECE/EU version, some pins might be missing in other versions. But the set - up will be the same. So for the US LKM probably the pins for rear fog light might not be there respect. not connected internally.
Depending on year of production and the makers of the LKM the internal parts look different, but the pins are always for the same function.