The you just ask about the source itself (which excludes AOT elements) then it is in the ModelElementData and ModelSecurity* tables. The compiled code is in Sources table. .Net CIL-compiled code is in SysXPPAssembly. Based on that on AOS startup you get the application netmodule DLL files in the XPPIL folder, and if debugging is enabled you also get the .xpp sources which can be used to debug when attaching tot he AOS process.
How is that all tied together is closed code by Microsoft for which we have no access for, since it is an integral part of the AX kernel.
AXModelStore is just a file-based container from which you can generate another ModelStore database for AX, that contains all AOT elements with their properties, the source and the compiled code as well.