
[ENABLE]alloc(newmem,2048) //2kb should be enoughlabel(returnhere)label(originalcode)label(exit)newmem: //this is allocated memory, you have read,write,execute access//place your code hereoriginalcode:mov al,00ret mov edi,ediexit:jmp returnhere0050316b:jmp newmemreturnhere:[DISABLE]dealloc(newmem)0050316b:mov al,01ret mov edi,edi//Alt: db B0 01 C3 8B FF
