Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Perfect World > PW Hacks, Bots, Cheats, Exploits
You last visited: Today at 10:45

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Direct Injection Codes - Delphi/C++/AutoIt

Discussion on Direct Injection Codes - Delphi/C++/AutoIt within the PW Hacks, Bots, Cheats, Exploits forum part of the Perfect World category.

Reply
 
Old 05/12/2009, 18:53   #31
 
plixbugmenot's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 89
Received Thanks: 56
50 meg to 200 meg, definately a memory leak!

you don't have to make pointers NULL. Well it is nice after you delete them to make them NULL but it won't delete the object! So if you use operator new, or malloc, you need to free that

like
Code:
MyObject *p = new MyObject();

if(p!=NULL) //safety measure, so you don't delete a pointer twice
 delete p;

//safety measure, so you don't delete a pointer twice
p = NULL;
don't know about malloc, I am a c++ coder but google can tell you that

Also,in the function for example walking to a place, you make a workobject that gets handed to the workmanager, but I think you do need to delete that workobject afterwards! You should research that

Have fun debugging!
plixbugmenot is offline  
Old 05/15/2009, 04:43   #32
 
elite*gold: 0
Join Date: May 2009
Posts: 45
Received Thanks: 2
//004596AD - a1 dc d1 96 00 - mov eax,[0096d1dc] : 0096D860
//004596B2 - 57 - push edi
//004596B3 - 8b 48 20 - mov ecx,[eax+20]
//004596B6 - 81 c1 ec 00 00 00 - add ecx,000000ec
//004596BC - e8 8f c7 14 00 - call 005a5e50
DWORD BaseAddress= 0x0096d1dc;
DWORD CallAddress= 0x005a5e50;


Can someone please explain what the CallAddress is? Is it the address called by the Base Address?

In the newest PW-INT we have:
BaseAddress: 0x0097AC97
Dynamic Addres: 0x0097B33C
Dynamic Address - 0x1C = 0x97B320

the BaseAddress contains the 0x97B320 value...so BaseAddress + 0x1C points to the Dynamic Address. Am I correct to assume that the CallAddress is 0x97B320?
smokeypokey is offline  
Old 05/15/2009, 14:15   #33
 
elite*gold: 0
Join Date: Mar 2008
Posts: 6
Received Thanks: 1
CallAddress is an address that points to a function (or a branch of a function). In this case, when some conditions is valid, it will call to that address and do something ... So, it's not 0x97B320 like u said.
leovn is offline  
Old 05/16/2009, 05:16   #34
 
elite*gold: 0
Join Date: May 2009
Posts: 45
Received Thanks: 2
Quote:
Originally Posted by asgborges View Post
Try use the ESPECIFIC Injection Function for C++ ok?! --> CallRemoteFunction !!!

