#include <windows.h>
#include <cstdint>
#include <cstring>
#include <string>
HANDLE hConsole;
void LogRaw(const std::string& s) {
DWORD w;
WriteConsoleA(hConsole, s.c_str(), (DWORD)s.size(), &w, 0);
}
void l0g(const std::string& s) {
LogRaw(s + "\r\n");
}
void LogM(const char* m, const char* t) {
l0g("[" + std::string(m) + "] " + t);
}
void ClearConsole() {
system("cls");
}
void TypeText(const std::string& text, int delay = 35) {
for (char c : text) {
LogRaw(std::string(1, c));
Sleep(delay);
}
LogRaw("\r\n");
}
void IntroAnimation() {
const char spin[] = "|/-\\";
int si = 0;
TypeText("dontasktoask tarafindan paylasilmistir", 40);
TypeText("bedava bir src dir", 40);
TypeText("para verdiysen dolandirildin", 40);
DWORD start = GetTickCount();
while (GetTickCount() - start < 3000) {
LogRaw("\rBekleniyor ");
LogRaw(std::string(1, spin[si++ % 4]));
Sleep(120);
}
}
void InfoScreen() {
ClearConsole();
l0g("=========== BILGILENDIRME ===========\n");
l0g("[KNOCKBACK]");
l0g("Knockback calistirmak icin:");
l0g("- Once bir oyuna gir");
l0g("- Oldukten sonra scan yap");
l0g("- Ardindan otomatik aktif olur\n");
l0g("[NOSWING]");
l0g("NoSwing icin:");
l0g("- Oyundayken kilic elindeyken scan yap");
l0g("- ASLA bulana kadar sol tik basma\n");
l0g("=====================================\n");
Sleep(2500);
}
bool ValidPage(MEMORY_BASIC_INFORMATION& mbi) {
return mbi.State == MEM_COMMIT &&
!(mbi.Protect & PAGE_GUARD) &&
!(mbi.Protect & PAGE_NOACCESS);
}
uintptr_t reach_addr = 0;
int reach_orig = 0;
bool reach_on = false;
void ScanReach() {
LogM("REACH", "Scan basladi");
SYSTEM_INFO si; GetSystemInfo(&si);
MEMORY_BASIC_INFORMATION mbi;
for (uintptr_t a = (uintptr_t)si.lpMinimumApplicationAddress;
a < (uintptr_t)si.lpMaximumApplicationAddress;
a += mbi.RegionSize) {
if (!VirtualQuery((void*)a, &mbi, sizeof(mbi))) continue;
if (!ValidPage(mbi)) continue;
for (uintptr_t s = a; s < a + mbi.RegionSize - 24; s++) {
unsigned char* m = (unsigned char*)s;
if (m[0] == 0x05 && m[10] == 0x0A && m[20] == 0x9B) {
reach_addr = s + 0x30;
reach_orig = *(int*)reach_addr;
LogM("REACH", "FOUND");
return;
}
}
}
LogM("REACH", "Bulunamadi");
}
void ToggleReach() {
if (!reach_addr) {
LogM("REACH", "Adres yok");
return;
}
DWORD o;
VirtualProtect((void*)reach_addr, 4, PAGE_EXECUTE_READWRITE, &o);
if (!reach_on) {
*(int*)reach_addr = reach_orig - 4;
reach_on = true;
LogM("REACH", "AKTIF");
}
else {
*(int*)reach_addr = reach_orig;
reach_on = false;
LogM("REACH", "KAPALI");
}
VirtualProtect((void*)reach_addr, 4, o, &o);
}
uintptr_t swing_addr = 0;
unsigned char swing_orig = 0;
bool noswing_run = false;
bool noswing_on = false;
HANDLE noswing_thread = nullptr;
DWORD WINAPI NoSwingFn(LPVOID) {
while (noswing_run) {
DWORD o;
VirtualProtect((void*)swing_addr, 1, PAGE_EXECUTE_READWRITE, &o);
*(unsigned char*)swing_addr = swing_orig;
VirtualProtect((void*)swing_addr, 1, o, &o);
Sleep(1);
}
return 0;
}
void ScanNoSwing() {
LogM("NOSWING", "Scan basladi");
SYSTEM_INFO si; GetSystemInfo(&si);
MEMORY_BASIC_INFORMATION mbi;
for (uintptr_t a = (uintptr_t)si.lpMinimumApplicationAddress;
a < (uintptr_t)si.lpMaximumApplicationAddress;
a += mbi.RegionSize) {
if (!VirtualQuery((void*)a, &mbi, sizeof(mbi))) continue;
if (!ValidPage(mbi)) continue;
for (uintptr_t s = a; s < a + mbi.RegionSize - 12; s++) {
unsigned char* m = (unsigned char*)s;
if (m[2] == 0x34 && m[3] == 0x43 && m[8] == 0xCD) {
swing_addr = s + 0x6D;
swing_orig = *(unsigned char*)swing_addr;
LogM("NOSWING", "FOUND");
noswing_run = true;
noswing_thread = CreateThread(nullptr, 0, NoSwingFn, nullptr, 0, nullptr);
noswing_on = true;
LogM("NOSWING", "AKTIF");
return;
}
}
}
LogM("NOSWING", "Bulunamadi");
}
bool PatchOnce(
const unsigned char* f, size_t fs,
const unsigned char* r, size_t rs,
const char* n, bool& on)
{
if (on) {
LogM(n, "Zaten aktif");
return true;
}
SYSTEM_INFO si; GetSystemInfo(&si);
MEMORY_BASIC_INFORMATION mbi;
for (uintptr_t a = (uintptr_t)si.lpMinimumApplicationAddress;
a < (uintptr_t)si.lpMaximumApplicationAddress;
a += mbi.RegionSize) {
if (!VirtualQuery((void*)a, &mbi, sizeof(mbi))) continue;
if (!ValidPage(mbi)) continue;
for (uintptr_t s = a; s < a + mbi.RegionSize - fs; s++) {
if (memcmp((void*)s, f, fs) == 0) {
DWORD o;
VirtualProtect((void*)s, rs, PAGE_EXECUTE_READWRITE, &o);
memcpy((void*)s, r, rs);
VirtualProtect((void*)s, rs, o, &o);
on = true;
LogM(n, "Patch uygulandi");
return true;
}
}
}
LogM(n, "Pattern bulunamadi");
return false;
}
const unsigned char sun_f[] = { 0xC3,0xF5,0x68,0x3F };
const unsigned char sun_r[] = { 0,0,0,0,0,0,0x1F,0x3C,0,0x90,0,0x1A };
bool sun_on = false;
const unsigned char speed_f[] = { 0,0,0,0,0,0,0xF0,0x3F,0xF4 };
const unsigned char speed_r[] = { 0,0,0,0,0,0,0,0x40,0xF4 };
bool speed_on = false;
const unsigned char kb_f[] = {
0x00,0x40,0x8F,0x40,0x00,0x00,0x00,0x00,
0x00,0x88,0xC3,0x40,0x00,0x00,0x00,0x00
};
const unsigned char kb_r[] = {
0x00,0x00,0x20,0x42,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
bool kb_on = false;
DWORD WINAPI MainThread(LPVOID) {
AllocConsole();
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTitleA("Module Console");
IntroAnimation();
ClearConsole();
InfoScreen();
l0g("[DLL] Inject OK");
l0g("[F] Reach Scan");
l0g("[F6] Reach Toggle");
l0g("[H] NoSwing Scan");
l0g("[M] Sun Patch");
l0g("[V] Speed Patch");
l0g("[B] Knockback Patch");
while (true) {
if (GetAsyncKeyState('F') & 1) ScanReach();
if (GetAsyncKeyState(VK_F6) & 1) ToggleReach();
if (GetAsyncKeyState('H') & 1) ScanNoSwing();
if (GetAsyncKeyState('M') & 1) PatchOnce(sun_f, sizeof(sun_f), sun_r, sizeof(sun_r), "SUN", sun_on);
if (GetAsyncKeyState('V') & 1) PatchOnce(speed_f, sizeof(speed_f), speed_r, sizeof(speed_r), "SPEED", speed_on);
if (GetAsyncKeyState('B') & 1) PatchOnce(kb_f, sizeof(kb_f), kb_r, sizeof(kb_r), "KNOCKBACK", kb_on);
Sleep(30);
}
}
BOOL APIENTRY DllMain(HMODULE, DWORD r, LPVOID) {
if (r == DLL_PROCESS_ATTACH)
CreateThread(0, 0, MainThread, 0, 0, 0);
return TRUE;
}