our Hooking function
| 85 | |
| 86 | // our Hooking function |
| 87 | void HeapSleep(DWORD dwMilliseconds) { |
| 88 | |
| 89 | BYTE KeyBuf[16]; |
| 90 | unsigned int r = 0; |
| 91 | for (int i = 0; i < 16; i++) { |
| 92 | rand_s(&r); |
| 93 | KeyBuf[i] = (CHAR)r; |
| 94 | |
| 95 | } |
| 96 | |
| 97 | printf("[+] Encrypt the HEAP allocations\n"); |
| 98 | HeapEncryptDecrypt(KeyBuf); |
| 99 | |
| 100 | |
| 101 | pSleep(dwMilliseconds); |
| 102 | |
| 103 | HeapEncryptDecrypt(KeyBuf); |
| 104 | |
| 105 | printf("[+] Decrypt the Heap allocations\n"); |
| 106 | pSleep(dwMilliseconds); |
| 107 | |
| 108 | } |
| 109 | |
| 110 | |
| 111 |
nothing calls this directly
no test coverage detected