aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoni <matzeton@googlemail.com>2014-11-23 13:35:58 +0100
committertoni <matzeton@googlemail.com>2014-11-23 13:35:58 +0100
commit4bbd82258fc358af117b45fed943b5df7a03280b (patch)
tree3249bb076249da1d0805bd0e15ad069250dbc0f9
parentdb4092b9acd2c6041fd44f308058063f7a4ad59b (diff)
- xor2_decoder: xor'ing more than 1 byte (wip)
-rw-r--r--crypter/xor2_decoder.asm17
-rw-r--r--crypter/xor_decoder.asm4
2 files changed, 18 insertions, 3 deletions
diff --git a/crypter/xor2_decoder.asm b/crypter/xor2_decoder.asm
new file mode 100644
index 0000000..87c248f
--- /dev/null
+++ b/crypter/xor2_decoder.asm
@@ -0,0 +1,17 @@
+BITS 32
+
+
+jmp short go
+next:
+pop esi
+xor ecx,ecx
+xor eax,eax
+mov cl,0
+change:
+xor byte [esi + ecx - 1],0
+dec cl
+jnz change
+jmp short ok
+go:
+call next
+ok:
diff --git a/crypter/xor_decoder.asm b/crypter/xor_decoder.asm
index 3aa6f59..87c248f 100644
--- a/crypter/xor_decoder.asm
+++ b/crypter/xor_decoder.asm
@@ -8,9 +8,7 @@ xor ecx,ecx
xor eax,eax
mov cl,0
change:
-mov byte al,0
-xor byte al,[esi + ecx - 1]
-
+xor byte [esi + ecx - 1],0
dec cl
jnz change
jmp short ok