Signature Scanning Problem
I am having a problem with my sig scanning...
I am using the class above (probably bad, just want to see how it works before i re-write it) and for testing i am finding 2 offsets
for the m_flFlashMaxAlpha it is returning correctly
but I used Zat's tutorial on how to find a sig on UC (I read the sticky one here too) but that is returning
which has the extera a1 at the end which i dont need.
Could someone tell me why this is happening? I would like to make my cheat 100% pattern scan so I dont have to update the offsets all the time and this is giving me a little trouble.
Thanks in advance
Sig Scanning Class
Code:
#pragma once #include <Windows.h> #include <string> // This is not my dwFindPattern, credits @learn_more for creating this sexy beast #define INRANGE(x, a, b) (x >= a && x <= b) #define getBits( x ) (INRANGE((x&(~0x20)),'A','F') ? ((x&(~0x20)) - 'A' + 0xa) : (INRANGE(x,'0','9') ? x - '0' : 0)) #define getByte( x ) (getBits(x[0]) << 4 | getBits(x[1])) class CFindPatternEx { private: HANDLE hModule; PBYTE Buffer; DWORD dwFindPattern(DWORD dwAddress, DWORD dwLength, const char* szPattern) { const char* pat = szPattern; DWORD firstMatch = NULL; for (DWORD pCur = dwAddress; pCur < dwLength; pCur++) { if (!*pat) return firstMatch; if (*(PBYTE)pat == '\?' || *(BYTE*)pCur == getByte(pat)) { if (!firstMatch) firstMatch = pCur; if (!pat[2]) return firstMatch; if (*(PWORD)pat == '\?\?' || *(PBYTE)pat != '\?') pat += 3; else pat += 2; } else { pat = szPattern; firstMatch = 0; } } return NULL; } DWORD FindPatternSimplified(DWORD dwAddress, DWORD dwLength, const char* szPattern, DWORD Offset) { DWORD result = dwFindPattern(dwAddress, dwAddress + dwLength, szPattern); PBYTE bresult = (PBYTE)result; bresult += Offset; if (bresult) return *(DWORD*)bresult; else return 0; } public: CFindPatternEx(std::string ModulePath) { hModule = CreateFileA(ModulePath.c_str(), GENERIC_READ, // open for reading 0, // do not share NULL, // default security OPEN_EXISTING, // existing file only FILE_ATTRIBUTE_NORMAL, // normal file NULL); if (hModule == INVALID_HANDLE_VALUE) printf("Failed to open a handle to the dll Error %d\n", GetLastError()); Buffer = (PBYTE)VirtualAlloc(NULL, GetFileSize(hModule, NULL), MEM_COMMIT, PAGE_EXECUTE_READWRITE); if (!Buffer) printf("Could not Allocate %d bytes of memory\n", GetFileSize(hModule, NULL)); else printf("Successfully allocated %d bytes of memory\n", GetFileSize(hModule, NULL)); DWORD dwBytesRead; if (ReadFile(hModule, Buffer, GetFileSize(hModule, NULL), &dwBytesRead, NULL)) printf("Read file, bytes read : %d\n", dwBytesRead); else printf("Failed to read file Error %d\n", GetLastError()); } ~CFindPatternEx() { printf("Deconstructor called, cleaning up..\n"); CloseHandle(hModule); VirtualFree(Buffer, NULL, MEM_RELEASE); } DWORD FindPatternEx(std::string szPattern, DWORD Offset) { return FindPatternSimplified((DWORD)Buffer, GetFileSize(hModule, NULL), szPattern.c_str(), Offset); } };
I am using the class above (probably bad, just want to see how it works before i re-write it) and for testing i am finding 2 offsets
Code:
printf("m_flFlashMaxAlpha : 0x%0x\n", FindPatternClient->FindPatternEx("0F 2F F2 0F 87 ? ? ? ? F3 0F 10 A1 ? ? ? ? 0F 2F CC 0F 83", 13));
printf("m_dwClientState: : 0x%0x\n", FindPatternEngine->FindPatternEx("A1 ? ? ? ? F3 0F 11 80 ? ? ? ? D9 46 04 D9 05", 0));
Code:
m_flFlashMaxAlpha : 0xa2f4
Code:
m_dwClientState: : 0x5bb2c4a1
Could someone tell me why this is happening? I would like to make my cheat 100% pattern scan so I dont have to update the offsets all the time and this is giving me a little trouble.
Thanks in advance