Dont translate functions from other languages... this dont work well until a lot of tests !!
Code:
#include <tlhelp32.h>
...
[B]typedef[/B]  tagPROCESSENTRY32W pGameProcess;
...
static DWORD WINAPI SelectMonster(LPCVOID lpParam)
{
	//004596AD - a1 dc d1 96 00             - mov eax,[0096d1dc] : 0096D860
	//004596B2 - 57                         - push edi
	//004596B3 - 8b 48 20                   - mov ecx,[eax+20]
	//004596B6 - 81 c1 ec 00 00 00          - add ecx,000000ec
	//004596BC - e8 8f c7 14 00             - call 005a5e50
	DWORD BaseAddress= 0x0096d1dc;
	DWORD CallAddress= 0x005a5e50;
	DWORD MonsterID = (DWORD)lpParam;
	__try
	{
		_asm
		{
		  mov edx, DWORD PTR [BaseAddress]
		  push     MonsterID
		  mov ecx, DWORD PTR [edx+0x20]
		  add ecx, 0xEC
		  mov edx, CallAddress
		  call     edx
		}
	}
	__except(1)
	{
	}
	return 0;
}
[B]bool[/B] CallRemoteFunction(pGameProcess pProcess)
{
	//Remote Thread Handle
	HANDLE hProcess=NULL;
	//Inject Thread handle
	HANDLE hThread=NULL;
	//Inject Fuction Address after allocate
	LPVOID ThreadCodeAddr=NULL;
	//Inject Function
	LPVOID Func=[B][U]SelectMonster[/U][/B];
	//Inject Fuction Stack Address after allocate
	LPVOID ThreadDataAddr=NULL;
	//Inject Fuction Stack Data
	LPCVOID lpParam = NULL;
	DWORD Value = 0;
	lpParam = &Value;

	hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pProcess.th32ProcessID);
	[B]if [/B](!hProcess)
	{
		//Do your Error message (OpenProcess);
		[B]return false[/B];
	}
	ThreadCodeAddr=VirtualAllocEx(hProcess, NULL, 4096, MEM_COMMIT, PAGE_READWRITE);
	ThreadDataAddr=VirtualAllocEx(hProcess, NULL, 256, MEM_COMMIT, PAGE_READWRITE);
	WriteProcessMemory (hProcess, ThreadCodeAddr, Func, 4096, NULL);
	WriteProcessMemory (hProcess, ThreadDataAddr, lpParam, 256, NULL);
	hThread = CreateRemoteThread(hProcess, NULL, NULL,(LPTHREAD_START_ROUTINE)ThreadCodeAddr, ThreadDataAddr, NULL, NULL);
	[B]if[/B] (!hThread)
	 {
		//Do your Error message (CreateRemoteThread);
	 }
	[B]else[/B]
		WaitForSingleObject(hThread, INFINITE);
	CloseHandle(hThread);
	VirtualFreeEx(hProcess, ThreadCodeAddr, 4096, MEM_RELEASE);
	VirtualFreeEx(hProcess, ThreadDataAddr, 256, MEM_RELEASE);
	CloseHandle(hProcess);
	[B]return false[/B];
}
* this is working fine for me... with Delphi and C++ Builder!!!

I'm new to code injection, so I'm just learning as I go along. Leovn, thanks for the help.

For the target example can I inject into anywhere that looks like mov eax,[BaseAddress] or is that spot specific to targeting because of the call that follows?
smokeypokey is offline  
Old 05/18/2009, 06:43   #35
 
elite*gold: 0
Join Date: Mar 2008
Posts: 6
Received Thanks: 1
no, you can't do like that, because if you do like u said (it will crash your element client)
Code:
         mov edx, DWORD PTR [BaseAddress]
		  push     MonsterID
		  mov ecx, DWORD PTR [edx+0x20]
		  add ecx, 0xEC
		  mov edx, CallAddress
		  call     edx
It was taken by viewing memory of element client. In element client assembly, it will have the code like it (not same exactly).

So u must follow ...
leovn is offline  
Old 05/18/2009, 17:41   #36
 
elite*gold: 0
Join Date: May 2009
Posts: 45
Received Thanks: 2
Ok. I'm getting a hang of this. Check this out.

Here is the original fly function:

Code:
procedure Fly(aPParams: PParams); stdcall;
(*
0044A926 - 8b 15 dc d1 96 00          - mov edx,[0096d1dc] : 0096D860
0044A92C - 6a 01                      - push 01
0044A92E - 51                         - push ecx
0044A92F - 8b 4a 20                   - mov ecx,[edx+20]
0044A932 - 6a 0c                      - push 0c
0044A934 - 6a 01                      - push 01
0044A936 - 81 c1 ec 00 00 00          - add ecx,000000ec
0044A93C - e8 bf b2 15 00             - call 005a5c00
*)
begin
    asm
       mov  edx, DWORD PTR [$0096d1dc]
       push $01
       push $31f7
       mov  ecx, DWORD PTR [edx+$20]
       push $0C
       push $01
       add ecx, $EC
       mov  edx, $005a5c00
       call edx
    end;
