Código genérico:
Código con filtro:
Código (asm) [Seleccionar]
.386
.model flat, stdcall
option casemap:none
assume fs:nothing
.data
var1 db 'k',0,'e',0,'r',0,'n',0,'e',0,'l',0,'3',0,'2',0
var2 db 'K',0,'E',0,'R',0,'N',0,'E',0,'L',0,'3',0,'2',0
.code
start:
mov eax, fs:[030h]
mov eax, [eax + 0ch]
mov eax, [eax + 0ch]
xor edx, edx
mov esi, 0Fh
KERNEL:
mov eax, [eax]
mov ebx, [eax + 030h]
CMPSTR1:
mov cl, byte ptr [ebx + edx]
cmp byte ptr [offset var1 + edx], cl
jnz CMPSTR2
inc edx
cmp edx, esi
jz EXIT
jmp CMPSTR1
CMPSTR2:
mov cl, byte ptr [ebx + edx]
cmp byte ptr [offset var2 + edx], cl
jnz KERNEL
inc edx
cmp edx, esi
jz EXIT
jmp CMPSTR1
EXIT:
mov eax, [eax + 018h]
end start
Código con filtro:
Código (asm) [Seleccionar]
mov eax, fs:[030h]
mov eax, [eax + 0ch]
mov eax, [eax + 0ch]
KERNEL:
mov eax, [eax]
mov ebx, [eax + 030h]
mov ecx, 00320033h
cmp ecx, [ebx + 0ch]
JNZ KERNEL
mov eax, [eax + 018h]