Function at 0x10012aa0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0x14]
sub esp, 0x18
shr edx, 1
mov dword [ebp + 0x14], edx
push ebx
mov ebx, dword [ebp + 0x28]
push esi
mov esi, dword [ebp + 0xc]
shr esi, 1
push edi
cmp ebx, 2
je 0x10012acb
cmp ebx, 3
je 0x10012acb
mov edi, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
jmp 0x10012ae8
mov edi, dword [ebp + 8]
cmp ebx, 2
mov ecx, dword [ebp + 0x10]
mov eax, 1
mov dword [ebp + 0x14], esi
mov esi, edx
mov edx, 4
cmove eax, edx
mov ebx, eax
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x28], edi
cmp ebx, 1
je 0x10012c26
cmp ebx, 4
je 0x10012c26
test ebx, ebx
je 0x10012b0d
cmp ebx, 5
jne 0x10012d4c
mov edx, dword [ebp + 0x24]
neg ebx
sbb ebx, ebx
and ebx, 0xff
test edx, edx
je 0x10012d4c
mov eax, dword [ebp + 0x20]
add eax, 0xfffffffc
mov dword [ebp - 4], eax
lea eax, [esi + esi]
mov esi, dword [ebp + 0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
add eax, eax
add esi, 2
mov dword [ebp - 0x14], eax
nop
dec edx
mov dword [ebp - 0x18], edx
xor edx, edx
cmp dword [ebp - 4], edx
jl 0x10012bd1
lea eax, [ecx + 4]
mov dword [ebp + 0x14], eax
lea eax, [edi + 2]
mov dword [ebp - 8], eax
mov eax, ecx
sub eax, edi
mov edi, dword [ebp - 8]
mov dword [ebp - 0xc], eax
movzx eax, word [eax + edi]
lea edi, [edi + 8]
xor ecx, ecx
cmp ax, word [edi - 8]
mov eax, dword [ebp + 0x14]
sete cl
neg ecx
xor ecx, ebx
movzx eax, word [eax - 4]
cmp ax, word [edi - 0xa]
mov byte [esi + edx - 1], cl
sete al
xor ecx, ecx
neg al
xor al, bl
mov byte [esi + edx - 2], al
mov eax, dword [ebp + 0x14]
movzx eax, word [eax + 2]
cmp ax, word [edi - 4]
mov eax, dword [ebp + 0x14]
sete cl
neg ecx
xor ecx, ebx
movzx eax, word [eax]
cmp ax, word [edi - 6]
mov byte [esi + edx + 1], cl
sete al
add dword [ebp + 0x14], 8
neg al
xor al, bl
mov byte [esi + edx], al
add edx, 4
mov eax, dword [ebp - 0xc]
cmp edx, dword [ebp - 4]
jle 0x10012b65
mov edi, dword [ebp + 0x28]
cmp edx, dword [ebp + 0x20]
jge 0x10012c02
mov eax, dword [ebp + 0xc]
lea ecx, [edi + edx*2]
sub eax, edi
mov dword [ebp + 0x14], eax
mov edi, eax
mov ax, word [edi + ecx]
lea ecx, [ecx + 2]
cmp ax, word [ecx - 2]
sete al
neg al
xor al, bl
mov byte [esi + edx - 2], al
inc edx
cmp edx, dword [ebp + 0x20]
jl 0x10012be3
mov edi, dword [ebp + 0x28]
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x10]
add edi, dword [ebp - 0x14]
add esi, dword [ebp + 0x1c]
mov edx, dword [ebp - 0x18]
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x28], edi
test edx, edx
jne 0x10012b40
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x24]
dec ebx
neg ebx
sbb ebx, ebx
and ebx, 0xff
test edx, edx
je 0x10012d4c
mov eax, dword [ebp + 0x20]
add eax, 0xfffffffc
mov dword [ebp - 4], eax
lea eax, [esi + esi]
mov esi, dword [ebp + 0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
add eax, eax
add esi, 2
mov dword [ebp - 0xc], eax
lea esp, [esp]
dec edx
xor eax, eax
mov dword [ebp - 8], edx
cmp dword [ebp - 4], eax
jl 0x10012cfd
add ecx, 4
mov dword [ebp + 0x14], ecx
lea ecx, [edi + 2]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0xc]
sub ecx, edi
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x14], ecx
jmp 0x10012c90
movzx ecx, word [ecx + edi]
lea edi, [edi + 8]
cmp word [edi - 8], cx
mov ecx, dword [ebp + 0x14]
sbb edx, edx
neg edx
neg edx
movzx ecx, word [ecx - 4]
xor edx, ebx
cmp cx, word [edi - 0xa]
mov byte [esi + eax - 1], dl
seta cl
neg cl
xor cl, bl
mov byte [esi + eax - 2], cl
mov ecx, dword [ebp + 0x14]
movzx ecx, word [ecx + 2]
cmp word [edi - 4], cx
mov ecx, dword [ebp + 0x14]
sbb edx, edx
neg edx
neg edx
movzx ecx, word [ecx]
xor edx, ebx
cmp cx, word [edi - 6]
mov byte [esi + eax + 1], dl
seta cl
add dword [ebp + 0x14], 8
neg cl
xor cl, bl
mov byte [esi + eax], cl
add eax, 4
mov ecx, dword [ebp - 0x14]
cmp eax, dword [ebp - 4]
jle 0x10012c90
mov edi, dword [ebp + 0x28]
mov edx, dword [ebp - 8]
cmp eax, dword [ebp + 0x20]
jge 0x10012d32
mov ecx, dword [ebp + 0xc]
lea edx, [edi + eax*2]
sub ecx, edi
mov dword [ebp + 0x14], ecx
mov edi, ecx
nop
mov cx, word [edx + edi]
lea edx, [edx + 2]
cmp cx, word [edx - 2]
seta cl
neg cl
xor cl, bl
mov byte [esi + eax - 2], cl
inc eax
cmp eax, dword [ebp + 0x20]
jl 0x10012d10
mov edi, dword [ebp + 0x28]
mov edx, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x10]
add edi, dword [ebp - 0xc]
add esi, dword [ebp + 0x1c]
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x28], edi
test edx, edx
jne 0x10012c60
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret