MCPcopy Create free account
hub / github.com/SickleSec/GhostWolf / MyMemCmp

Function MyMemCmp

Ghostwolf/Memory.cpp:38–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38BOOL MyMemCmp(BYTE* source, const BYTE* searchPattern, size_t num) {
39 for (size_t i = 0; i < num; ++i) {
40 if (searchPattern[i] == 0xAA)
41 continue;
42 if (searchPattern[i] == 0xAF && (source[i] & 0x0F) == 0x0F) {
43 continue;
44 }
45 if (searchPattern[i] == 0xFF && source[i] != 0x00 && source[i] != 0x2E) {
46 continue;
47 }
48 if (source[i] != searchPattern[i]) {
49 return FALSE;
50 }
51 }
52
53 return TRUE;
54}
55
56BYTE* PatchBaseAddress(const BYTE* pattern, size_t patternSize, uintptr_t baseAddress, AppLication targetApp, AppMode mode) {
57

Callers 1

FindPatternFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected