That's not how it works. The first profile is overwritten with an ROP-chain. The second works, but the lengh field is set to high, so the system settings app reads to much data and overwrites the stack. Gateway places an adress to an ROP-gadget at exactly the place on the second profile, which overwrites the return adress. The 3DS jumps to that location and executes the code. After the execution the ROP-gadget pops the next adress from the ROP in the pc (program counter) register and the 3DS jumps to the next ROP-gadget. One of the next ROP-gadget reads the first profile and place it in RAM. Then it sets the stack pointer to that location and the processor continues execution on the second ROP-chain. This ROP-chain then mounts the SD card as YS:/, reads 0x9000 bytes from the Launcher.dat file, decrypts the data using OpenSSL and finally sets sp to the adress of the third ROP-chain.