Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // dllmain.cpp : Defines the entry point for the DLL application.
- #include "stdafx.h"
- #define DEBUG_ERR 0
- DWORD dwModuleBase;
- void Start();
- void Keys();
- void Log(TCHAR message[]);
- void UnloadAndExit();
- typedef struct AutoKillStruct {
- DWORD KillType, P2, WeaponType, P4, P5, KillerSlot, P7, P8, P9, WeaponID, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, A1, A2;
- } stAutoKill;
- stAutoKill AKS;
- BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
- {
- // DisableThreadLibraryCalls(hModule);
- switch (ul_reason_for_call)
- {
- case DLL_PROCESS_ATTACH:
- CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Start, 0, 0, 0);
- case DLL_THREAD_ATTACH:
- case DLL_THREAD_DETACH:
- case DLL_PROCESS_DETACH:
- break;
- }
- return TRUE;
- }
- void UnloadAndExit() {
- Log(L"Exit...\n\n");
- FreeLibraryAndExitThread(GetModuleHandle(L"Win32Proj.dll"), 0);
- }
- void Log(TCHAR message[]) {
- #ifdef DEBUG_ERR
- fstream file;
- file.open("D:\\log.txt", ios::app);
- file << message << "\n";
- file.close();
- #endif // DEBUG_ERR
- }
- bool PlayerIsDead(BYTE PlayerID) {
- Log(L"PlayerIsDead()");
- DWORD check = DWORD(*PDWORD(*PDWORD(*PDWORD(*PDWORD(*PDWORD(dwModuleBase + (DWORD)0x67B494) + (DWORD)0x34) + (DWORD)(0x4 * PlayerID)) + (DWORD)0x248) + (DWORD)0x10) + (DWORD)0x1C8);
- #ifdef DEBUG_ERR
- TCHAR msg[100];
- StringCbPrintf(msg, 100, L"%d morreu? %d", PlayerID, *(int *)check == 1);
- Log(msg);
- #endif // DEBUG_ERR
- return *(int *)check == 1;
- }
- DWORD GetEnemyAddress(BYTE PlayerID) {
- Log(L"GetEnemyAddress()");
- DWORD addi = DWORD(*PDWORD(*PDWORD(*PDWORD(*PDWORD(*PDWORD(dwModuleBase + (DWORD)0x67B494) + (DWORD)0x34) + (DWORD)(0x4 * PlayerID)) + (DWORD)0x248) + (DWORD)0x10) + (DWORD)0x0);
- #ifdef DEBUG_ERR
- TCHAR msg[100];
- StringCbPrintf(msg, 100, L"%d addi: 0x%p", PlayerID, addi);
- Log(msg);
- #endif // DEBUG_ERR
- return addi;
- }
- void AutoKillBugFix() {
- DWORD AntiBugAddr, OldProtect;
- Log(L"Protect...");
- AntiBugAddr = (DWORD)GetModuleHandle(L"i3SceneDx.dll") + (DWORD)0x1CEF9;
- if (*PBYTE(AntiBugAddr) != 0xEB) {
- VirtualProtect((LPVOID)AntiBugAddr, 1, PAGE_EXECUTE_READWRITE, &OldProtect);
- *PBYTE(AntiBugAddr) = 0xEB;
- VirtualProtect((LPVOID)AntiBugAddr, 1, OldProtect, &OldProtect);
- }
- }
- void RemoveRespawnImmortality() {
- BYTE i, PlayerID = 0;
- for (i = 1; i < 9; i++) {
- *(PDWORD(*PDWORD(*PDWORD(*PDWORD(*PDWORD(*PDWORD(dwModuleBase + (DWORD)0x67B494) + (DWORD)0x34) + (DWORD)PlayerID) + (DWORD)0x248) + (DWORD)0x10) + (DWORD)0x218)) = 0xBF000000;
- PlayerID += 4;
- }
- }
- void ProvokeDamage(DWORD EnemyAddr) {
- #ifdef DEBUG_ERR
- TCHAR mmsg[100];
- StringCbPrintf(mmsg, 100, L"Trying: 0x%p", EnemyAddr);
- Log(mmsg);
- #endif // DEBUG_ERR
- AKS.KillType = 1;
- AKS.WeaponType = 1;
- AKS.WeaponID = 1;
- AKS.KillerSlot = 0; // (DWORD)(PDWORD(*PDWORD(dwModuleBase + (DWORD)0x67B4C8) + (DWORD)0x6158));
- TCHAR msg[100];
- StringCbPrintf(msg, 100, L"KillerSlot: 0x%p=%d", AKS.KillerSlot, AKS.KillerSlot);
- Log(msg);
- AKS.P2 = 1;
- AKS.P4 = 0;
- AKS.P5 = 1;
- AKS.P7 = 1;
- AKS.P8 = 0;
- AKS.P9 = 0;
- AKS.P11 = 1065353216;
- AKS.P12 = 0;
- AKS.P13 = 0;
- AKS.P14 = 0;
- AKS.P15 = 1;
- AKS.P16 = 0;
- AKS.P17 = 0;
- AKS.P18 = 0;
- AKS.P19 = 0;
- AKS.P20 = DWORD(&AKS.A1);
- AKS.P21 = DWORD(&AKS.A2);
- AKS.P22 = 0;
- AKS.P23 = 0;
- DWORD PUSHStruct = (DWORD)(&AKS);
- StringCbPrintf(msg, 100, L"push: 0x%d", (*((stAutoKill *)PUSHStruct)).P11);
- Log(msg);
- Log(L"__asm");
- __asm {
- PUSH PUSHStruct
- MOV ECX, EnemyAddr
- MOV EAX, dwModuleBase
- ADD EAX, 0x3EEA0
- CALL EAX
- }
- }
- void KillPlayer(BYTE PlayerID) {
- Log(L"KillPlayer()");
- // 150
- for (int i = 0; i < 150; i++) {
- if (PlayerIsDead(PlayerID))
- break;
- ProvokeDamage(GetEnemyAddress(PlayerID));
- }
- }
- void Start() {
- dwModuleBase = (DWORD)GetModuleHandle(L"PointBlank.exe");
- Keys();
- }
- void Keys() {
- while (true) {
- /* Exit Program */
- if (GetAsyncKeyState(VK_NUMPAD0))
- UnloadAndExit();
- /* AUTO KILL */
- if (GetAsyncKeyState(VK_NUMPAD1)) {
- for (int i = 1; i <= 8; i++) {
- if (PlayerIsDead(i))
- continue;
- KillPlayer(i);
- }
- }
- /* RESPAWN */
- if (GetAsyncKeyState(VK_NUMPAD2)) {
- DWORD Slot = 0;
- __asm {
- PUSH 100
- CALL Sleep
- MOV ECX, dwModuleBase
- MOV EDX, ECX
- ADD ECX, 0x67B494
- MOV ECX, [ECX]
- ADD EDX, 0x450E0
- PUSH 1
- PUSH Slot
- CALL EDX
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement