ImplZeroMemory2

This implemention of ZeroMemory will not be optimized by the compiler. It was ensure no imports are present in your binary

VOID ImplZeroMemory2(_Inout_ PVOID Destination, _In_ SIZE_T Size)
{
	PCHAR Pointer = (PCHAR)Destination;
	PCHAR End = Pointer + Size;

	for (;;)
	{
		if (Pointer >= End) break; *Pointer++ = 0;
		if (Pointer >= End) break; *Pointer++ = 0;
		if (Pointer >= End) break; *Pointer++ = 0;
		if (Pointer >= End) break; *Pointer++ = 0;
	}
}

Last updated