I'm having trouble understanding how to go about defining unaligned pointers.
foo UNALIGNED* ptr = nullptr;
file->Lock(size, &ptr);
UNALIGNED is a windows.h macro that expands to __unaligned (a Microsoft extension). Since this whole operation you're using is pretty Windows-specific, it shouldn't matter if you're being platform-specific with the unaligned stuff here, but don't get into the habit of leaking this stuff into any public interfaces or platform-neutral code.
For similar cases, you have other options. memcpy can, for some data structures, get the job done here. memcpy makes no alignment assumptions so it can copy to/from an unaligned chunk of bytes to an aligned POD object. It may be faster or slower than unaligned accesses depending on the CPU architecture you're compiling for, but it will pretty much always be faster than parsing a file into an object if the file doesn't otherwise require parsing anyway.
Since this is all just for ID3DXFile which is part of an old, out-dated, obsolete version of D3D, you might consider just dropping all use of D3DX (it doesn't exist anymore on newer SDKs or for newer versions of D3D) and use a library like Open Assert Import Library to load your model files. That gives you a more forward-compatible API and lets you load for more than just .x files.