| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| dvdcowboy Grandmaster Cheater
 
  Reputation: 0 
 Joined: 11 Nov 2006
 Posts: 738
 
 
 | 
			
				|  Posted: Thu May 06, 2010 11:50 pm    Post subject: C++ AA->ASM |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| Henley Grandmaster Cheater
 
  Reputation: 0 
 Joined: 03 Oct 2006
 Posts: 671
 
 
 | 
			
				|  Posted: Fri May 07, 2010 12:11 am    Post subject: |   |  
				| 
 |  
				|  	  | Code: |  	  | *(DWORD*)(0x009973F6 + 5) = 0x90; | 
 
 to
 
 
  	  | Code: |  	  | *(BYTE*)(0x009973F6 + 5) = 0x90; | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Slugsnack Grandmaster Cheater Supreme
 
 ![]() Reputation: 71 
 Joined: 24 Jan 2007
 Posts: 1857
 
 
 | 
			
				|  Posted: Fri May 07, 2010 7:57 am    Post subject: |   |  
				| 
 |  
				| you'll also find you probably have to change memory protections with virtualprotect/ex |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| dvdcowboy Grandmaster Cheater
 
  Reputation: 0 
 Joined: 11 Nov 2006
 Posts: 738
 
 
 | 
			
				|  Posted: Sat May 08, 2010 9:25 am    Post subject: |   |  
				| 
 |  
				|  	  | 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 |  | 
	
		|  | 
	
		| Slugsnack Grandmaster Cheater Supreme
 
 ![]() Reputation: 71 
 Joined: 24 Jan 2007
 Posts: 1857
 
 
 | 
			
				|  Posted: Sat May 08, 2010 9:30 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| dvdcowboy Grandmaster Cheater
 
  Reputation: 0 
 Joined: 11 Nov 2006
 Posts: 738
 
 
 | 
			
				|  Posted: Sat May 08, 2010 9:31 am    Post subject: |   |  
				| 
 |  
				| kk will post back |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |