Alguns injetores de dll comuns não funcionam no AP então, porque fazer um injector comum se você pode fazer melhor ? :P
Esse injetor foi codado 100% por mim então se for copiar ou utilizar o código favor, colocar os créditos!
Depois de abrir seu projeto e deixá-lo direitinho coloque as seguintes funções:
E por último a InjectDll Modificada por mim para o Arcade Protector 2.2.3.2 =DDWORD GetPIDbyName(char* szProcess)
{
HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
PROCESSENTRY32 PE;
PE.dwSize = sizeof(PE) ;
Process32First(hSnap, &PE);
while (Process32Next(hSnap, &PE))
{
char Converted[100] = "\0";
wcstombs(Converted, PE.szExeFile, sizeof(Converted));
if (strcmp(Converted, szProcess) == 0)
{
return PE.th32ProcessID;
}
}
return 0;
}
DWORD GetModuleBaseAddress(DWORD PID, char* szModule)
{
MODULEENTRY32 ME;
ME.dwSize = sizeof(ME);
HANDLE hSnapy = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, PID);
Module32First(hSnapy, &ME);
while (Module32Next(hSnapy, &ME))
{
char Converted[100] = "\0";
wcstombs(Converted, ME.szModule, sizeof(Converted));
if (strcmp(Converted, szModule) == 0)
{
return (DWORD)ME.hModule;
}
}
}
Após feito isso, vamos a parte que faz o Injetor Funcionar ^^bool injectDLL(int PID, char * dllPath, DWORD Buffr)
{
HANDLE process = OpenProcess(PROCESS_ALL_ACCESS, 0, PID);
LPVOID addr = VirtualAllocEx(process, NULL, strlen(dllPath) + 1, MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE);
BOOL result = WriteProcessMemory(process, addr, dllPath, strlen(dllPath) + 1, NULL);
HANDLE thread = CreateRemoteThread(process, NULL, 0, (LPTHREAD_START_ROUTINE)Buffr, addr, 0, NULL);
if(thread == NULL)
{
printf("Error: CreateRemoteThread %u\n",GetLastError());
return 0;
}
WaitForSingleObject(thread,INFINITE);
CloseHandle(thread);
return true;
}
Coloque isso em um botão ou dentro da rotina do que quiser e.e
DWORD PID = GetPIDbyName("Game.exe");
if (PID == 0)
{
printf("\nPlease open Game first\n");
system("PAUSE");
return 0;
}
HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, PID);
DWORD BaseAddress = GetModuleBaseAddress(PID, "ÐarkCoder.dll"); // Aqui você colocar o nome da dll do PT no meu caso o nome do pt é ÐarkCoder
DWORD Buffer;
ReadProcessMemory(hProc,(void*)(BaseAddress + 0x81FE4),&Buffer,4,NULL);
injectDLL(PID,"Caminho da Dll aqui =D",Buffer);
CloseHandle(hProc);
OBS: Só funciona com Arcade Protector
Tenho certeza que poucas pessoas irão entender esse code muahaha e.ê
Bom aprendizado!
Abraços, Vitrix Maggot.