// PatternFind.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//

#include <iostream>
#include "HijackTingMix.h"

int main()
{
	std::string pattern = "?5 ?? 89 ?? 8?";
	HMODULE module = GetModuleHandle(L"ntdll.dll");
	clock_t nBeginTime = clock();
	// 0为进程全内存搜索，module为指定模块搜索
	std::vector<ULONG_PTR> retList;
	PatternFindEx(retList, GetCurrentProcess(), module, pattern, 0);
	std::cout << "共搜到：" << retList.size() << "个地址-->搜索时间：" << clock() - nBeginTime << " ms" << std::endl;
	for (int i = 0; i < retList.size(); i++)
	{
		std::cout << "第" << i + 1 << "个地址：" << (PVOID)retList[i] << std::endl;
	}

	system("pause");
	return 0;
}