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++ AA->ASM

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

Joined: 11 Nov 2006
Posts: 738

PostPosted: Thu May 06, 2010 11:50 pm    Post subject: C++ AA->ASM Reply with quote

AA
Code:
[ENABLE]
alloc(NoKB,64)

009973F6: //39 5D ? 75 ? 39 5D ? 74 ? 8B 8F ? ? ? ? DB 45 ? 51 51 DD 1C 24 51 DB 45 ? 51 8D ? ? F7
jmp NoKB
nop

NoKB:
pushad
mov [ebp+c],0
mov [ebp+10],0
popad
cmp [ebp+0c],ebx
jne 00997400//BOTTOM ADDRESS OPCODE
jmp 009973FE //THREE ADDRESS BELOW

[disable]
009973F6: //39 5D ? 75 ? 39 5D ? 74 ? 8B 8F ? ? ? ? DB 45 ? 51 51 DD 1C 24 51 DB 45 ? 51 8D ? ? F7
cmp [ebp+0c],ebx
jne 00997400
cmp [ebp+10],ebx

dealloc(NoKB)


cpp code

Code:

#define jmp(frm, to) (int)(((int)to - (int)frm) - 5)

__declspec(naked) void __stdcall NoKbAssembly()
{
   __asm
   {
      pushad
      mov [ebp+0xc],0
      mov [ebp+0x10],0
      popad
      cmp [ebp+0x0c],ebx
      jne 0x00997400
      jmp dword ptr ds:0x009973FE
   }
}


            case IDC_NOPKB:
            {
               switch(Button_GetCheck(GetDlgItem(hWnd, IDC_NOPKB)))
               {
                  case BST_CHECKED:
                  {
                     //Start No Player KB
                     memcpy((LPVOID)&btNOKB, (LPVOID)0x009973F6, 8);
                     *(BYTE*)(0x009973F6) = 0xe9;
                     *(DWORD*)(0x009973F6 + 1) = jmp(0x009973F6, NoKbAssembly);
                     *(DWORD*)(0x009973F6 + 5) = 0x90;
                  }
                  break;
                  case BST_UNCHECKED:
                  {
                     //Disable No Player KB
                     memcpy((LPVOID)0x009973F6, (LPVOID)&btNOKB, 8);
                  }
                  break;
               }
            }
            break;


When i jump into a monster, i crash. Is my cpp code incorrect? (i just copied snippets pertaining to the nokb section)
Back to top
View user's profile Send private message
Henley
Grandmaster Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 671

PostPosted: Fri May 07, 2010 12:11 am    Post subject: Reply with quote

Code:
*(DWORD*)(0x009973F6 + 5) = 0x90;


to

Code:
*(BYTE*)(0x009973F6 + 5) = 0x90;
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Fri May 07, 2010 7:57 am    Post subject: Reply with quote

you'll also find you probably have to change memory protections with virtualprotect/ex
Back to top
View user's profile Send private message
dvdcowboy
Grandmaster Cheater
Reputation: 0

Joined: 11 Nov 2006
Posts: 738

PostPosted: Sat May 08, 2010 9:25 am    Post subject: Reply with quote

Dark Bÿte wrote:
Code:
*(DWORD*)(0x009973F6 + 5) = 0x90;


to

Code:
*(BYTE*)(0x009973F6 + 5) = 0x90;


I still crash once i run into a character

Slugsnack wrote:
you'll also find you probably have to change memory protections with virtualprotect/ex


I have a HSCRC+MSCRC if thats what you're referring to
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sat May 08, 2010 9:30 am    Post subject: Reply with quote

You're crashing for the exact reason i'm telling you. Look up those functions I gave you and think why you need to use them
Back to top
View user's profile Send private message
dvdcowboy
Grandmaster Cheater
Reputation: 0

Joined: 11 Nov 2006
Posts: 738

PostPosted: Sat May 08, 2010 9:31 am    Post subject: Reply with quote

kk will post back
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