| 325 | } |
| 326 | |
| 327 | DWORD_PTR ProcessAccessHelp::findPattern(DWORD_PTR startOffset, DWORD size, BYTE * pattern, const char * mask) |
| 328 | { |
| 329 | DWORD pos = 0; |
| 330 | size_t searchLen = strlen(mask) - 1; |
| 331 | |
| 332 | for(DWORD_PTR retAddress = startOffset; retAddress < startOffset + size; retAddress++) |
| 333 | { |
| 334 | if( *(BYTE*)retAddress == pattern[pos] || mask[pos] == '?' ) |
| 335 | { |
| 336 | if(mask[pos+1] == 0x00) |
| 337 | { |
| 338 | return (retAddress - searchLen); |
| 339 | } |
| 340 | pos++; |
| 341 | } else { |
| 342 | pos = 0; |
| 343 | } |
| 344 | } |
| 345 | return 0; |
| 346 | } |
| 347 | |
| 348 | bool ProcessAccessHelp::readHeaderFromCurrentFile(const WCHAR * filePath) |
| 349 | { |
nothing calls this directly
no outgoing calls
no test coverage detected