4 ms·
Wouldn't that also change the xor-ed instructions? That is, wouldn't the program behave differently?
by annnnd 12y ago
Wouldn't that also change the xor-ed instructions? That is, wouldn't the program behave differently?
- sillysaurus3 12y agoNah, if instruction "foo" is xor'd with "jmp", then xoring foo with "jmp xor nop" will remove the jmp and add the nop. Then the nop is removed during decryption, because "foo xor nop" xor nop = foo. The reason this is clean and convenient is because nop is a single byte (0x0f or 0x90), which lets you replace any instruction of any size with nops. But if you had to transform jmp into an instruction of a different size, things could get hairy if the byte sizes don't line up. But you could still replace several instructions with other code.