Since all pro people here is a bit selfish... i decided to made my own guide and share with the forum!!
OK... This is the best way to make your bot or whatever you making work well for you!!!
STOP being eMo and just changing addresses!! Lets play hard!!!:D
ALL INFORMATION HERE IS BASED ON PERFECT WORLD INTERNACIONAL (LAST VERSION)
Before Start:
Lets learn some things... all people here is talking about change addresses, offsets and pointers... you know what im talking about? (go on net and find some guides :))
I found 4 kinds of addresses:
1. The Base Address (0x0096d1dc)
--> Base address - Wikipedia, the free encyclopedia
--> We will start from here... all Injected functions needs to start the Pointer from correct address!
--> Use the tutorial [Only registered and activated users can see links. Click Here To Register...].. when you found the address, substract 0x1C from and do another search in Hex value to get the REAL base address.
--> All injectable functions starts from poiting here. (try find the Assembly Code [0096d1dc] in Memory View of Cheat Engine, and you will have all injectabled possibilities)
2. The Dynamic Address (0x0096d1dc + 0x1C -> points to 0x0096d87c)
--> You can easy learn and find by [Only registered and activated users can see links. Click Here To Register...]... just have the WRONG title.
--> Its the Load-in-Time allocator... in other words, its a memory redirector.
3. The Environment Address (0x0096d87c + 0x8 -> points to a dynamic location)
--> Pointer that allocates dynamic addressing for loop and protected blocks
4. The Role Address (0x0096d87c + 0x20 -> points to a dynamic location)
--> Pointer that allocates dynamic address like global variables, constants and types
Definition:
[Only registered and activated users can see links. Click Here To Register...]
Injection Routines
Delphi: (by asgborges)
Updated 25/11/2011
C++ Builder: (found on internet)
AutoIt: (found on internet)
Injectable Codes
Delphi: (by asgborges)
C++ Builder: (adapted to work with PWI)
AutoIt: (adapted to work with PWI)
Injection Examples
Delphi: (by asgborges)
Now im working in actions like OpenNPC, RunTo(X,Y,X), GatherMines, NormalAttack, MagicAttack and alot of more...
(when i get results will keep sharing here)
Enjoy kids :D
*Last Updated: 03.05.2009
Injection Codes:
* Full-Target HP select (full HP bar)
* Fly command
* Pick Item
OK... This is the best way to make your bot or whatever you making work well for you!!!
STOP being eMo and just changing addresses!! Lets play hard!!!:D
ALL INFORMATION HERE IS BASED ON PERFECT WORLD INTERNACIONAL (LAST VERSION)
Before Start:
Lets learn some things... all people here is talking about change addresses, offsets and pointers... you know what im talking about? (go on net and find some guides :))
I found 4 kinds of addresses:
1. The Base Address (0x0096d1dc)
--> Base address - Wikipedia, the free encyclopedia
--> We will start from here... all Injected functions needs to start the Pointer from correct address!
--> Use the tutorial [Only registered and activated users can see links. Click Here To Register...].. when you found the address, substract 0x1C from and do another search in Hex value to get the REAL base address.
--> All injectable functions starts from poiting here. (try find the Assembly Code [0096d1dc] in Memory View of Cheat Engine, and you will have all injectabled possibilities)
2. The Dynamic Address (0x0096d1dc + 0x1C -> points to 0x0096d87c)
--> You can easy learn and find by [Only registered and activated users can see links. Click Here To Register...]... just have the WRONG title.
--> Its the Load-in-Time allocator... in other words, its a memory redirector.
3. The Environment Address (0x0096d87c + 0x8 -> points to a dynamic location)
--> Pointer that allocates dynamic addressing for loop and protected blocks
4. The Role Address (0x0096d87c + 0x20 -> points to a dynamic location)
--> Pointer that allocates dynamic address like global variables, constants and types
Definition:
[Only registered and activated users can see links. Click Here To Register...]
Injection Routines
Delphi: (by asgborges)
Updated 25/11/2011
Code:
procedure InjectFunc(ProcessID: Cardinal; Func: Pointer; aParams: Pointer; aParamsSize: DWORD);
var
hThread: THandle;
lpNumberOfBytes: DWORD;
ThreadAddr, ParamAddr: Pointer;
begin
if ProcessID<>0 then
begin
// ---- Write function address
ThreadAddr := VirtualAllocEx(ProcessID, nil, 256, MEM_COMMIT or MEM_RESERVE, PAGE_EXECUTE_READWRITE);
WriteProcessMemory(ProcessID, ThreadAddr, Func, 256, lpNumberOfBytes);
// ---- Address to write parameters
ParamAddr := VirtualAllocEx(ProcessID, nil, aParamsSize, MEM_COMMIT or MEM_RESERVE, PAGE_EXECUTE_READWRITE);
WriteProcessMemory(ProcessID, ParamAddr, aParams, aParamsSize, lpNumberOfBytes);
// ---- Create a remote thread
hThread := CreateRemoteThread(ProcessID, nil, 0, ThreadAddr, ParamAddr, 0, lpNumberOfBytes);
// ---- Thread to wait for the end of
WaitForSingleObject(hThread, 3000);
GetExitCodeThread(hThread,lpExitCode);
TerminateThread(hThread,lpExitCode);
VirtualFreeEx(ProcessID,ThreadAddr,0,MEM_RELEASE);
VirtualFreeEx(ProcessID,ParamAddr,0,MEM_RELEASE);
VirtualFreeEx(ProcessID,Func,0,MEM_RELEASE);
VirtualFreeEx(ProcessID,aParams,0,MEM_RELEASE);
CloseHandle(hThread);
end
end;
Code:
#include <tlhelp32.h>
...
[B]typedef[/B] tagPROCESSENTRY32W pGameProcess;
...
[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];
}
Code:
Func INJECTCODE($PID)
If $PID <> 0 And $OPCODE <> "" Then
Local $DATA = DllStructCreate("byte[" & StringLen($OPCODE) / 2 & "]")
For $I = 1 To DllStructGetSize($DATA)
DllStructSetData($DATA, 1, Dec(StringMid($OPCODE, ($I - 1) * 2 + 1, 2)), $I)
Next
Local $RESULT, $PROCESS, $ADD, $THREAD
$RESULT = DllCall("Kernel32.Dll", "int", "OpenProcess", "int", 2035711, "int", 0, "int", $PID)
$PROCESS = $RESULT[0]
$RESULT = DllCall("Kernel32.dll", "ptr", "VirtualAllocEx", "int", $PROCESS, "ptr", 0, "int", DllStructGetSize($DATA), "int", 4096, "int", 64)
$ADD = $RESULT[0]
$RESULT = DllCall("kernel32.dll", "int", "WriteProcessMemory", "int", $PROCESS, "ptr", $ADD, "ptr", DllStructGetPtr($DATA), "int", DllStructGetSize($DATA), "int", 0)
$RESULT = DllCall("kernel32.dll", "int", "CreateRemoteThread", "int", $PROCESS, "ptr", 0, "int", 0, "int", $ADD, "ptr", 0, "int", 0, "int", 0)
$THREAD = $RESULT[0]
Do
$RESULT = DllCall("kernel32.dll", "int", "WaitForSingleObject", "int", $THREAD, "int", 50)
Until $RESULT[0] <> 258
DllCall("Kernel32.dll", "int", "CloseHandle", "int", $THREAD)
$RESULT = DllCall("Kernel32.dll", "ptr", "VirtualFreeEx", "hwnd", $PROCESS, "ptr", DllStructGetPtr($DATA), "int", DllStructGetSize($DATA), "int", 32768)
DllCall("Kernel32.dll", "int", "CloseHandle", "int", $PROCESS)
$OPCODE = ""
$DATA = 0
EndIf
EndFunc
Delphi: (by asgborges)
Code:
[COLOR="Green"]
//*************************************************************//
// Select the Moster (Full Target HP)
// OBS: Working well
//*************************************************************//[/COLOR]
[B]procedure[/B] SelectMonster(MonID: PParams); [B]stdcall[/B];
[COLOR="Green"](*
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
*)
[/COLOR][B]var[/B]
P1: DWORD;
[B]begin[/B]
P1:=MonID^.Param1;
[B]asm[/B]
mov edx, DWORD PTR [$0096d1dc]
push P1
mov ecx, DWORD PTR [edx+$20]
add ecx, $EC
mov edx, $005a5e50
call edx
[B]end[/B];
[B]end[/B];
[COLOR="Green"]//*************************************************************//
// Fly command
// OBS: Working well
//*************************************************************
[/COLOR][B]procedure[/B] Fly(aPParams: PParams); [B]stdcall[/B];
[COLOR="Green"](*
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
*)
[/COLOR][B]begin[/B]
[B]asm[/B]
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
[B]end[/B];
[B]end[/B];
[COLOR="Green"]//*************************************************************//
// Pick Items on ground
// OBS: Working... need to stay close of the Item
//*************************************************************//
[/COLOR][B]procedure[/B] PickItem(aPParams: PParams); [B]stdcall[/B];
(*
00467693 - 8b 15 dc d1 96 00 - mov edx,[0096d1dc] : 0096D860
00467699 - 50 - push eax
0046769A - 51 - push ecx
0046769B - 8b 4a 20 - mov ecx,[edx+20]
0046769E - 81 c1 ec 00 00 00 - add ecx,000000ec
004676A4 - e8 37 e7 13 00 - call 005a5de0
*)
[B]var[/B]
Address: pointer;
Pa1,pa2: cardinal;
[B]begin[/B]
Pa1:=aPParams^.Param1;
pa2:=aPParams^.Param2;
asm
mov edx, DWORD PTR [$0096d1dc]
push Pa1 [COLOR="Green"]// Item SN[/COLOR]
push Pa2 [COLOR="Green"]// Item ID[/COLOR]
mov ecx, DWORD PTR [edx+$20]
add ecx, $EC
mov edx, $005a5de0
call edx
[B]end[/B];
[B]end[/B];
Code:
[B]static[/B] 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;
[B]__try[/B]
{
[B]_asm[/B]
{
mov edx, DWORD PTR [BaseAddress]
push MonsterID
mov ecx, DWORD PTR [edx+0x20]
add ecx, 0xEC
mov edx, CallAddress
call edx
}
}
[B]__except[/B](1)
{
}
[B]return[/B] 0;
}
Code:
Func SETCURENTMOBID($ID)
_MEMORYWRITE($MOB_ID_ADD, $MEMID, $ID)
If $ID <> 0 Then
$OPCODE = ""
PUSHAD()
MOV_EDX_DWORD_PTR(9875524)
PUSH($ID)
MOV_ECX_DWORD_PTR_EAX_ADD(32)
$OPCODE &= "81c1ec000000"
MOV_EDX(5916464)
CALL_EDX()
POPAD()
RET()
INJECTCODE($PID)
EndIf
EndFunc
Delphi: (by asgborges)
Code:
Type
PParams = ^TParams;
TParams = packed record
Param1: DWORD;
Param2: DWORD;
Param3: single;
Param4: single;
Param5: single;
Param6: byte;
end;
.
.
.
Procedure TForm1.SelectMonsterByID(ID: Cardinal);
var
hProcess : THandle;
aParams : TParams;
aParamsSize: DWORD;
begin
ChangePrivilege('SeDebugPrivilege', True);
hProcess := OpenProcess( PROCESS_ALL_ACCESS, FALSE, Process.th32ProcessID);
aParams.Param1 := ID;
aParamsSize := SizeOf(aParams);
InjectFunc(hProcess,@SelectMonster, @aParams,aParamsSize);
CloseHandle(hProcess);
end;
Now im working in actions like OpenNPC, RunTo(X,Y,X), GatherMines, NormalAttack, MagicAttack and alot of more...
(when i get results will keep sharing here)
Enjoy kids :D
*Last Updated: 03.05.2009
Injection Codes:
* Full-Target HP select (full HP bar)
* Fly command
* Pick Item