joaquimandrade: This is part of the -fPIC compile flag valve uses on it's linux builds.
Don't get me started on this.
Anyway, that function uses a sneaky assembly hack to retrieve the current program counter value and stores it into the EBX register (calls the dummy function and reads the return address off the stack).
The code then adds a fixed offset to EBP (the distance from the current location to the global offset table) and then uses this register for all global value lookups.
It's an alternative to using load time relocation. Why you'd want to occupy a general purpose register and impose a runtime overhead is beyond me.