Function at 0x6215b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x38
mov ebx, dword [ebp + 8]
test bl, 3
je 0x6215d3
mov byte [ecx + 4], 0
mov dword [ecx], 0
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret
mov esi, edx
cmp ebx, 2
mov dword [ebp - 0x10], edx
jb 0x621658
movzx edi, byte [ebx + esi - 1]
mov edx, 0x3c
movzx eax, byte [ebx + esi - 2]
mov esi, 0x3c
sub edx, edi
add edi, 0x1c2
sub esi, eax
add eax, 0x1c2
and edi, edx
and eax, esi
mov edx, edi
shr edx, 8
and edx, 1
bt eax, 8
mov esi, edx
adc si, 0
movzx esi, si
sub ebx, esi
test si, si
je 0x621a53
cmp esi, 1
je 0x621a6c
cmp esi, 2
mov esi, dword [ebp - 0x10]
jne 0x6215c1
movzx edx, di
movzx eax, ax
and eax, edx
xor edx, edx
test eax, 0x100
sete dl
mov dword [ebp - 0x14], edx
mov edx, ebx
mov ebx, dword [ebp + 8]
cmp edx, ebx
jbe 0x62166e
jmp 0x621a85
xor edx, edx
test ebx, ebx
mov dword [ebp - 0x14], 0
setne dl
cmp edx, ebx
ja 0x621a85
mov eax, edx
mov ebx, edx
and edx, 3
lea edi, [edx + edx*2]
shr eax, 2
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x24], eax
lea eax, [eax + eax*2]
shr edi, 2
add edi, eax
cmp edi, dword [ebp + 0x10]
jbe 0x621697
mov byte [ecx + 4], 1
jmp 0x6215c5
and ebx, 0xfffffffc
mov dword [ebp - 0x20], ecx
mov ecx, 0xaaaaaaab
mov dword [ebp - 0x1c], edi
lea eax, [esi + ebx]
mov dword [ebp - 0x2c], eax
mov eax, edi
mul ecx
shr edx, 1
lea ecx, [edx + edx*2]
sub edi, ecx
test ebx, ebx
mov dword [ebp - 0x34], edi
mov edi, dword [ebp + 0xc]
lea eax, [edi + ecx]
mov dword [ebp - 0x30], eax
je 0x621870
mov eax, dword [ebp - 0x24]
movdqa xmm3, xmmword [0x6ec8e0]
movdqa xmm5, xmmword [0x6ec900]
mov edx, esi
mov esi, edi
shl eax, 2
neg eax
nop word cs:[eax + eax]
sub ecx, 3
jb 0x621870
movd xmm1, dword [edx]
pxor xmm0, xmm0
movdqa xmm2, xmmword [0x6ec840]
movdqa xmm6, xmmword [0x6ec880]
movdqa xmm7, xmmword [0x6ec8b0]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], edx
punpcklbw xmm1, xmm0
movdqa xmm0, xmm1
psubw xmm2, xmm1
movdqa xmm4, xmm1
psubw xmm6, xmm1
psubw xmm7, xmm1
paddw xmm0, xmmword [0x6ec850]
paddw xmm4, xmmword [0x6ec890]
pand xmm0, xmm2
movdqa xmm2, xmm1
paddw xmm2, xmmword [0x6ec870]
psrlw xmm0, 8
pand xmm0, xmmword [0x6ec860]
pand xmm6, xmm2
movdqa xmm2, xmm1
paddw xmm2, xmmword [0x6ec8a0]
psraw xmm6, 8
pand xmm4, xmm6
movdqa xmm6, xmm1
paddw xmm6, xmmword [0x6ec8c0]
pand xmm7, xmm2
movdqa xmm2, xmm1
paddw xmm2, xmmword [0x6ec8d0]
psraw xmm7, 8
pand xmm6, xmm7
movdqa xmm7, xmm3
psubw xmm7, xmm1
pand xmm7, xmm2
movdqa xmm2, xmm1
paddw xmm2, xmmword [0x6ec8f0]
psraw xmm7, 8
pand xmm2, xmm7
paddw xmm2, xmm6
paddw xmm2, xmm4
pcmpeqd xmm4, xmm4
paddw xmm2, xmm4
paddw xmm2, xmm0
movdqa xmm0, xmm5
psubw xmm0, xmm1
paddw xmm1, xmmword [0x6ec910]
movd eax, xmm2
pextrw edi, xmm2, 1
shl eax, 2
shl edi, 4
pand xmm1, xmm0
psrlw xmm1, 8
pand xmm1, xmm3
paddw xmm1, xmm2
pshufd xmm0, xmm1, 0x55
pextrw ebx, xmm1, 1
pextrw ecx, xmm1, 2
pextrw edx, xmm1, 3
por xmm0, xmm1
shr ebx, 4
shr ecx, 2
movdqa xmm1, xmm0
or ebx, eax
pextrw eax, xmm2, 2
or ecx, edi
psrld xmm1, 0x10
shl eax, 6
mov byte [esi], bl
mov byte [esi + 1], cl
mov ecx, dword [ebp - 0x40]
por xmm1, xmm0
or edx, eax
mov eax, dword [ebp - 0x24]
movd ebx, xmm1
mov byte [esi + 2], dl
mov edx, dword [ebp - 0x3c]
add esi, 3
shr ebx, 8
and ebx, 1
or dword [ebp - 0x14], ebx
add edx, 4
add eax, 4
jne 0x6216f0
mov edi, dword [ebp - 0x38]
mov dword [ebp - 0x28], 0x41414141
lea eax, [ebp - 0x28]
push edi
push dword [ebp - 0x2c]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
movd xmm0, dword [ebp - 0x28]
pxor xmm1, xmm1
movdqa xmm2, xmmword [0x6ec840]
movdqa xmm3, xmmword [0x6ec880]
movdqa xmm5, xmmword [0x6ec8b0]
movdqa xmm4, xmmword [0x6ec8c0]
movdqa xmm7, xmmword [0x6ec8f0]
punpcklbw xmm0, xmm1
movdqa xmm1, xmmword [0x6ec850]
psubw xmm2, xmm0
psubw xmm3, xmm0
psubw xmm5, xmm0
paddw xmm4, xmm0
paddw xmm7, xmm0
paddw xmm1, xmm0
pand xmm1, xmm2
movdqa xmm2, xmmword [0x6ec870]
psrlw xmm1, 8
pand xmm1, xmmword [0x6ec860]
paddw xmm2, xmm0
pand xmm3, xmm2
movdqa xmm2, xmmword [0x6ec890]
psraw xmm3, 8
paddw xmm2, xmm0
pand xmm2, xmm3
movdqa xmm3, xmmword [0x6ec8a0]
paddw xmm3, xmm0
pand xmm5, xmm3
movdqa xmm3, xmmword [0x6ec8e0]
psraw xmm5, 8
pand xmm4, xmm5
movdqa xmm5, xmmword [0x6ec8d0]
movdqa xmm6, xmm3
psubw xmm6, xmm0
paddw xmm5, xmm0
pand xmm6, xmm5
psraw xmm6, 8
pand xmm7, xmm6
paddw xmm7, xmm4
paddw xmm7, xmm2
pcmpeqd xmm2, xmm2
paddw xmm2, xmm7
paddw xmm2, xmm1
movdqa xmm1, xmmword [0x6ec900]
movd eax, xmm2
shl eax, 2
psubw xmm1, xmm0
paddw xmm0, xmmword [0x6ec910]
pand xmm0, xmm1
psrlw xmm0, 8
pand xmm0, xmm3
paddw xmm0, xmm2
pextrw ecx, xmm0, 1
pshufd xmm1, xmm0, 0x55
shr ecx, 4
por xmm1, xmm0
or ecx, eax
pextrw eax, xmm2, 1
mov byte [ebp - 0x17], cl
pextrw ecx, xmm0, 2
shl eax, 4
shr ecx, 2
or ecx, eax
pextrw eax, xmm2, 2
movdqa xmm2, xmm1
psrld xmm2, 0x10
mov byte [ebp - 0x16], cl
shl eax, 6
pextrw ecx, xmm0, 3
por xmm2, xmm1
or ecx, eax
xor eax, eax
movd esi, xmm2
mov byte [ebp - 0x15], cl
shr esi, 8
and esi, 1
cmp edi, 1
mov edi, dword [ebp - 0x14]
sete al
or edi, eax
lea eax, [ebp - 0x17]
push dword [ebp - 0x34]
push eax
push dword [ebp - 0x30]
call sub.msvcrt.dll_memcpy
add esp, 0xc
or di, si
je 0x621a1b
mov eax, dword [ebp - 0x20]
mov byte [eax + 4], 0
jmp 0x621c03
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [ebp + 8]
mov eax, ecx
or eax, ebx
je 0x621beb
push 4
push ebx
mov esi, dword [ebp - 0x10]
push esi
call fcn.0068e800
add esp, 0xc
add esi, eax
xor ecx, ecx
sub ebx, eax
cmovb ebx, ecx
cmovb esi, ecx
mov dword [ebp - 0x10], esi
jae 0x621a91
and bl, 1
jmp 0x621bfd
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x14], 0
mov edx, ebx
mov ebx, dword [ebp + 8]
cmp edx, ebx
jbe 0x62166e
jmp 0x621a85
mov esi, dword [ebp - 0x10]
movzx eax, dx
xor eax, 1
mov dword [ebp - 0x14], eax
mov edx, ebx
mov ebx, dword [ebp + 8]
cmp edx, ebx
jbe 0x62166e
push 0x6ece44
push ebx
push edx
call fcn.005006e0
push 3
mov esi, dword [ebp - 0x1c]
push esi
mov edi, dword [ebp + 0xc]
push edi
call fcn.0068e800
add esp, 0xc
mov edx, esi
mov ecx, 0
sub edx, eax
cmovb edx, ecx
jae 0x621abb
and dl, 1
mov ebx, edx
jmp 0x621bfd
add eax, edi
mov dword [ebp - 0x44], 0
lea esi, [ebp - 0x44]
mov ecx, eax
push 4
push esi
call fcn.00621c10
add esp, 8
test eax, eax
je 0x621bfb
cmp edx, ebx
cmovb ebx, edx
test ebx, ebx
je 0x621be8
mov edi, dword [ebp - 0x10]
xor edx, edx
cmp ebx, 8
mov ecx, 0
jb 0x621bce
xor edx, edx
cmp ebx, 0x20
jb 0x621b7c
mov ecx, ebx
pxor xmm0, xmm0
xor edx, edx
pxor xmm1, xmm1
and ecx, 0xffffffe0
movdqu xmm2, xmmword [eax + edx]
movdqu xmm4, xmmword [edi + edx]
movdqu xmm3, xmmword [eax + edx + 0x10]
pxor xmm4, xmm2
por xmm0, xmm4
movdqu xmm4, xmmword [edi + edx + 0x10]
add edx, 0x20
cmp ecx, edx
pxor xmm4, xmm3
por xmm1, xmm4
jne 0x621b12
por xmm1, xmm0
cmp ebx, ecx
pshufd xmm0, xmm1, 0xee
por xmm0, xmm1
pshufd xmm1, xmm0, 0x55
por xmm1, xmm0
movdqa xmm0, xmm1
psrld xmm0, 0x10
por xmm0, xmm1
movdqa xmm1, xmm0
psrlw xmm1, 8
por xmm1, xmm0
movd edx, xmm1
je 0x621be0
test bl, 0x18
je 0x621bce
mov esi, ecx
mov ecx, ebx
movzx edx, dl
and ecx, 0xfffffff8
movd xmm0, edx
movq xmm1, qword [eax + esi]
movq xmm2, qword [edi + esi]
add esi, 8
cmp ecx, esi
pxor xmm2, xmm1
por xmm0, xmm2
jne 0x621b8a
pshufd xmm1, xmm0, 0x55
cmp ebx, ecx
por xmm1, xmm0
movdqa xmm0, xmm1
psrld xmm0, 0x10
por xmm0, xmm1
movdqa xmm1, xmm0
psrlw xmm1, 8
por xmm1, xmm0
movd edx, xmm1
je 0x621be0
mov esi, ebx
movzx ebx, byte [edi + ecx]
xor bl, byte [eax + ecx]
inc ecx
or dl, bl
mov ebx, esi
cmp esi, ecx
jne 0x621bce
test dl, dl
je 0x621be8
xor ebx, ebx
jmp 0x621bfd
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp + 0xc]
mov dword [eax], edx
mov dword [eax + 4], ecx
jmp 0x6215cb
mov bl, 1
mov eax, dword [ebp - 0x20]
mov byte [eax + 4], bl
mov dword [eax], 0
jmp 0x6215cb