0

I have this cheat engine script:

[Enable]
009516C2:
jns 0095138F

[Disable]
009516C2:    
je 0095138F

I want to convert it to C++, Can anyone help?

D-RAJ
  • 3,263
  • 2
  • 6
  • 24
  • What do you mean "Convert it to C++". Do you mean you want to write a C++ program which does the same thing as the cheat engine script when run under the cheat engine? – Mike Vine Feb 10 '21 at 14:39
  • Yes, I can just run this script, not in a cheat engine, just in a trainer made in c ++ – Gavriel Sinvani Feb 10 '21 at 14:50
  • What processor is the assembly language for? The `je` could be *jump if even* or *jump if equal*. – Thomas Matthews Feb 10 '21 at 17:52
  • What's the comparison that sets the condition codes? Need the information in order to set up the `if` statement. – Thomas Matthews Feb 10 '21 at 17:53
  • i dont know how i check it? – Gavriel Sinvani Feb 10 '21 at 18:12
  • @ThomasMatthews This is x86-32bit asm. The `je` means *jump-if-equal* in this scenario. @GavrielSinvani The difference between `jns` and `jne` is a single byte. In order to implement this in c++, you need to change the byte within the process. This can be done using `WriteProcessMemory` and `VirtualProtectEx`. In order to enable, you will need to write `'\x89'` to 00951390, and to disable you will have to write `'\x84'` to the same address. This changes the opcodes from `je` (0F 84) to `jns` (0F 89) and vice versa. – Irad Ohayon Apr 08 '21 at 23:26

0 Answers0