unsigned long address = ClientOffset + pointer; if (IsBadReadPtr((void*)address, 4) != NULL) return;// It is already disabled address = *(unsigned long*)address + offset1; if (IsBadWritePtr((void*)address, 4) != NULL) return; // Here you reset the address *(int*)address = 0;// int = 4 bytes
#pragma once
#include "resource.h"
namespace AntiKRA1 {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Summary for Form1
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Button^ button1;
protected:
private: System::Windows::Forms::Button^ button2;
private: System::Windows::Forms::TextBox^ textBox1;
private: System::Windows::Forms::TextBox^ textBox2;
private:
/// <summary>
/// Required designer variable.
/// </summary>
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
this->button1 = (gcnew System::Windows::Forms::Button());
this->button2 = (gcnew System::Windows::Forms::Button());
this->textBox1 = (gcnew System::Windows::Forms::TextBox());
this->textBox2 = (gcnew System::Windows::Forms::TextBox());
this->SuspendLayout();
//
// button1
//
this->button1->BackgroundImage = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"button1.BackgroundImage")));
this->button1->Location = System::Drawing::Point(0, 0);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(90, 32);
this->button1->TabIndex = 0;
this->button1->Text = L"Start - HOME";
this->button1->UseVisualStyleBackColor = true;
this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
//
// button2
//
this->button2->BackgroundImage = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"button2.BackgroundImage")));
this->button2->Location = System::Drawing::Point(274, 0);
this->button2->Name = L"button2";
this->button2->Size = System::Drawing::Size(89, 32);
this->button2->TabIndex = 1;
this->button2->Text = L"Stop - END";
this->button2->UseVisualStyleBackColor = true;
this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
//
// textBox1
//
this->textBox1->BackColor = System::Drawing::Color::LightSkyBlue;
this->textBox1->Enabled = false;
this->textBox1->ForeColor = System::Drawing::Color::Cyan;
this->textBox1->Location = System::Drawing::Point(22, 177);
this->textBox1->Name = L"textBox1";
this->textBox1->Size = System::Drawing::Size(191, 21);
this->textBox1->TabIndex = 2;
this->textBox1->Text = L"Coded by [D]opeDog - MPGH.net";
//
// textBox2
//
this->textBox2->BackColor = System::Drawing::Color::Crimson;
this->textBox2->Enabled = false;
this->textBox2->ForeColor = System::Drawing::Color::Orange;
this->textBox2->Location = System::Drawing::Point(255, 177);
this->textBox2->Name = L"textBox2";
this->textBox2->Size = System::Drawing::Size(100, 21);
this->textBox2->TabIndex = 3;
this->textBox2->Text = L"Long Live Egypt";
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(7, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->BackgroundImage = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"$this.BackgroundImage")));
this->ClientSize = System::Drawing::Size(367, 199);
this->Controls->Add(this->textBox2);
this->Controls->Add(this->textBox1);
this->Controls->Add(this->button2);
this->Controls->Add(this->button1);
this->Font = (gcnew System::Drawing::Font(L"Tahoma", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->ForeColor = System::Drawing::Color::Lime;
this->Icon = (cli::safe_cast<System::Drawing::Icon^ >(resources->GetObject(L"$this.Icon")));
this->Name = L"Form1";
this->Text = L"AVA-Hacks Pack v1.0";
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
}
};
}
// Anti-KRA1.cpp : main project file.
#include "stdafx.h"
#include "Form1.h"
using namespace AntiKRA1;
[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
// Enabling Windows XP visual effects before any controls are created
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
// Create the main window and run it
Application::Run(gcnew Form1());
return 0;
}
#include <windows.h>
#define pointer 0x00FA2510
#define offset 0x90
unsigned long ClientOffset;
void MemoryWrite(DWORD xAddress, int Value)//Write the integer value
{
*(int*)xAddress = Value;
}
bool activated = false;
void TheThread()
{
ClientOffset = (unsigned long)GetModuleHandleA("AVA.exe");
unsigned long address = ClientOffset + pointer;
address = *(unsigned long*)address + offset;
while(true)//Keep the thread alive
{
if(GetAsyncKeyState(VK_HOME)&0x8000) //The Hotkey to enable the function
{
if(activated = false)
{
MemoryWrite(address, 5);//Memory write
activated = true;
}
Sleep(50);//Stop the loop from chewing the cpu
}
else if(GetAsyncKeyState(VK_END)&0x8000){
if(activated = true)
{
MemoryWrite(address, 6);//Memory write
activated = false;
}
}
}
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
DisableThreadLibraryCalls(hinstDLL);
if (fdwReason == DLL_PROCESS_ATTACH)
{
if(CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)TheThread, NULL, 0, NULL) == NULL)//Creates the thread
{
MessageBoxA(NULL , "Couldn't create a thread.", "Error", MB_OK | MB_ICONERROR);
return false;
}
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
}
return TRUE;
}