#define SecureZeroMemory RtlSecureZeroMemory FORCEINLINE PVOID RtlSecureZeroMemory( IN PVOID ptr, IN SIZE_T cnt ) { volatile char *vptr = (volatile char *)ptr; #if defined(_M_AMD64) __stosb((PBYTE )((DWORD64)vptr), 0, cnt); #else while (cnt) { *vptr = 0; vptr++; cnt--; } #endif return ptr; } .text:7849AF16 align 10h .text:7849AF20 ; Exported entry 692. RtlZeroMemory .text:7849AF20 .text:7849AF20 ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ .text:7849AF20 .text:7849AF20 .text:7849AF20 public RtlZeroMemory .text:7849AF20 RtlZeroMemory proc near .text:7849AF20 .text:7849AF20 arg_0 = dword ptr 8 .text:7849AF20 arg_4 = dword ptr 0Ch .text:7849AF20 .text:7849AF20 push edi .text:7849AF21 mov edi, [esp+arg_0] .text:7849AF25 mov ecx, [esp+arg_4] .text:7849AF29 xor eax, eax .text:7849AF2B cld .text:7849AF2C mov edx, ecx .text:7849AF2E and edx, 3 .text:7849AF31 shr ecx, 2 .text:7849AF34 rep stosd .text:7849AF36 or ecx, edx .text:7849AF38 jnz short loc_7849AF3E .text:7849AF3A pop edi .text:7849AF3B retn 8 .text:7849AF3E ; --------------------------------------------------------------------------- .text:7849AF3E .text:7849AF3E loc_7849AF3E: ; CODE XREF: RtlZeroMemory+18j .text:7849AF3E rep stosb .text:7849AF40 pop edi .text:7849AF41 retn 8 .text:7849AF41 RtlZeroMemory endp memset in msvcrt.dll .text:78001A1D ; void *__cdecl memset(void *,int,size_t) .text:78001A1D public _memset .text:78001A1D _memset proc near ; CODE XREF: ___crtGetStringTypeA+C1p .text:78001A1D ; .text:78009873p ... .text:78001A1D mov edx, [esp+0Ch] .text:78001A21 mov ecx, [esp+4] .text:78001A25 test edx, edx .text:78001A27 jz loc_780107B7 .text:78001A2D xor eax, eax .text:78001A2F mov al, [esp+8] .text:78001A33 push edi .text:78001A34 mov edi, ecx .text:78001A36 cmp edx, 4 .text:78001A39 jb loc_780107AB .text:78001A3F neg ecx .text:78001A41 and ecx, 3 .text:78001A44 jnz loc_7801079D .text:78001A4A .text:78001A4A loc_78001A4A: ; CODE XREF: .text:780107A3j .text:78001A4A mov ecx, eax .text:78001A4C shl eax, 8 .text:78001A4F add eax, ecx .text:78001A51 mov ecx, eax .text:78001A53 shl eax, 10h .text:78001A56 add eax, ecx .text:78001A58 mov ecx, edx .text:78001A5A and edx, 3 .text:78001A5D shr ecx, 2 .text:78001A60 jz loc_780107AB .text:78001A66 rep stosd .text:78001A68 test edx, edx .text:78001A6A jnz loc_780107AB .text:78001A70 .text:78001A70 loc_78001A70: ; CODE XREF: .text:780107AFj .text:78001A70 mov eax, [esp+8] .text:78001A74 pop edi .text:78001A75 retn .text:78001A75 _memset endp