MCPcopy Index your code
hub / github.com/bytecode77/r77-rootkit / ObfuscateVariable

Function ObfuscateVariable

Install/Install.c:177–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175 return command;
176}
177VOID 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}
191VOID ObfuscateStringLiterals(LPWSTR command)
192{
193 // Replace all string literals like

Callers 1

GetStartupCommandFunction · 0.85

Calls 1

GetRandomStringFunction · 0.85

Tested by

no test coverage detected