Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


C++ and ASM

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Ziztey
Grandmaster Cheater
Reputation: 0

Joined: 20 Dec 2007
Posts: 535
Location: 127.0.0.1

PostPosted: Mon Dec 01, 2008 10:25 am    Post subject: C++ and ASM Reply with quote

Okay, I need to clerify a few things, this is the code i was using:

Code:

#include <Windows.h>


VOID MainLoop()
{
   for (;;Sleep(10))
   {
        if (GetAsyncKeyState(VK_F1))
        {

              __asm {

mov esi,0 [0x0067BCBD]

}
        }
   }
}


BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
{
    if (dwReason == DLL_PROCESS_ATTACH)
         CreateThread(0, 0, (LPTHREAD_START_ROUTINE)MainLoop, 0, 0, 0);
    return TRUE;
}


It didn't work, i tried a few addresses but none of them worked.
Let say I have this Cheat Engine script:


Code:

[Enable]
alloc(ItemVac,128)
label(return)
ItemVac:
pushad
mov ecx,[ebp+8]
mov ebx,[ebp-24]
mov [ecx],ebx
mov [ecx+4],eax
mov ecx,eax
mov eax,ebx
lea edx,[eax-19]
mov [ebp-34],edx
lea edx,[ecx-32]
add eax,19
add ecx,A
mov [ebp-30],edx
mov [ebp-2C],eax
mov [ebp-28],ecx
popad
push eax
push [ebp-24]
lea eax,[ebp-34]
jmp return
004B44E7: //50 FF 75 DC 8D 45 CC 50 FF 15
jmp ItemVac
nop
nop
return:

[Disable]
004B44E7:
push eax
push [ebp-24]
lea eax,[ebp-34]


That was just an example, please show me. Smile
+rep for the people which help me

_________________
kenta7795 wrote:
Lol, how do I know its fake?

The source is a .cpp, and a .h

Private server much?
Back to top
View user's profile Send private message
GMZorita
Grandmaster Cheater Supreme
Reputation: 0

Joined: 21 Mar 2007
Posts: 1361

PostPosted: Mon Dec 01, 2008 10:53 am    Post subject: Reply with quote

Try:
Code:
mov [0x0067BCBD],0 

If you want to make 0x67BCDB have the value = 0.

For the asm script, you will have to create your own codecave and redirect the memory to it.

_________________
Gone
Back to top
View user's profile Send private message
Ziztey
Grandmaster Cheater
Reputation: 0

Joined: 20 Dec 2007
Posts: 535
Location: 127.0.0.1

PostPosted: Mon Dec 01, 2008 10:59 am    Post subject: Reply with quote

GMZorita wrote:
Try:
Code:
mov [0x0067BCBD],0 

If you want to make 0x67BCDB have the value = 0.

For the asm script, you will have to create your own codecave and redirect the memory to it.

Could you show me an example, please?

_________________
kenta7795 wrote:
Lol, how do I know its fake?

The source is a .cpp, and a .h

Private server much?
Back to top
View user's profile Send private message
GMZorita
Grandmaster Cheater Supreme
Reputation: 0

Joined: 21 Mar 2007
Posts: 1361

PostPosted: Mon Dec 01, 2008 11:12 am    Post subject: Reply with quote

Ziztey wrote:
GMZorita wrote:
Try:
Code:
mov [0x0067BCBD],0 

If you want to make 0x67BCDB have the value = 0.

For the asm script, you will have to create your own codecave and redirect the memory to it.

Could you show me an example, please?


Code:

#define JMP(frm, to) (int)(((int)to - (int)frm) - 5);

void _declspec(naked) MesoCave() //Meso Drop Code cave
{
   _asm
   {
      mov eax,[iMesoAmount]
      mov [esi+0x000000bc],eax
      jmp dwMesoDropret
   }
}

*(BYTE*)dwMesoDropaddy = 0xE9;//JMP
*(DWORD*)(dwMesoDropaddy+1) = JMP(dwMesoDropaddy, MesoCave);//Address


Kinda like that, tho you have to define the values.

[/code]

_________________
Gone
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites