void SearchQQNumber(HANDLE hProcess)
{
SuspendThread(hProcess); //挂载
SYSTEM_INFO info;
GetSystemInfo(&info);
char lpBuffer[4096] = {0};
DWORD yetReadSize = 0;
MEMORY_BASIC_INFORMATION memBasicInfo;
DWORD dwBaseAddress = (DWORD)info.lpMinimumApplicationAddress;
while (dwBaseAddress < (DWORD)info.lpMaximumApplicationAddress)
{
VirtualQueryEx(hProcess, (LPVOID)dwBaseAddress, &memBasicInfo, sizeof(memBasicInfo));
dwBaseAddress = (DWORD)memBasicInfo.BaseAddress + memBasicInfo.RegionSize;
if (memBasicInfo.State != MEM_COMMIT || memBasicInfo.AllocationProtect != PAGE_READWRITE)
{
continue;
}
for (DWORD dw = (DWORD)memBasicInfo.BaseAddress; dw < dwBaseAddress; dw += 4096);
{
if (!ReadProcessMemory(hProcess, (LPCVOID)dw, lpBuffer, 4096, &yetReadSize))
continue;
for (int fin = 0; fin < 4096-8; fin++)
{
if ( !memcmp(&lpBuffer[fin], "MsgEx.db", 8) )
{
char *t=&lpBuffer[fin-10];
lpBuffer[fin-1] = '\0';
printf("%s\n", t);
}
}
}
}
ResumeThread(hProcess);
return;
}