Squared Möbius Function for Half-Integral Matrices and Its Applications