-
Not sure if this is a bug or if I've misunderstood something.
Using the decode to assembler example, a NOP is added for each instruction and then reassembled using the serializer with relocations enabled.
The immediate values for both JMP instructions have been modified to account for additional instructions added. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Are you using labels or absolute addresses? If you use an absolute address then it doesn't matter how many instructions you insert as it will stay jmp 0x0C, so that is expected behavior. |
Beta Was this translation helpful? Give feedback.
-
No, it's not using labels. Makes sense now.
For the decode to assembler example, how can I create a label for 0x3 before decoding the JNZ instruction? Would I need to decode all instructions first and create a label for each branch encountered or is there a simpler way once the JNZ instruction is decoded? Thanks for your time. |
Beta Was this translation helpful? Give feedback.
-
Yes. Not sure how useful this could be, but you can take a look at how I implemented it https://github.com/es3n1n/obfuscator/blob/master/src/lib/analysis/passes/collect_img_references.hpp#L11 |
Beta Was this translation helpful? Give feedback.
Yes. Not sure how useful this could be, but you can take a look at how I implemented it
https://github.com/es3n1n/obfuscator/blob/master/src/lib/analysis/passes/collect_img_references.hpp#L11
and
https://github.com/es3n1n/obfuscator/blob/master/src/lib/analysis/passes/label_references.hpp#L12