mediation but not moderation analysis

Happy New Year, Zhihao!

Let's see if the following is what you're looking for.

(1) in model B1=a+b*B2+error1, b is significant

You can do this yourself with any linear modeling program in R, Matlab, SAS, SPSS, etc.

(2) in model B1=c+d*M+error2, d is significant

First, create a 3D dataset for each subject with B1 with a command like:

3dcalc -prefix myB1 -a M-dataset -expr 'b1' (b1 is the B1-value for each subejct)

Then run model (2) with 3dttest++ by treating M as a covariate. You need to create a covariate file in a tabular format (read the 3dttest++ help for details).

(3) in model B1=e+fB2+gM+error3, g is significant; and f is significantly smaller than b

You can do (3) the same way as (2).

If you follow the above steps, the only dangling end is the last part ("f is significantly smaller than b"), which we can talk about once you reach there.