Hola. He modificado un poco la idea de lo que sería el codecave:
de esta forma solo será necesario saber la dirección del codecave.
				
			Código [Seleccionar] 
format PE console
entry start
 
include 'win32a.inc'
 
;======================================
section '.data' data readable
;======================================
 
hello_newline  db "Hello!",10,0
bye_newline    db "Bye!",10,0
 
;=======================================
section '.code' code readable executable
;=======================================
 
start:
        call cave
        print:
        push  hello_newline
        cave_end:
        call [printf]
        call [getch]
        stdcall [exit],0
cave:
        pop eax ; guardamos en eax la direccion de eip previo
        add eax,5 ; los 5 bytes de push hello_newline
        push  bye_newline
        jmp eax
;====================================
section '.idata' import data readable
;====================================
 
library msvcrt,'msvcrt.dll'
import  msvcrt,\
        printf,'printf',\
        getch,'_getch',\
        exit,'exit'
de esta forma solo será necesario saber la dirección del codecave.