end;
Here is the one from the current version of PW-INT:
Code:
0044BF66 - 8b 15 9c ac 97 00          - mov edx,[0097ac9c] : 0097B320
0044BF6C - 6a 01                      - push 01
0044BF6E - 51                         - push ecx
0044BF6F - 8b 4a 20                   - mov ecx,[edx+20]
0044BF72 - 6a 0c                      - push 0c
0044BF74 - 6a 01                      - push 01
0044BF76 - 81 c1 ec 00 00 00          - add ecx,000000ec
0044BF7C - e8 ff 3f 16 00             - call 005aff80
how did someone come up with $31f7 for fly (i need a new value for this, but not sure how to find it)? I can find where npc_id's are stored, hp, etc...because those can be scanned down, but how did they scan down a skill?

Also, do you know if this executes the fly skill or just freezes the fly timer so it does not go to 0?

I ran a trace on
0044BF66 - 8b 15 9c ac 97 00 - mov edx,[0097ac9c] : 0097B320

and when push ecx is executed the value of ecx is 00000830...is this what I'm supposed to use in my code?
smokeypokey is offline  
Old 05/24/2009, 15:35   #37
 
plixbugmenot's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 89
Received Thanks: 56
Quote:
how did someone come up with $31f7 for fly
this fly function is probably a 'thiscall' function, which means the "this" pointer is passed in ECX. This changes every time you start the game

a small example / asm lesson

Code:
.text:00432BE0 sub_432BE0      proc near               ; CODE XREF: sub_42C2D0+298p
.text:00432BE0                                         ; sub_42C2D0+2EFp ...
.text:00432BE0                 mov     eax, [[COLOR="Red"]ecx[/COLOR]+4]
.text:00432BE3                 retn
.text:00432BE3 sub_432BE0      endp
in compiled c++ code you must know 2 things to understand this.

1 this pointer is located in ECX
2 the return value of a function is always stored in EAX

what this function does?
this is actually a getter method.

it may look like this in c++

Code:
int MyClass::GetValue()
{
  return m_MemberVariable;
}
and it gets called like this

Code:
int returnvalue = [COLOR="Red"]MyClass[/COLOR]->GetValue();
this translates (roughly) to:

Code:
mov ecx, [[COLOR="Red"]MyClass[/COLOR]] [COLOR="Green"]//MyClass is the pointer to the class[/COLOR]
call sub_432BE0
mov [address of int returnvalue], [COLOR="Red"]eax[/COLOR][COLOR="Green"]// return value gets stored[/COLOR]
so all this will return the value of MyClass+4

I hope I was clear, if you have any questions please ask
plixbugmenot is offline  
Old 07/31/2009, 01:27   #38
 
