Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Perfect World
You last visited: Today at 20:23

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

Advertisement



Need correction from Guru))

Discussion on Need correction from Guru)) within the Perfect World forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2011
Posts: 4
Received Thanks: 0
Question Need correction from Guru))

I try to emulate targeting on AutoIt. I've found the function, which make a target:

HTML Code:
CPU Disasm
Address   Hex dump          Command                                  Comments
00451E2F      90            NOP
00451E30  /$  8B5424 04     MOV EDX,DWORD PTR SS:[ARG.1]             ; elementclient.00451E30(guessed Arg1)
00451E34  |.  8B42 10       MOV EAX,DWORD PTR DS:[EDX+10]
00451E37  |.  83F8 34       CMP EAX,34
00451E3A  |.  75 34         JNE SHORT 00451E70
00451E3C  |.  8B42 0C       MOV EAX,DWORD PTR DS:[EDX+0C]
00451E3F  |.  8B10          MOV EDX,DWORD PTR DS:[EAX]
00451E41  |.  C781 F40A0000 MOV DWORD PTR DS:[ECX+0AF4],0
00451E4B  |.  8BC2          MOV EAX,EDX
00451E4D  |.  8991 F00A0000 MOV DWORD PTR DS:[ECX+0AF0],EDX
00451E53  |.  8B0D EC3E9B00 MOV ECX,DWORD PTR DS:[9B3EEC]
00451E59  |.  50            PUSH EAX                                           ;<-- here is mob's WID
00451E5A  |.  68 9C469500   PUSH 0095469C                            ; UNICODE "Select %x"
00451E5F  |.  68 00FFFFFF   PUSH -100
00451E64  |.  51            PUSH ECX
00451E65  |.  E8 B6E7FDFF   CALL 00430620
00451E6A  |.  83C4 10       ADD ESP,10
00451E6D  |.  C2 0400       RETN 4
00451E70  |>  83F8 27       CMP EAX,27
00451E73  |.  75 0A         JNE SHORT 00451E7F
00451E75  |.  C781 F00A0000 MOV DWORD PTR DS:[ECX+0AF0],0
00451E7F  \>  C2 0400       RETN 4
00451E82      90            NOP
I modified AutoIt function like this:

HTML Code:
Func SelectTarID($id)
	Local $pRemoteThread, $vBuffer, $loop, $result, $OPcode
	; --- save the position of the allocated memory ---
	$pRemoteMem = DllCall($kernel32, 'int', 'VirtualAllocEx', 'int', $PROCESS_INFORMATION[1], 'ptr', 0, 'int', 0x46, 'int', 0x1000, 'int', 0x40)
	ConsoleWrite('mempos:' & $pRemoteMem[0] & @LF)

	; --- build up the asm code ---
	$OPcode &= '60'				;09210000  pushad  
	$OPcode &= 'BA'&_hex($id)		;09210001  mov         edx,80103C95h  
	$OPcode &= '8BC2'			;09210006  mov         eax,edx  
	$OPcode &= '8B0DEC3E9B00'		;09210008  mov         ecx,dword ptr ds:[9B3EECh]  
	$OPcode &= '50'				;0921000E  push        eax  
	$OPcode &= '689C469500'			;0921000F  push        95469Ch  
	$OPcode &= '6800FFFFFF'			;09210014  push        0FFFFFF00h  
	$OPcode &= '51'				;09210019  push        ecx  
	$OPcode &= 'BA20064300'			;0921001A  mov         edx,430620h  
	$OPcode &= 'FFD2'			;0921001F  call        edx  
	$OPcode &= '61'				;09210021  popad  
	$OPcode &= '61'				;09210022  popad  
	$OPcode &= '61'				;09210023  popad  
	$OPcode &= '61'				;09210024  popad  
	$OPcode &= 'C3'				;09210025  ret  

	; --- enter the asm code to to a dllstruct, which can be used with WriteProcessMemory ---
	$vBuffer = DllStructCreate('byte[' & StringLen($OPcode) / 2 & ']')
	For $loop = 1 To DllStructGetSize($vBuffer)
		DllStructSetData($vBuffer, 1, Dec(StringMid($OPcode, ($loop - 1) * 2 + 1, 2)), $loop)
	Next
	; --- now letz write the code from our dllstruct ---
	DllCall($kernel32, 'int', 'WriteProcessMemory', 'int', $PROCESS_INFORMATION[1], 'int', $pRemoteMem[0], 'int', DllStructGetPtr($vBuffer), 'int', DllStructGetSize($vBuffer), 'int', 0)
	; --- now we run the asm code we've just written ---
	$hRemoteThread = DllCall($kernel32, 'int', 'CreateRemoteThread', 'int', $PROCESS_INFORMATION[1], 'int', 0, 'int', 0, 'int', $pRemoteMem[0], 'ptr', 0, 'int', 0, 'int', 0)
	; --- wait till the thread did his job ---
	Do
		$result = DllCall('kernel32.dll', 'int', 'WaitForSingleObject', 'int', $hRemoteThread[0], 'int', 50)
	Until $result[0] <> 258
	Sleep(250)
	; --- close everything we've opened ---
	DllCall($kernel32, 'int', 'CloseHandle', 'int', $hRemoteThread[0])
	DllCall($kernel32, 'ptr', 'VirtualFreeEx', 'hwnd', $PROCESS_INFORMATION[1], 'int', $pRemoteMem[0], 'int', 0, 'int', 0x8000)
	Return True
