A、x4-y4=(x2+y2)(x2-y2)=(x2+y2)(x+y)(x-y),故本选项错误;B、a3b-ab=ab(a2-1)=ab(a+1)(a-1),故本选项错误;C、x2-3x-4=(x+1)(x-4),故本选项正确;D、应为x2+6x+9=(x+3)2,故本选项错误.故选C.