elite*gold: 0
Join Date: Jul 2009
Posts: 12
Received Thanks: 1
Uhm would be nice to tell us what $MOD_ID_ADD is supposed to mean, is it the BASE_ADDR?
If so, it makes your client crash, are you sure its not _MemoryPointerWrite(), using Target_Offsets? Also; INJECTCODE() crashes your client too, most likely cos' of $OPCODE being wrong, does that has something to do with wrong base_addr, call_addr, or the $OPCODE?
Can someone give me an example of the full script in Autoit? (I'm talking about full HP bar select).
Or explain me detailed how you figure the asm func calls out using CE/Olly? or detailed description of what it does, not as in "select a full hpbar target" but as in, for example:

_memorywrite($mob_idd_add,$memid,$id) ;targets mob with empty hp bar
pushad() ;whatever.

and so on, i hope someone can give me a detailed guide or something. really want to get code injection to work for me.

Thanks in advance.
somethingclever is offline  
Old 09/07/2009, 07:49   #39
 
elite*gold: 0
Join Date: Sep 2008
Posts: 6
Received Thanks: 1
you can't overwrite the client side server + your only adding phenomenal codes to your com "Only" not the other which is gonna crash "remember the system program of the game only follows the basic which is massive algo codes" the creators is also a hacker to

P.S. - this is only a tip if you want to surpass them.
cableman2 is offline  
Old 09/16/2009, 02:45   #40
 
elite*gold: 0
Join Date: Aug 2009
Posts: 37
Received Thanks: 3
pasahan nyo nmn ako ng wire frame
bhimboy_14 is offline  
Old 10/06/2009, 20:26   #41
 
elite*gold: 0
Join Date: Nov 2008
Posts: 11
Received Thanks: 0
would anyone be able to make an injection script to make smurf it select characters correctly for healing with EP?
ReEvolve is offline  
Old 11/28/2009, 02:36   #42
 
elite*gold: 0
Join Date: Oct 2009
Posts: 2
Received Thanks: 0
hi guy
I need help with ASM code of function dig mines,ressources,herbs...
thank alot!
hongthai1909 is offline  
Old 12/15/2009, 08:03   #43
 
muzhig's Avatar
 
elite*gold: 0
Join Date: Sep 2009
Posts: 85
Received Thanks: 27
what help do you need?
I am solving this case too.
muzhig is offline  
Old 06/30/2010, 17:20   #44
 
Sᴡoosh's Avatar
 
elite*gold: 20
Join Date: May 2009
Posts: 1,290
Received Thanks: 325
Anyone have an Idea how to change mobs, if you have the mobID? These codes dont seem to work, they allways crash my client (Patch version 356). Any Idea? I want to stop using my tab key =/.
Sᴡoosh is offline  
Old 08/05/2010, 21:55   #45
 
Sᴡoosh's Avatar
 
elite*gold: 20
Join Date: May 2009
Posts: 1,290
Received Thanks: 325
I got a bit smarter meanwhile, here is the call address for mob targeting :

$005E9CC0

Have fun.
Sᴡoosh is offline  
Reply


Similar Threads Similar Threads
AutoIT to Delphi Translation - 50 $
06/27/2010 - AutoIt - 0 Replies
Please delete.
Public Source Codes für Injection
02/04/2009 - General Gaming Discussion - 17 Replies
renameself: void Injection&#58;&#58;command_renameself& #40;const arglist_t & args&#41;{ if&#40;args.size&#40;&#41; &#60; 2&#41;{ client_print&#40;&#34;usage ,renameself &#60;newname>&#34;&#41;; } string str; for&#40;arglist_t&#58;&#58;const_iter ator i = &#40;args.begin&#40;&#41;+1&#41;;i != args.end&#40;&#41;;i++&#41;{ str += *i; if&#40;i+1 != args.end&#40;&#41;&#41; str += &#34; &#34;;
_MemoryPointerRead (autoit) in delphi
05/23/2008 - General Coding - 6 Replies
Hallo epvp coder Gruppe Ich hänge derzeit an folgendem Problem: In auto-it konnte man mit der "_MemoryPointerRead" Funktion einen Wert aus dem Speicher auslesen, zu dem man nur über einen Pointer(mit Offsets usw.) kommt. http://1337files.13.funpic.de/ce.jpg Nachdem ich in einem anderem Forum keinen fand, der davon Ahnung hatte, frage ich hier: Gibt es soetwas auch in Delphi? Ich verwende derzeit die Funktion "ReadProcessMemory", die jedoch nur Werte aus statischen Adressen auslesen...
[Request] SV for 4356 + CE injection codes
12/09/2007 - Conquer Online 2 - 19 Replies
Hey anyone reading this, im just wondering if anyone can give me the latest working 4356 SV and working CE injection codes? i tried searching and all i can find is a bunch of old links from like 4-6 months ago that people continue to post on with about 8 pages of "i cant get it to work" (no one seams to read post date) so yah, if anyone could do me a favor and let me know what is the latest SV version and where i can get the CE injection codes, please let me know :p
Delphi Codes
12/06/2007 - WarRock - 3 Replies
:confused: Hi, Ich suche codes für delphi (warrock) ich habe sie schon seit 3 std. überall gesucht aber ich finde keine!!! :confused: Kann mir bitte jemand von euch eine internettseite posten oder die codes für warrock direkt hier rein Posten?? :confused: DANKE!!!



All times are GMT +2. The time now is 10:45.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.