Function at 0x41ad70
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x90
mov edx, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa8]
lea esi, [edx + 3]
and esi, 0xfffffffc
sub esi, edx
cmp esi, ecx
jbe 0x41ada6
test ecx, ecx
je 0x41adde
cmp ecx, 8
jae 0x41ade5
xor eax, eax
mov esi, edx
jmp 0x41ae6b
cmp esi, 4
ja 0x41ad94
mov eax, ecx
sub eax, esi
cmp eax, 4
jb 0x41ad94
mov dword [esp], eax
lea edi, [edx + esi]
and eax, 3
xor ebx, ebx
test esi, esi
mov ebp, 0
je 0x41af21
cmp esi, 8
jae 0x41ae86
xor ebp, ebp
mov ecx, edx
jmp 0x41af10
xor eax, eax
jmp 0x41b3db
movdqa xmm2, xmmword [0x4303a0]
movdqa xmm3, xmmword [0x4303b0]
mov edi, ecx
lea eax, [edx + 4]
pxor xmm0, xmm0
pxor xmm1, xmm1
and edi, 0xfffffff8
lea esi, [edx + edi]
mov ebx, edi
nop word [eax + eax]
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 0x41ae10
paddd xmm1, xmm0
cmp edi, ecx
pshufd xmm0, xmm1, 0xee
paddd xmm0, xmm1
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd eax, xmm1
je 0x41b3db
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 0x41ae70
jmp 0x41b3db
movdqa xmm2, xmmword [0x4303a0]
movdqa xmm3, xmmword [0x4303b0]
mov ebp, esi
pxor xmm0, xmm0
pxor xmm1, xmm1
and ebp, 0xfffffff8
lea ecx, [edx + ebp]
add edx, 4
mov dword [esp + 0x10], ebp
nop dword [eax]
movd xmm5, dword [edx - 4]
movd xmm4, dword [edx]
add edx, 8
add ebp, 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 0x41aeb0
paddd xmm1, xmm0
cmp esi, dword [esp + 0x10]
pshufd xmm0, xmm1, 0xee
paddd xmm0, xmm1
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd ebp, xmm1
je 0x41af21
nop dword [eax]
xor edx, edx
cmp byte [ecx], 0xc0
lea ecx, [ecx + 1]
setge dl
add ebp, edx
cmp ecx, edi
jne 0x41af10
test eax, eax
je 0x41af40
mov ecx, dword [esp]
xor ebx, ebx
and ecx, 0xfffffffc
add ecx, edi
nop
xor edx, edx
cmp byte [ecx], 0xc0
lea ecx, [ecx + 1]
setge dl
add ebx, edx
dec eax
jne 0x41af30
mov ecx, dword [esp]
movdqa xmm7, xmmword [0x4303c0]
add ebx, ebp
shr ecx, 2
jmp 0x41af9d
xor ecx, ecx
mov edx, ecx
shr ecx, 8
mov ebp, dword [esp + 0xc]
and edx, 0xff00ff
and ecx, 0xff00ff
add ecx, edx
mov edx, dword [esp + 8]
mov ebx, ecx
shl ebx, 0x10
add ebx, ecx
mov ecx, dword [esp]
shr ebx, 0x10
add ebx, eax
mov eax, dword [esp + 4]
sub ecx, ebp
test edx, edx
lea edi, [eax + ebp*4]
jne 0x41b2d8
mov eax, ebx
test ecx, ecx
je 0x41b3db
cmp ecx, 0xc0
mov ebp, 0xc0
mov esi, edi
mov dword [esp], ecx
cmovb ebp, ecx
mov dword [esp + 4], esi
mov edi, ebp
mov edx, ebp
mov dword [esp + 0xc], ebp
shr edi, 2
and edx, 3
mov ebx, edi
mov dword [esp + 8], edx
shl ebx, 4
je 0x41af60
dec edi
and edi, 0xfffffff
cmp edi, 7
jae 0x41aff0
xor ecx, ecx
mov ebp, esi
jmp 0x41b26a
inc edi
xorps xmm6, xmm6
pxor xmm5, xmm5
mov edx, edi
and edx, 0xfffffff8
mov ebp, edx
mov ecx, edx
shl ebp, 4
add ebp, esi
add esi, 0x40
nop dword [eax]
movdqu xmm1, xmmword [esi - 0x20]
movups xmmword [esp + 0x80], xmm6
movdqu xmm2, xmmword [esi - 0x10]
movdqu xmm6, xmmword [esi - 0x40]
movdqu xmm3, xmmword [esi - 0x30]
movdqu xmmword [esp + 0x70], xmm5
movdqu xmm5, xmmword [esi]
movdqu xmm4, xmmword [esi + 0x10]
movdqa xmm0, xmm1
movdqu xmmword [esp + 0x20], xmm2
movdqu xmmword [esp + 0x60], xmm3
movdqu xmmword [esp + 0x40], xmm4
punpckldq xmm0, xmm2
movdqa xmm2, xmm6
punpckldq xmm2, xmm3
movdqa xmm3, xmm2
punpckhqdq xmm2, xmm0
punpcklqdq xmm3, xmm0
movdqu xmm0, xmmword [esi + 0x20]
movdqu xmmword [esp + 0x10], xmm3
movdqu xmm3, xmmword [esi + 0x30]
sub esi, 0xffffff80
add ecx, 0xfffffff8
movdqa xmm7, xmm0
movdqu xmmword [esp + 0x50], xmm3
punpckldq xmm7, xmm3
movdqa xmm3, xmm5
punpckldq xmm3, xmm4
movdqa xmm4, xmm3
punpckhqdq xmm3, xmm7
punpcklqdq xmm4, xmm7
pcmpeqd xmm7, xmm7
movdqu xmmword [esp + 0x30], xmm4
movdqu xmm4, xmmword [esp + 0x20]
punpckhdq xmm1, xmm4
movdqu xmm4, xmmword [esp + 0x60]
punpckhdq xmm6, xmm4
movdqu xmm4, xmmword [esp + 0x50]
punpckhdq xmm0, xmm4
movdqu xmm4, xmmword [esp + 0x40]
punpckhdq xmm5, xmm4
movdqa xmm4, xmm6
punpckhqdq xmm6, xmm1
punpcklqdq xmm4, xmm1
movdqa xmm1, xmm5
punpckhqdq xmm5, xmm0
punpcklqdq xmm1, xmm0
movdqu xmm0, xmmword [esp + 0x10]
movdqu xmmword [esp + 0x20], xmm1
movdqa xmm1, xmm0
psrld xmm0, 6
pxor xmm1, xmm7
pcmpeqd xmm7, xmm7
psrld xmm1, 7
por xmm0, xmm1
movdqu xmm1, xmmword [esp + 0x30]
movdqu xmmword [esp + 0x10], xmm0
movdqa xmm0, xmm1
psrld xmm1, 6
pxor xmm0, xmm7
movdqu xmm7, xmmword [esp + 0x20]
psrld xmm0, 7
por xmm1, xmm0
movdqa xmm0, xmm2
psrld xmm2, 6
movdqu xmmword [esp + 0x30], xmm1
pcmpeqd xmm1, xmm1
pxor xmm0, xmm1
psrld xmm0, 7
por xmm2, xmm0
movdqa xmm0, xmm3
psrld xmm3, 6
pxor xmm0, xmm1
movdqa xmm1, xmmword [0x4303c0]
psrld xmm0, 7
por xmm3, xmm0
movdqu xmm0, xmmword [esp + 0x80]
pand xmm2, xmm1
pand xmm3, xmm1
pcmpeqd xmm1, xmm1
paddd xmm2, xmm0
movdqu xmm0, xmmword [esp + 0x70]
paddd xmm3, xmm0
movdqa xmm0, xmm4
psrld xmm4, 6
pxor xmm0, xmm1
psrld xmm0, 7
por xmm4, xmm0
movdqa xmm0, xmm7
psrld xmm7, 6
pxor xmm0, xmm1
pcmpeqd xmm1, xmm1
psrld xmm0, 7
por xmm7, xmm0
movdqa xmm0, xmmword [0x4303c0]
pand xmm4, xmm0
pand xmm7, xmm0
paddd xmm4, xmm2
movdqa xmm2, xmm0
movdqa xmm0, xmm6
psrld xmm6, 6
paddd xmm7, xmm3
movdqu xmm3, xmmword [esp + 0x10]
pxor xmm0, xmm1
psrld xmm0, 7
por xmm6, xmm0
movdqa xmm0, xmm5
psrld xmm5, 6
pxor xmm0, xmm1
movdqu xmm1, xmmword [esp + 0x30]
pand xmm6, xmm2
pand xmm3, xmm2
psrld xmm0, 7
paddd xmm6, xmm4
por xmm5, xmm0
paddd xmm6, xmm3
pand xmm5, xmm2
paddd xmm5, xmm7
pand xmm1, xmm2
paddd xmm5, xmm1
jne 0x41b010
paddd xmm5, xmm6
movdqa xmm7, xmm2
cmp edi, edx
pshufd xmm0, xmm5, 0xee
paddd xmm0, xmm5
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd ecx, xmm1
je 0x41af62
add ebx, dword [esp + 4]
nop
mov edi, dword [ebp]
mov esi, dword [ebp + 4]
mov edx, edi
shr edi, 6
not edx
shr edx, 7
or edi, edx
and edi, 0x1010101
add edi, ecx
mov ecx, esi
shr esi, 6
not ecx
shr ecx, 7
or esi, ecx
and esi, 0x1010101
add esi, edi
mov edi, dword [ebp + 8]
mov ecx, edi
shr edi, 6
not ecx
shr ecx, 7
or edi, ecx
mov ecx, dword [ebp + 0xc]
add ebp, 0x10
and edi, 0x1010101
add edi, esi
mov edx, ecx
shr ecx, 6
not edx
shr edx, 7
or ecx, edx
and ecx, 0x1010101
add ecx, edi
cmp ebp, ebx
jne 0x41b270
jmp 0x41af62
and ebp, 0xfc
lea esi, [edx - 1]
lea ecx, [eax + ebp*4]
and esi, 0x3fffffff
mov edi, ebp
xor ebp, ebp
cmp esi, 7
mov eax, ecx
jb 0x41b397
inc esi
mov dword [esp + 0x10], ecx
pxor xmm0, xmm0
pcmpeqd xmm2, xmm2
pxor xmm1, xmm1
mov edx, esi
and edx, 0xfffffff8
lea eax, [ecx + edx*4]
mov ecx, edx
mov edx, dword [esp + 4]
mov ebp, ecx
lea edx, [edx + edi*4 + 0x10]
nop
movdqu xmm4, xmmword [edx - 0x10]
movdqu xmm3, xmmword [edx]
add edx, 0x20
add ebp, 0xfffffff8
movdqa xmm5, xmm4
movdqa xmm6, xmm3
psrld xmm4, 6
psrld xmm3, 6
pxor xmm5, xmm2
pxor xmm6, xmm2
psrld xmm5, 7
psrld xmm6, 7
por xmm4, xmm5
por xmm3, xmm6
movdqa xmm5, xmm7
pand xmm4, xmm7
pand xmm3, xmm7
paddd xmm0, xmm4
paddd xmm1, xmm3
jne 0x41b320
paddd xmm1, xmm0
cmp esi, ecx
mov edx, dword [esp + 8]
mov ecx, dword [esp + 0x10]
pshufd xmm0, xmm1, 0xee
paddd xmm0, xmm1
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd ebp, xmm1
je 0x41b3bd
lea ecx, [ecx + edx*4]
nop word [eax + eax]
mov edx, dword [eax]
add eax, 4
mov esi, edx
shr edx, 6
not esi
shr esi, 7
or edx, esi
and edx, 0x1010101
add ebp, edx
cmp eax, ecx
jne 0x41b3a0
mov eax, ebp
shr ebp, 8
and eax, 0xff00ff
and ebp, 0xff00ff
add ebp, eax
mov eax, ebp
shl eax, 0x10
add eax, ebp
shr eax, 0x10
add eax, ebx
add esp, 0x90
pop esi
pop edi
pop ebx
pop ebp
ret