- UID
- 442645
- 主题
- 0
- 阅读权限
- 30
- 帖子
- 607
- 精华
- 0
- 积分
- 304
- 金钱
- 3669
- 荣誉
- 0
- 人气
- 1
- 在线时间
- 878 小时
- 评议
- 0
- 帖子
- 607
- 精华
- 0
- 积分
- 304
- 金钱
- 3669
- 荣誉
- 0
- 人气
- 1
- 评议
- 0
|
感谢10楼大佬发的CT,表中默认数值类型是 RPG VX type,用的时候简单方法是直接改成4字节,然后改数的时候记得2N+1,即想改成99就写199
复杂点的方法就是右键点扫描界面的“数值类型”右边的地方,选“定义新的自定义类型(自动汇编),然后把下面的代码粘贴进去点确定
alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(UsesFloat,1)
alloc(CallMethod,1)
TypeName:
db 'RPG VX type',0
ByteSize:
dd 4
UsesFloat:
db 0 //Change to 1 if this custom type should be treated as a float
CallMethod:
db 1 //Remove or change to 0 for legacy call mechanism
//The convert routine should hold a routine that converts the data to an integer (in eax)
//function declared as: cdecl int ConvertRoutine(unsigned char *input, PTR_UINT address);
//Note: Keep in mind that this routine can be called by multiple threads at the same time.
ConvertRoutine:
//jmp dllname.functionname
[64-bit]
//or manual:
//parameters: (64-bit)
//rcx=address of input
//rdx=address
mov eax,[rcx] //eax now contains the bytes 'input' pointed to
shr eax, 1
ret
[/64-bit]
[32-bit]
//jmp dllname.functionname
//or manual:
//parameters: (32-bit)
push ebp
mov ebp,esp
//[ebp+8]=address of input
//[ebp+c]=address
//example:
mov eax,[ebp+8] //place the address that contains the bytes into eax
mov eax,[eax] //place the bytes into eax so it's handled as a normal 4 byte value
shr eax, 1
pop ebp
ret
[/32-bit]
//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)
//function declared as: cdecl void ConvertBackRoutine(int i, PTR_UINT address, unsigned char *output);
ConvertBackRoutine:
//jmp dllname.functionname
//or manual:
[64-bit]
//parameters: (64-bit)
//ecx=input
//rdx=address
//r8=address of output
//example:
shl ecx, 1
inc ecx
mov [r8],ecx //place the integer at the 4 bytes pointed to by r8
ret
[/64-bit]
[32-bit]
//parameters: (32-bit)
push ebp
mov ebp,esp
//[ebp+8]=input
//[ebp+c]=address
//[ebp+10]=address of output
//example:
push eax
push ebx
mov eax,[ebp+8] //load the value into eax
mov ebx,[ebp+10] //load the output address into ebx
shl eax, 1
inc eax
mov [ebx],eax //write the value into the address
pop ebx
pop eax
pop ebp
ret
[/32-bit] |
-
总评分: 人气 + 1
查看全部评分
|