// dllmain.cpp : 定义 DLL 应用程序的入口点。 #include "pch.h" //#include "函数块.h" /* typedef int func(int a,class b); func* f = (func*)0x1127D60; */ void testcall() { //_SendpacksType(*_SendClass, 0, 0x2D); //_SendPacks(); /* _SendpacksType(*_SendClass, 0, 38); _SendPacksByte(*_SendClass, 0, 1); _SendPacksByte(*_SendClass, 0, 0); _SendPacksWord(*_SendClass, 0, 1109); _SendPacksWord(*_SendClass, 0, 268); _SendPacksByte(*_SendClass, 0, 5); _SendPacksWord(*_SendClass, 0, 0); _SendPacksWord(*_SendClass, 0, 0); _SendPacks(); */ /* _SendpacksType(*_SendClass, 0, 17); _SendPacksByte(*_SendClass, 3, 1); _SendPacksWord(*_SendClass, 56, 1); _SendPacksDWord(*_SendClass, 0, 1); _SendPacksDWord(*_SendClass, 6, 1); _SendPacks(); */ _SendpacksType(*_SendClass, 0, 0x3); _SendPacks(); } void ThreadFun(void) { // 下方写全局变量 static int Nut头地址; static int 属性头地址; static int 可开始执行判断; while (true) { Sleep(500); if (GetHook(0x1A5FB4C, "0x14+0x28+") == 6)可开始执行判断 = 1; if (可开始执行判断 == 1) { while (true) { Sleep(10); if (GetExeNutWrtNum(61) != 0 && Nut头地址 == 0)Nut头地址 = GetExeNutWrtNum(61); //if (GetExeNutWrtNum(61 != 0))属性头地址 = GetExeNutWrtNum(61); if (GetExeNutWrtNum(0) == 666) { std::cout << u8"写成功" << std::endl;; testcall(); SetExeNutWrtNum(0, 0); SetNutArrNum(Nut头地址 , 20, 0); } } } } } __declspec(dllexport) void Lenheart() { DWORD threadID; CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ThreadFun, NULL, 0, &threadID); } BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: //int i = f(60,80); //std::cout << "12132132" << std::endl; Lenheart(); case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; }