Well there are two parts to making a crypter. The first part is meshing your target file(s) with the stub that you have coded. Usually the stub will locate the OEP in the target program(s) and append this this along with the actual exe to the stub, and then encrypt the target. Then, when the program is run, the stub does anti-debug and anti-vm checks, decrypts the target program, and then uses the OEP that it stored along with CreateThread() to start the target going. However, if you're more advanced (and I mean a lot more) you can create a special handler that only decrypts the target in RAM as each piece of memory is needed, and then encrypt it again when it's not in use, but this is much more difficult to code and rarer to see.