From 9c4c8c6fe1b187bb6cc8f341eccc3850d9b5b855 Mon Sep 17 00:00:00 2001 From: galaxyhaxz Date: Sun, 10 Jun 2018 20:02:30 -0500 Subject: [PATCH] Update defs.h --- defs.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/defs.h b/defs.h index de3bfbae1..0b4c40ea7 100644 --- a/defs.h +++ b/defs.h @@ -28,6 +28,21 @@ ///////////////////////////////////////////////////////////////////////// #ifndef IDA_GARBAGE #define IDA_GARBAGE + +// note to self: only works for x86, originally used this way by the devs +inline void memset32(void *s, unsigned int i, size_t n) +{ + __asm { + mov ecx, n + mov eax, i + mov edi, s + rep stosd + } + + //for(x = 0; x < n; x++) + // (DWORD)s[x] = i; +} + typedef __int64 ll; typedef unsigned __int64 ull;