Function at 0x40c4e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
lea ebx, [edx + 3]
and ebx, 0xfffffffc
mov ebp, ebx
sub ebp, edx
cmp ebp, ecx
ja 0x40c536
cmp ebp, 4
ja 0x40c536
mov esi, ecx
sub esi, ebp
cmp esi, 4
jb 0x40c536
mov eax, esi
lea edi, [edx + ebp]
xor ecx, ecx
and eax, 3
cmp ebx, edx
mov ebx, edi
mov edi, 0
je 0x40c692
xor edi, edi
cmp ebp, 8
jae 0x40c5e6
mov ebp, edx
jmp 0x40c680
xor eax, eax
test ecx, ecx
je 0x40c8cf
cmp ecx, 8
mov esi, edx
jb 0x40c5cb
movdqa xmm2, xmmword [0x45d110]
movdqa xmm3, xmmword [0x45d120]
mov edi, ecx
lea eax, [edx + 4]
pxor xmm0, xmm0
pxor xmm1, xmm1
and edi, 0xfffffff8
lea esi, [edx + edi]
mov ebx, edi
movd xmm5, dword [eax - 4]
movd xmm4, dword [eax]
add eax, 8
add ebx, 0xfffffff8
pcmpgtb xmm5, xmm2
pcmpgtb xmm4, xmm2
punpcklbw xmm5, xmm5
punpcklwd xmm5, xmm5
pand xmm5, xmm3
paddd xmm0, xmm5
punpcklbw xmm4, xmm4
punpcklwd xmm4, xmm4
pand xmm4, xmm3
paddd xmm1, xmm4
jne 0x40c570
paddd xmm1, xmm0
cmp edi, ecx
pshufd xmm0, xmm1, 0xee
paddd xmm0, xmm1
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd eax, xmm1
je 0x40c8cf
add edx, ecx
nop dword [eax]
xor ecx, ecx
cmp byte [esi], 0xc0
lea esi, [esi + 1]
setge cl
add eax, ecx
cmp esi, edx
jne 0x40c5d0
jmp 0x40c8cf
movdqa xmm2, xmmword [0x45d110]
movdqa xmm3, xmmword [0x45d120]
mov dword [esp + 4], ebx
mov ebx, ebp
mov dword [esp + 8], ebp
pxor xmm0, xmm0
pxor xmm1, xmm1
and ebx, 0xfffffff8
lea ebp, [edx + ebx]
add edx, 4
mov dword [esp], ebx
nop word cs:[eax + eax]
nop
movd xmm5, dword [edx - 4]
movd xmm4, dword [edx]
add edx, 8
add ebx, 0xfffffff8
pcmpgtb xmm5, xmm2
pcmpgtb xmm4, xmm2
punpcklbw xmm5, xmm5
punpcklwd xmm5, xmm5
pand xmm5, xmm3
paddd xmm0, xmm5
punpcklbw xmm4, xmm4
punpcklwd xmm4, xmm4
pand xmm4, xmm3
paddd xmm1, xmm4
jne 0x40c620
mov edx, dword [esp]
paddd xmm1, xmm0
mov ebx, dword [esp + 4]
pshufd xmm0, xmm1, 0xee
paddd xmm0, xmm1
pshufd xmm1, xmm0, 0x55
cmp dword [esp + 8], edx
paddd xmm1, xmm0
movd edi, xmm1
je 0x40c692
xor edx, edx
cmp byte [ebp], 0xc0
lea ebp, [ebp + 1]
setge dl
add edi, edx
cmp ebp, ebx
jne 0x40c680
mov ebp, ebx
test eax, eax
je 0x40c6c0
mov edx, esi
xor ecx, ecx
and edx, 0xfffffffc
add edx, ebp
nop word cs:[eax + eax]
nop dword [eax + eax]
xor ebx, ebx
cmp byte [edx], 0xc0
lea edx, [edx + 1]
setge bl
add ecx, ebx
dec eax
jne 0x40c6b0
movdqa xmm0, xmmword [0x45d130]
add ecx, edi
shr esi, 2
pcmpeqd xmm1, xmm1
mov edx, ebp
jmp 0x40c718
xor esi, esi
mov ecx, esi
shr esi, 8
mov ebx, dword [esp + 8]
and ecx, 0xff00ff
and esi, 0xff00ff
add esi, ecx
mov ecx, esi
shl ecx, 0x10
lea edx, [ebx + edi*4]
add ecx, esi
mov esi, ebp
sub esi, edi
mov edi, dword [esp + 4]
shr ecx, 0x10
add ecx, eax
test edi, edi
jne 0x40c7ab
mov eax, ecx
test esi, esi
je 0x40c8cf
cmp esi, 0xc0
mov edi, 0xc0
mov ebp, esi
mov dword [esp + 8], edx
cmovb edi, esi
mov esi, edi
mov ecx, edi
and esi, 0xfc
and ecx, 3
test esi, esi
mov dword [esp + 4], ecx
mov dword [esp], esi
je 0x40c6e0
mov ecx, esi
xor esi, esi
mov ebx, edx
shr ecx, 2
shl ecx, 4
nop word [eax + eax]
test ebx, ebx
je 0x40c6e2
movdqu xmm2, xmmword [ebx]
add ebx, 0x10
movdqa xmm3, xmm2
psrld xmm2, 6
pxor xmm3, xmm1
psrld xmm3, 7
por xmm2, xmm3
pand xmm2, xmm0
pshufd xmm3, xmm2, 0xee
paddd xmm3, xmm2
pshufd xmm2, xmm3, 0x55
paddd xmm2, xmm3
movd edx, xmm2
add esi, edx
add ecx, 0xfffffff0
jne 0x40c760
jmp 0x40c6e2
test ebx, ebx
je 0x40c8af
mov eax, dword [esp]
lea esi, [edi - 1]
xor edx, edx
and esi, 0x3fffffff
cmp esi, 7
lea eax, [ebx + eax*4]
mov dword [esp], eax
jb 0x40c881
inc esi
mov eax, dword [esp]
mov edx, 0xc0
pxor xmm1, xmm1
pcmpeqd xmm3, xmm3
pxor xmm2, xmm2
mov dword [esp + 0xc], esi
and esi, 0xfffffff8
cmp ebp, 0xc0
cmovb edx, ebp
and edx, 0xfc
lea edx, [ebx + edx*4 + 0x10]
lea eax, [eax + esi*4]
mov ebx, esi
nop word cs:[eax + eax]
nop
movdqu xmm5, xmmword [edx - 0x10]
movdqu xmm4, xmmword [edx]
add edx, 0x20
add ebx, 0xfffffff8
movdqa xmm6, xmm5
movdqa xmm7, xmm4
psrld xmm5, 6
psrld xmm4, 6
pxor xmm6, xmm3
pxor xmm7, xmm3
psrld xmm6, 7
psrld xmm7, 7
por xmm5, xmm6
por xmm4, xmm7
pand xmm5, xmm0
pand xmm4, xmm0
paddd xmm1, xmm5
paddd xmm2, xmm4
jne 0x40c810
paddd xmm2, xmm1
cmp dword [esp + 0xc], esi
mov edi, dword [esp + 4]
pshufd xmm0, xmm2, 0xee
paddd xmm0, xmm2
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd edx, xmm1
je 0x40c8b1
mov esi, dword [esp]
lea esi, [esi + edi*4]
nop word [eax + eax]
mov edi, dword [eax]
add eax, 4
mov ebx, edi
shr edi, 6
not ebx
shr ebx, 7
or edi, ebx
and edi, 0x1010101
add edx, edi
cmp eax, esi
jne 0x40c890
jmp 0x40c8b1
xor edx, edx
mov eax, edx
shr edx, 8
and eax, 0xff00ff
and edx, 0xff00ff
add edx, eax
mov eax, edx
shl eax, 0x10
add eax, edx
shr eax, 0x10
add eax, ecx
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret