Go through Day 023, it should be clear how the looped live code editting works.
IIRC, when you start recording, the whole game memory block is saved into a local file "loop_edit_x_state.hmi", and there is a "loop_edit_1_input.hmi" file created, which is for saving the game input data of every frame. The "loop_edit_1_input.hmi" file stop recording the game input when you hit the recording button again.
During playback, it just overwrites the game memory block with content of "state.hmi" file, and overwrites the game input of every frame with content of "input.hmi" file.
The loop process is trivial, you can find out the detail in the code base (if you've pre-ordered the game.)
... to some specific point of time, it does it by passing the entire game state into game dll every frame.
Remember that, a) the game is always running during the looped live code editting process, and 2) the game memory always starts at the same base address. Don't complicate the situation, it's just a copying-and-pasting trick that Casey uses, based on the underlying structure of the program (separate platform from game).