You are confusing two concepts here, or perhaps just using the terms incorrectly. The work function is the energy needed to remove an electron from the surface, and is not the same as the adsorption energy, which is the energy to remove an atom (or molecule) from the surface. Work functions are measured using the current extracted from a surface (via tunneling or photoemission, for example) whereas adsorption energies are usually measured with thermodynamic measurements.
yes there is always a way of doing stuff like these using STM (in fact STS). All you need to do is analyze I(dz) curves. The decay coefficient varies for both metal and the molecule on it when you approach the STM tip and record the change in Current in STS. You can find this in my publication if you want to know more.
Joshi, S. et. al, Nano Letters 2012, 12, (11), 5821-5828.
When using STM you should be aware that the work function of a metal is defined as a macroscopic quantity, averaged over large areas, whereas with STM you will get local values, depending on the specific density of states at the measurement position. A possible way to circumvent this problem might be to apply the method outlined by S. Joshi at many different positions throughout your sample and average the results.