CheatMaker 论坛

注册

 

发新话题 回复该主题

Cheat Engine 6.x - 添加数值类型:3 字节 [复制链接]

1#




要输入的代码:
  1.     alloc(TypeName,256)
  2.     alloc(ByteSize,4)
  3.     alloc(PreferedAlignment, 4)
  4.     alloc(ConvertRoutine,1024)
  5.     alloc(ConvertBackRoutine,1024)

  6.     TypeName:
  7.     db '3 Byte',0

  8.     ByteSize:
  9.     dd 3

  10.     PreferedAlignment:
  11.     dd 1

  12.     ConvertRoutine:
  13.     //jmp dllname.functionname
  14.     [64-bit]
  15.     //or manual:
  16.     //parameters: (64-bit)
  17.     //rcx=address of input
  18.     xor eax,eax
  19.     mov ax,[rcx] //eax now contains the bytes 'input' pointed to

  20.     ret
  21.     [/64-bit]

  22.     [32-bit]
  23.     //jmp dllname.functionname
  24.     //or manual:
  25.     //parameters: (32-bit)
  26.     push ebp
  27.     mov ebp,esp
  28.     //[ebp+8]=input
  29.     //example:
  30.     mov eax,[ebp+8] //place the address that contains the bytes into eax
  31.     mov ax,[eax] //place the bytes into eax so it's handled as a normal 4 byte value
  32.     and eax,ffff //cleanup

  33.     pop ebp
  34.     ret 4
  35.     [/32-bit]

  36.     //The convert back routine should hold a routine that converts the given integer back to a row of bytes (e.g when the user wats to write a new value)
  37.     //function declared as: stdcall void ConvertBackRoutine(int i, unsigned char *output);
  38.     ConvertBackRoutine:
  39.     //jmp dllname.functionname
  40.     //or manual:
  41.     [64-bit]
  42.     //parameters: (64-bit)
  43.     //ecx=input
  44.     //rdx=address of output
  45.     //example:
  46.     mov [rdx],cx //place the integer the 4 bytes pointed to by rdx

  47.     ret
  48.     [/64-bit]

  49.     [32-bit]
  50.     //parameters: (32-bit)
  51.     push ebp
  52.     mov ebp,esp
  53.     //[ebp+8]=input
  54.     //[ebp+c]=address of output
  55.     //example:
  56.     push eax
  57.     push ebx
  58.     mov eax,[ebp+8] //load the value into eax
  59.     mov ebx,[ebp+c] //load the address into ebx


  60.     mov [ebx],ax //write the value into the address
  61.     pop ebx
  62.     pop eax

  63.     pop ebp
  64.     ret 8
  65.     [/32-bit]
复制代码
效果图:



备注:游戏中的值为0-255内的值需要用模糊搜索。
分享 转发
TOP
发新话题 回复该主题