| re: changing execution path
Yep, more properly arrayEncrypted & arrayUnEncrypted are unsigned chars
which is equivalent to bytes for me here.
unencrypted will contain executable code once finished unencryptins so would
like to jump to there.
If this is clearer.
Thanks for the advice Andre.
I am trying to avoid jumping to assembly language here as Im converting back
from it to c++.
just a reverse engineering exercise.
Can it be done in c or another language?
I remember vaguly about labels ending with : to mark point in executable but
I think this was assembly language for some processor again.
Can a goto handle the jumpmaybe?
"André Pönitz" <poenitz@gmx.net> wrote in message
news:bkc4fa$lsj$5@anderson.hrz.tu-chemnitz.de...[color=blue]
> Kris <sonkris@optusnet.com.au> wrote:[color=green]
> > Is it possible to change execution path in c++ without jumping to asm
> >
> > eg:
> >
> > int* arrayEncrypted
> > int* arrayUnEncrypted
> >
> > after unencrypting from the encrypted to the unencrypted can I jump the[/color][/color]
ip[color=blue][color=green]
> > address to arrayUnEncrypted without resorting to assembly. currently[/color][/color]
doing[color=blue][color=green]
> > it like this but it defeats the point of my exercise to use assembly
> >
> > asm
> > {
> > push arrayUnEncrypted
> > ret
> > }
> >
> > Is there a c++ way of doing this?[/color]
>
> I.e. arrayDecrypted contains a sequence of ints which would be
> interpreted by your processor as machine code if the IP would point
> there?
>
> If so, no, there is no portable way to do that in C++, and using asm
> seems to be a reasonable alternative in this case.
>
> Andre'[/color] |