Function at 0x1006c070
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 8]
mov al, byte [ebx + 8]
lea ecx, [ebx + 8]
push esi
push edi
mov edi, dword [ebx]
mov dword [ebp - 4], edi
test al, al
jne 0x1006c308
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x1006c09c
movzx ecx, word [edx + 8]
jmp 0x1006c09e
xor ecx, ecx
mov al, byte [ebx + 9]
mov dword [ebp - 8], ecx
cmp al, 8
jae 0x1006c228
movzx eax, al
sub eax, 1
je 0x1006c1bc
sub eax, 1
je 0x1006c155
sub eax, 2
jne 0x1006c141
mov edx, dword [ebp + 0xc]
mov eax, ecx
shl eax, 4
add eax, ecx
movzx ecx, ax
lea eax, [edi - 1]
mov dword [ebp - 8], ecx
mov esi, eax
lea ecx, [edx - 1]
shr esi, 1
add ecx, edi
and eax, 1
mov dword [ebp - 0x14], ecx
add esi, edx
shl eax, 2
mov ecx, 4
sub ecx, eax
mov dword [ebp - 0x10], ecx
test edi, edi
je 0x1006c13e
mov dword [ebp - 0xc], edi
mov ebx, ecx
mov edi, dword [ebp - 0x14]
mov dl, byte [esi]
lea edi, [edi - 1]
mov cl, bl
shr dl, cl
mov ecx, 4
mov al, dl
shl dl, 4
and al, 0xf
xor al, dl
cmp ebx, 4
mov byte [edi + 1], al
lea eax, [esi - 1]
cmovne eax, esi
mov esi, eax
xor eax, eax
cmp ebx, 4
cmovne eax, ecx
sub dword [ebp - 0xc], 1
mov ebx, eax
jne 0x1006c103
mov edi, dword [ebp - 4]
mov ebx, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
lea ecx, [ebx + 4]
mov byte [ebx + 9], 8
mov byte [ebx + 0xb], 8
mov al, 8
mov dword [ecx], edi
jmp 0x1006c22b
imul eax, ecx, 0x55
mov ebx, 3
mov ecx, dword [ebp + 0xc]
movzx eax, ax
mov dword [ebp - 8], eax
lea eax, [edi - 1]
mov esi, eax
and eax, 3
shr esi, 2
sub ebx, eax
add esi, ecx
add ebx, ebx
dec ecx
add ecx, edi
test edi, edi
je 0x1006c214
mov dword [ebp - 0xc], edi
mov edi, ecx
mov dl, byte [esi]
mov cl, bl
shr dl, cl
and dl, 3
mov al, dl
shl al, 2
or al, dl
shl al, 2
or al, dl
shl al, 2
or al, dl
mov byte [edi], al
cmp ebx, 6
jne 0x1006c1ad
xor ebx, ebx
dec esi
jmp 0x1006c1b0
add ebx, 2
dec edi
sub dword [ebp - 0xc], 1
jne 0x1006c187
jmp 0x1006c138
imul eax, ecx, 0xff
mov edx, 7
mov ecx, dword [ebp + 0xc]
movzx eax, ax
mov dword [ebp - 8], eax
lea eax, [edi - 1]
mov esi, eax
and eax, 7
shr esi, 3
sub edx, eax
add esi, ecx
dec ecx
add ecx, edi
test edi, edi
je 0x1006c13e
mov ebx, ecx
nop dword [eax]
mov al, byte [esi]
mov cl, dl
shr al, cl
and al, 1
neg al
sbb al, al
mov byte [ebx], al
cmp edx, 7
jne 0x1006c208
xor edx, edx
dec esi
jmp 0x1006c209
inc edx
dec ebx
sub edi, 1
jne 0x1006c1f0
jmp 0x1006c138
mov ebx, dword [ebp + 8]
mov al, 8
lea ecx, [ebx + 4]
mov dword [ecx], edi
mov byte [ebx + 9], 8
mov byte [ebx + 0xb], 8
jmp 0x1006c22b
lea ecx, [ebx + 4]
test edx, edx
je 0x1006c48f
cmp al, 8
jne 0x1006c272
mov eax, dword [ebp + 0xc]
lea edx, [eax - 1]
add edx, edi
lea esi, [eax - 1]
lea esi, [esi + edi*2]
test edi, edi
je 0x1006c2e6
mov ebx, edi
nop
movzx eax, byte [edx]
lea esi, [esi - 2]
sub ax, word [ebp - 8]
lea edx, [edx - 1]
neg ax
sbb al, al
mov byte [esi + 2], al
mov al, byte [edx + 1]
mov byte [esi + 1], al
sub ebx, 1
jne 0x1006c250
jmp 0x1006c2e0
cmp al, 0x10
jne 0x1006c2e6
mov esi, dword [ebp + 0xc]
mov eax, dword [ecx]
lea edx, [esi - 1]
add edx, eax
lea eax, [eax*2 - 1]
add eax, esi
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], eax
test edi, edi
je 0x1006c2e6
mov eax, dword [ebp - 8]
mov ebx, edx
movzx ecx, ax
mov dword [ebp - 0xc], edi
mov edi, dword [ebp - 0x10]
mov dword [ebp - 8], ecx
movzx edx, byte [ebx - 1]
lea ebx, [ebx - 1]
movzx eax, byte [ebx + 1]
lea edi, [edi - 4]
shl edx, 8
lea ebx, [ebx - 1]
or edx, eax
sub edx, ecx
mov ecx, dword [ebp - 8]
neg edx
sbb dl, dl
sub dword [ebp - 0xc], 1
mov byte [edi + 4], dl
mov byte [edi + 3], dl
movzx eax, byte [ebx + 2]
mov byte [edi + 2], al
movzx eax, byte [ebx + 1]
mov byte [edi + 1], al
jne 0x1006c2a4
mov edi, dword [ebp - 4]
mov ebx, dword [ebp + 8]
lea ecx, [ebx + 4]
mov al, byte [ebx + 9]
add al, al
mov byte [ebx + 8], 4
mov byte [ebx + 0xb], al
movzx eax, al
imul eax, edi
pop edi
pop esi
mov byte [ebx + 0xa], 2
pop ebx
shr eax, 3
mov dword [ecx], eax
mov esp, ebp
pop ebp
ret
cmp al, 2
jne 0x1006c48f
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x1006c48f
mov dl, byte [ebx + 9]
lea eax, [ebx + 9]
mov dword [ebp - 8], eax
cmp dl, 8
jne 0x1006c39f
mov ecx, dword [ebp + 0xc]
mov esi, dword [ebp - 4]
lea edx, [ecx - 1]
add edx, dword [ebx + 4]
lea ecx, [ecx + esi*4]
dec ecx
test esi, esi
je 0x1006c394
mov ebx, esi
nop
movzx eax, byte [edx - 2]
cmp ax, word [edi + 2]
jne 0x1006c361
movzx eax, byte [edx - 1]
cmp ax, word [edi + 4]
jne 0x1006c361
movzx eax, byte [edx]
cmp ax, word [edi + 6]
jne 0x1006c361
xor al, al
jmp 0x1006c363
or al, 0xff
mov byte [ecx], al
or esi, 0xffffffff
movzx eax, byte [edx]
mov dword [ebp - 0xc], ecx
mov byte [esi + ecx], al
or eax, esi
add ecx, eax
movzx eax, byte [edx - 1]
mov byte [ecx - 1], al
movzx eax, byte [edx - 2]
sub edx, 3
mov byte [ecx - 2], al
sub ecx, 3
sub ebx, 1
jne 0x1006c340
mov ebx, dword [ebp + 8]
mov esi, dword [ebp - 4]
lea eax, [ebx + 9]
lea ecx, [ebx + 8]
jmp 0x1006c474
cmp dl, 0x10
jne 0x1006c471
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
lea esi, [ecx - 1]
add esi, dword [ebx + 4]
lea edx, [ecx - 1]
lea ecx, [ebx + 8]
mov ebx, dword [ebp - 8]
mov dword [ebp - 8], ebx
lea edx, [edx + eax*8]
mov ebx, dword [ebp + 8]
test eax, eax
je 0x1006c496
mov dword [ebp - 8], eax
movzx ecx, byte [esi - 5]
movzx eax, byte [esi - 4]
shl ecx, 8
or ecx, eax
mov dword [ebp - 0x14], edx
movzx eax, word [edi + 2]
cmp ecx, eax
jne 0x1006c417
movzx ecx, byte [esi - 3]
movzx eax, byte [esi - 2]
shl ecx, 8
or ecx, eax
movzx eax, word [edi + 4]
cmp ecx, eax
jne 0x1006c417
movzx ecx, byte [esi - 1]
movzx eax, byte [esi]
shl ecx, 8
or ecx, eax
movzx eax, word [edi + 6]
cmp ecx, eax
jne 0x1006c417
dec edx
xor al, al
jmp 0x1006c41a
dec edx
or al, 0xff
mov ebx, dword [ebp - 0x14]
mov ecx, edx
mov dword [ebp - 0xc], 0xffffffff
mov byte [ebx], al
mov byte [edx], al
movzx eax, byte [esi]
mov edx, dword [ebp - 0xc]
mov byte [edx + ecx], al
add edx, ecx
movzx eax, byte [esi - 1]
mov byte [edx - 1], al
movzx eax, byte [esi - 2]
mov byte [edx - 2], al
movzx eax, byte [esi - 3]
mov byte [edx - 3], al
movzx eax, byte [esi - 4]
mov byte [edx - 4], al
movzx eax, byte [esi - 5]
sub esi, 6
mov byte [edx - 5], al
sub edx, 6
sub dword [ebp - 8], 1
jne 0x1006c3d1
mov ebx, dword [ebp + 8]
lea ecx, [ebx + 8]
lea eax, [ebx + 9]
mov esi, dword [ebp - 4]
mov al, byte [eax]
shl al, 2
mov byte [ebx + 0xb], al
movzx eax, al
imul eax, esi
mov byte [ecx], 6
mov byte [ebx + 0xa], 4
shr eax, 3
mov dword [ebx + 4], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, eax
mov eax, dword [ebp - 8]
jmp 0x1006c474