rebuild binary from pre and mid string