mescc: Refactor function-offset.