From a06f53ffc1f267631502553456fa7bbece64af48 Mon Sep 17 00:00:00 2001 From: Yosin-Lenheart Date: Sun, 6 Feb 2022 11:33:52 +0800 Subject: [PATCH] 11 --- test/dllmain.cpp | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/test/dllmain.cpp b/test/dllmain.cpp index a3aed63..656f97e 100644 --- a/test/dllmain.cpp +++ b/test/dllmain.cpp @@ -9,19 +9,12 @@ int Nut头地址; int 属性头地址; int 可开始执行判断; - -typedef int func(int a,int b); +/* +typedef int func(int a,class b); func* f = (func*)0x1127D60; +*/ -typedef int funa(); -funa* a = (funa*)0x1127EC0; -void testcall() -{ - int num = *(int*)(0x1AEB6E4); - f(num, 0xf); - a(); -} //获取EXE使用头 号位数据 int GetExeNutWrtNum(int Pos) @@ -81,6 +74,27 @@ int GetHook(int Addr , std::string 地址) return num; } + + + +typedef DWORD funa(); +funa* a = (funa*)0x1127EC0; + +typedef DWORD testc; +testc* tc = (testc*)0x1AEB6E4; + + +typedef int(__fastcall* sendp)(DWORD thisc, int de, int a); +sendp psendp = (sendp)0x1127D60; + + +void testcall() +{ + psendp(*tc, 0, 0x2D); + a(); +} + + void ThreadFun(void) { while (true) @@ -101,9 +115,9 @@ void ThreadFun(void) if (GetExeNutWrtNum(0) == 666) { std::cout << u8"写成功" << std::endl;; + testcall(); SetExeNutWrtNum(0, 0); SetNutArrNum(20, 0); - testcall(); } } }