EndFunc		;==>
The code make crash, but I can't understand what's wrong. Help, please))
ivasik is offline  
Reply


Similar Threads Similar Threads
Need some info from the GURU in cabal
03/25/2013 - Cabal Private Server - 4 Replies
Im looking for a server which is a: HIGH RATE - about 1k xp NO REBORN SYSTEM EP8 COMPLETE MAPS AND DUNGEON Thanks in ADVANCE :mofo:
Need Survey Guru! Read Me
07/20/2012 - League of Legends Trading - 2 Replies
FileIce Download - PASSWORD of Summoner Spells Hack LoL - Working as of July, 2012.txt Paying $5 for whoever can get me the password inside the file. I tried all 5 surveys and none of them seem to work for me. Skype: romulusares
[Help]Need Correction If This Is Right.
06/01/2012 - Shaiya Private Server - 6 Replies
Anyone Wanna Tell Me If Its Correct For AP Per Min? :confused: USE GO /****** Object: StoredProcedure . Script Date: 05/31/2012 13:04:51 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO /****** Object: Stored Procedure dbo.usp_Try_GameLogout_R Script Date: 2008-6-7 18:34:05 ******/
[Too] SRO Guru V2 by mofa ! NEW!
05/10/2008 - SRO Hacks, Bots, Cheats & Exploits - 3 Replies
http://image.cp-g.net/pics/480cab93810c7.jpg This is a new version of my SRO Guru. I recoded the whole tool to increase the performance and to reduce the amount of bugs. With the new code I am capable of adding new features faster :) . The first new feature is the "Control Center". The Control Center allows you to easily choose the clients you want to get detailled statistics from. It is also possible to add Characters you have logged in later. The clientlimit of 5 Clients stay put. ...
[Tool] SRO Guru by mofa [Beta]
04/16/2008 - SRO Hacks, Bots, Cheats & Exploits - 14 Replies
SRO Guru http://mofa.cp-g.net/bilder/sroguru/Splashscreen. jpg Ich möchte euch heute ein neues Tool von mir vorstellen. Dieses Tool überwacht eure eingeloggten SRO Chars und erstellt Statistiken. Das Programm erstellt dann für jeden eingeloggten Char ein eigenes Fenster, welches ihr dann frei bewegen und einstellen könnt. Aber ich zeig euch ersteinmal ein paar Screenshots: http://mofa.cp-g.net/bilder/sroguru/bild1.jpg



All times are GMT +1. The time now is 20:25.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.