I have a very basic knowledge about IDA and patching. From my understanding, I can change a line of code by doing Edit -> Patch program -> Assembly
. But how to I go about adding new lines of code into program?
The existing variable can also be change by doing Patch program-> Change byte
, how can new variable be added?
add new code: as CherryDT said,Find an unused place to put your code (or create one by adding a section to the file). jump to ...then jump return.
create new variable: no need to do this,"add new code" can do everything.