[Tutorial]How to convert ASM script to C++
Posted: Fri Jun 18, 2010 9:45 pm
Yes, this is a tutorial including converting simple AA script, to codecave scripts.
It will be short and sweet. I don't include any dll stuff inside just merge it with the dll you've made.
Ok, let's start it.
We take this simple Instant Drop script
now to convert to a C++ script, you need to have it's bytes, which located in the memory view of Cheat Engine. (To learn on how to view Cheat Engine memory without getting HAD, LOOK HERE.)
I'll just give you the bytes here.
The byte should be, 00 00 00 00 00 40 8f 40. This is the [disable] part, while for the [enable] part, we see that,
So, the bytes should be 00 00 00 00 00 00 00 00.
Create variables for the address that will be edited in the script.
Declare a variable that will hold the bytes when the hack is enabled.
Declare a variable that will hold the bytes when the hack is disabled.
And write a function for the hacks
now you are successfully converted a simple AA script to C++. 
It will be short and sweet. I don't include any dll stuff inside just merge it with the dll you've made.
Ok, let's start it.
We take this simple Instant Drop script
Code: Select all
//instant drop
// updated to MSEA 93 by nerrazzuri
[enable]
00ad0dd0:
add [eax],al
add [eax],al
add [eax],al
add [eax],al
[disable]
00af0dd0:
add [eax],al
add [eax],al
add [eax-71],al
inc eax
I'll just give you the bytes here.
Code: Select all
add [eax], al //bytes 00 00
add [eax-71], al//bytes 00 40 8f
inc eax// bytes 40
Code: Select all
add [eax], al // bytes 00 00
Create variables for the address that will be edited in the script.
Code: Select all
DWORD dwInstantDropAddy = 0x00af0dd0;
Code: Select all
BYTE Enabledbytes[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
Code: Select all
BYTE Disabledbytes[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x8f, 0x40};
Code: Select all
void InstantDrop (__in BOOL bEnable)
{
if(bEnable)
{
memcpy((void*)dwInstantDropAddy, Enabledbytes, sizeof(Enabledbytes));
}
else
{
memcpy((void*)dwInstantDropAddy, Disabledbytes, sizeof(Disabledbytes));
}
}
