Reworked multiplication foreign function