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 


Converting script to C++.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Mahcoisa
Advanced Cheater
Reputation: 0

Joined: 19 Oct 2007
Posts: 63

PostPosted: Mon Jul 26, 2010 5:24 pm    Post subject: Converting script to C++. Reply with quote

This is the AA code.
Code:
[enable]
alloc(GetUP,64)
alloc(user,12)
alloc(pass,12)
registersymbol(user)
registersymbol(pass)
label(GetUPret)

00691C74:
jmp GetUP
GetUPret:

GetUP:
mov ebx,[eax]
mov [user],ebx
mov ebx,[eax+04]
mov [user+04],ebx
mov ebx,[eax+08]
mov [user+08],ebx
mov ebx,[edi]
mov [pass],ebx
mov ebx,[edi+04]
mov [pass+04],ebx
mov ebx,[edi+08]
mov [pass+08],ebx
call 00663c2a//Original Op
jmp GetUPret

[disable]
00691C74://E8 ? ? ? FF 8B F8 8B 45 08 3B C3 C6 45 FC 04 74 ? 83 C0
db e8 b1 1f fd ff
dealloc(GetUP)
dealloc(user)
dealloc(pass)
unregistersymbol(user)
unregistersymbol(pass)


This is the C++ functions that i tried to convert myself :

Code:
DWORD AddyID = 0x0080B6E5;
DWORD user;
DWORD pass;
unsigned long Addy = 0x00591A32;
unsigned long kaka = 0x005719f4;
void __declspec(naked) __stdcall GetUp()

{
__asm
{
mov ebx,[eax]
mov [user],ebx
mov ebx,[eax + 4]
mov [user + 4],ebx
mov ebx,[eax + 8]
mov [user + 8],ebx
mov ebx,[edi]
mov [pass],ebx
mov ebx,[edi + 4]
mov [pass + 4],ebx
mov ebx,[edi + 8]
mov [pass + 8],ebx
call kaka
}
}
void Doit()
{
*(BYTE*)Addy = 0xE9; // Jump opcode
   *(DWORD*)(Addy + 1) = (int)(((int)GetUp - (int)Addy) - 5);
   *(BYTE*)(Addy + 5) = 0x90;
}
void DontDoitAgain()
{
memcpy((void*)0x00691C74,"xe8\xb1\x1f\xfd\xff",5);

}



i dunno if i converted it right, and i want to convert the user and pass DWORDS to show it on a Label.

Can anyone help me?[/code]
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 891

PostPosted: Mon Jul 26, 2010 8:28 pm    Post subject: Reply with quote

Are you compiling this into a DLL that you're injecting into the target process? Looks like a lot more effort than needed.
Back to top
View user's profile Send private message
Mahcoisa
Advanced Cheater
Reputation: 0

Joined: 19 Oct 2007
Posts: 63

PostPosted: Mon Jul 26, 2010 9:39 pm    Post subject: Reply with quote

Yes, i'm trying to make it as DLL
i wanna show the pass and user on a label
can someone help me ?
Back to top
View user's profile Send private message
nerrazzuri
How do I cheat?
Reputation: 0

Joined: 12 Apr 2007
Posts: 4

PostPosted: Mon Sep 06, 2010 7:42 am    Post subject: Reply with quote

Code:
const unsigned long ulGetUPAddy = 0x00691C74;
unsigned long ulGetUPret = ulGetUPAddy + 5;
unsigned long ulOriginalOpcode = 0x00663c2a;
void __declspec(naked) GetUPAsm()
{
      __asm
      {
            mov ebx,[eax]
            mov [user],ebx
            mov ebx,[eax+04]
            mov [user+04],ebx
            mov ebx,[eax+08]
            mov [user+08],ebx
            mov ebx,[edi]
            mov [pass],ebx
            mov ebx,[edi+04]
            mov [pass+04],ebx
            mov ebx,[edi+08]
            mov [pass+08],ebx
            call dword ptr [ulOriginalOpcode]//Original Op
            jmp dword ptr [ulGetUPret]
      }
}

void Doit()
{
      *(unsigned char*)ulGetUPAddy = 0xE9;
      *(unsigned long*)(ulGetUPAddy + 1) = jmp(ulGetUPAddy, GetUPAsm);
}

void Stop()
{
      *(unsigned char*)ulGetUPAddy = 0xe8;
      *(unsigned long*)(ulGetUPAddy + 1) = 0xfffd1fb1;
}


This should work.
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 Gamehacking 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