The highest frequency that can be represented in digital audio is half the sample rate. If you try to record a frequency of 823010 Hz at a sample rate of less than 1.6 MHz the result should be silence because the highest frequency that can be represented with a sample rate of 1.6 MHz is 800,000 Hz. Also, it is extremely unlikely that any sound card will support frequencies over 100,000 Hz (most are limited to a little over 20,000 Hz).
A square wave can be considered to be a combination of sine waves. For example, here are two screenshots of the spectrogram view of a 100 Hz square wave:


Observe that the lowest frequency is 100 Hz, and that harmonics occur at 100, 300, 500, 700, 900 … all the way up to 22 kHz (The highest frequency that can be represented with a sample rate of 44100 Hz is 22050 Hz).
If you isolate the lowest (100 Hz) frequency, it looks like this:

Notice that it is a sine wave. It is the presence of overtones that make a square wave square. So to create a square wave of a particular frequency, the sample rate must be several times higher than the square wave’s frequency so that the overtones can be represented.
This is a 5000 Hz square wave in a track with a sample rate of 44100 Hz (about 8 times higher than the square wave frequency. Observe that it does not look very “square”, because 44100 Hz sample rate can only support the first harmonic (15000 Hz) and no more. The next harmonic would be 25,000 Hz, but that’s too high for a sample rate of 44100.

Here’s the same 500 Hz square wave, but with a sample rate of 192 kHz (192,000 Hz). The higher sample rate allows the harmonics at 15000, 25000, 35000, 45000, 55000, 65000, 75000, and 85000 Hz to be represented, so the waveform looks a lot more “square”.

The takeaway is that normal consumer sound cards cannot record or play actual square waves that have a fundamental frequency over 5 kHz because they can’t handle enough of the harmonics.