protected void checkMagic() throws IOException {
		if (!DexConstants.DEX_MAGIC_BASE.equals(new String(getMagic()))) {
			throw new IOException("not a dex file.");
		}
	}
https://android.googlesource.com/platform/art/+/master/libdexfile/dex/dex_file.h#91
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/dex/format/DexHeader.java