Thoughts on "pure" mathematics
Not sure if this exactly the right place, but here goes. This is just my perspective:

I don't consider myself a mathematically-inclined person, nor has math ever played a large part in my life up until about five or so years ago as I got more into my programming explorations. However, math has always both fascinated and terrified me to a certain extent. There are three main points I'd like to make:

1 - To me, there is no distinction between "pure" or "applied" or "higher" or "lower/trivial" mathematics. It's all just about what your personal skill level is, what you're trying to accomplish, and how long and what resources you would need in order to close whatever gap may lie between those two points.

2 - I'm not going to say that asking "what is pure mathematics used for?" is necessarily the wrong question, but I strongly feel that the far more constructive and exciting question is "what do you want to use pure mathematics for?" It took me awhile to even realize that perspective. It also took me awhile to realize that you can primarily "apply" math to anything you see, provided you have a rigorous understanding of both the phenomena you're working with and the type/level of math that best suites that phenomena. In a kind of inverse fashion, you could use what would be considered "pure" mathematics to imbue something with behavior. So for instance, easier said than done, but you could create malware (for research purposes only!) that utilizes properties of magic squares in its obfuscation, provided you knew how both magic squares and malware both fundamentally work and are constructed in and of themselves.

The three main reference resources that I find extremely helpful are:

Mathematics 1001

The Concise Oxford Dictionary of Mathematics

Oxford Very Short Introduction series - the math books

3 - As I've probably stated before, and I will restate some variant of this when I feel it's appropriate- I also strongly feel that knowledge of mathematics is not a touchstone for intelligence. No field of endeavor is.

As a final note, I know I may be using some terms loosely here. I'm not a mathematician, nor do I aspire to be one.

I'd be curious to know what others think about this. There's more I'd like to add, but perhaps later.

Thanks for reading,
Using magic squares in malware sounds like an interesting idea for sure. Math can be used for a lot of novel ideas. Like obfuscation but I think the main part in my experience is developing different algorithms. Can use it to create interesting ways to send/recieve c2-communication, encrypt information (although homemade encryption is probably something to be avoided. But if you know maths, you could implement some encryption algorithms without needing to import any external libraries or doing any windows API calls).

Yeah now that you mention algorithms that makes a lot of sense. I've taken a handful of math and CS classes (I got as far as Calculus II and data structures). Adding to what you're saying I would of course also recommend looking at discrete math - surprise surprise.

I forgot to mention earlier two other resources I find personally useful:

Mathematics Trench

Map of Mathematics

I realize that some may take issue with these for whatever reason, which from some rigorous mathematical perspective is probably legitimate. I don't know. These things have helped me greatly as I try to somehow operate outside of academia. My attitude is useful stuff can come from anywhere. I would like to think that if a cartoon character or inebriated homeless person (or homeless inebriated cartoon character) offered some perspective or idea I never would have considered then I would be immediately and deeply interested.