| 175 | return command; |
| 176 | } |
| 177 | VOID ObfuscateVariable(LPWSTR command, LPCWSTR variableName) |
| 178 | { |
| 179 | DWORD length = lstrlenW(variableName); |
| 180 | WCHAR newName[100]; |
| 181 | |
| 182 | // Replace all ocurrences of a specified variable name with a randomized string of the same length. |
| 183 | if (GetRandomString(newName, length)) |
| 184 | { |
| 185 | for (LPWSTR ocurrence; ocurrence = StrStrIW(command, variableName);) |
| 186 | { |
| 187 | i_wmemcpy(ocurrence, newName, length); |
| 188 | } |
| 189 | } |
| 190 | } |
| 191 | VOID ObfuscateStringLiterals(LPWSTR command) |
| 192 | { |
| 193 | // Replace all string literals like |
no test coverage detected