Function at 0x402c90
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x84
lea edi, [ecx + 3]
mov ebx, edx
xor edx, edx
mov esi, 0
and edi, 0xfffffffc
mov eax, edi
sub eax, ecx
sub ebx, eax
mov dword [esp], ebx
and ebx, 3
cmp edi, ecx
je 0x402cce
mov ebp, ecx
xor esi, esi
sub ebp, edi
nop
xor eax, eax
cmp byte [ecx], 0xc0
setge al
inc ecx
add esi, eax
inc ebp
jne 0x402cc0
mov ebp, dword [esp]
test ebx, ebx
je 0x402cee
mov ecx, ebp
xor edx, edx
and ecx, 0xfffffffc
add ecx, edi
nop
xor eax, eax
cmp byte [ecx], 0xc0
setge al
inc ecx
add edx, eax
dec ebx
jne 0x402ce0
movdqa xmm3, xmmword [0x493360]
add edx, esi
shr ebp, 2
pcmpeqd xmm2, xmm2
jmp 0x402d48
xor ebx, ebx
mov edx, ebx
shr ebx, 8
mov ecx, dword [esp + 0x10]
mov ebp, dword [esp]
and edx, 0xff00ff
and ebx, 0xff00ff
add ebx, edx
mov edx, ebx
shl edx, 0x10
lea edi, [esi + ecx*4]
sub ebp, ecx
and ecx, 3
add edx, ebx
shr edx, 0x10
add edx, eax
test ecx, ecx
jne 0x403093
mov eax, edx
test ebp, ebp
je 0x4030dd
cmp ebp, 0xc0
mov ecx, 0xc0
mov esi, edi
mov dword [esp], ebp
cmovb ecx, ebp
mov edx, ecx
mov dword [esp + 0x10], ecx
and edx, 0xfc
mov dword [esp + 0xc], edx
je 0x402d10
shr ecx, 2
xor ebx, ebx
mov ebp, esi
lea edx, [ecx - 1]
and edx, 0xfffffff
cmp edx, 7
jb 0x403046
inc edx
lea edi, [esi + 0x40]
xorps xmm6, xmm6
xorps xmm7, xmm7
mov dword [esp + 8], edx
and edx, 0xfffffff8
mov ebp, edx
mov dword [esp + 4], edx
shl ebp, 4
nop word [eax + eax]
movdqu xmm0, xmmword [edi - 0x40]
movdqu xmm1, xmmword [edi - 0x20]
movdqu xmm3, xmmword [edi - 0x10]
movups xmmword [esp + 0x74], xmm6
movdqu xmm6, xmmword [edi - 0x30]
movups xmmword [esp + 0x64], xmm7
movdqu xmm5, xmmword [edi + 0x30]
movdqu xmm7, xmmword [edi]
movdqa xmm2, xmm0
movdqa xmm4, xmm0
movdqa xmm0, xmm1
movdqu xmmword [esp + 0x24], xmm3
movdqu xmmword [esp + 0x14], xmm6
movdqu xmmword [esp + 0x44], xmm1
movdqu xmmword [esp + 0x34], xmm5
punpckldq xmm0, xmm3
pshufd xmm3, xmm4, 0x55
punpckldq xmm2, xmm6
movdqa xmm1, xmm4
movdqa xmm4, xmm7
pblendw xmm3, xmm6, 0xc
movdqu xmm6, xmmword [edi + 0x10]
punpcklqdq xmm2, xmm0
pblendw xmm3, xmm0, 0xf0
movdqu xmmword [esp + 0x54], xmm3
movdqu xmm3, xmmword [edi + 0x20]
sub edi, 0xffffff80
add edx, 0xfffffff8
punpckldq xmm4, xmm6
movdqa xmm0, xmm3
punpckldq xmm0, xmm5
pshufd xmm5, xmm7, 0x55
punpckhdq xmm7, xmm6
pblendw xmm5, xmm6, 0xc
punpcklqdq xmm4, xmm0
movdqu xmm6, xmmword [esp + 0x24]
pblendw xmm5, xmm0, 0xf0
movdqu xmm0, xmmword [esp + 0x14]
punpckhdq xmm1, xmm0
movdqu xmm0, xmmword [esp + 0x24]
movdqu xmmword [esp + 0x14], xmm1
movdqu xmm1, xmmword [esp + 0x44]
pshufd xmm0, xmm0, 0xaa
pblendw xmm0, xmm1, 0x3f
punpckhdq xmm1, xmm6
movdqa xmm6, xmm1
movdqu xmm1, xmmword [esp + 0x14]
pblendw xmm0, xmm1, 0xf
punpckhqdq xmm1, xmm6
movdqa xmm6, xmmword [0x493360]
movdqu xmmword [esp + 0x14], xmm1
movdqu xmm1, xmmword [esp + 0x34]
movdqu xmmword [esp + 0x24], xmm0
pshufd xmm0, xmm1, 0xaa
pblendw xmm0, xmm3, 0x3f
punpckhdq xmm3, xmm1
movdqa xmm1, xmm2
psrld xmm2, 6
pblendw xmm0, xmm7, 0xf
punpckhqdq xmm7, xmm3
pcmpeqd xmm3, xmm3
pxor xmm1, xmm3
psrld xmm1, 7
por xmm2, xmm1
movdqa xmm1, xmm4
psrld xmm4, 6
pxor xmm1, xmm3
pand xmm2, xmm6
psrld xmm1, 7
por xmm4, xmm1
movdqu xmm1, xmmword [esp + 0x74]
pand xmm4, xmm6
movdqu xmm6, xmmword [esp + 0x54]
paddd xmm2, xmm1
movdqu xmm1, xmmword [esp + 0x64]
paddd xmm4, xmm1
movdqa xmm1, xmm6
psrld xmm6, 6
pxor xmm1, xmm3
psrld xmm1, 7
por xmm6, xmm1
movdqa xmm1, xmm5
psrld xmm5, 6
pxor xmm1, xmm3
movdqa xmm3, xmm6
movdqu xmm6, xmmword [esp + 0x14]
psrld xmm1, 7
por xmm5, xmm1
movdqa xmm1, xmmword [0x493360]
pand xmm5, xmm1
pand xmm3, xmm1
paddd xmm5, xmm4
movdqu xmm4, xmmword [esp + 0x24]
paddd xmm3, xmm2
movdqa xmm2, xmm3
movdqa xmm3, xmm5
pcmpeqd xmm5, xmm5
movdqa xmm1, xmm4
psrld xmm4, 6
pxor xmm1, xmm5
psrld xmm1, 7
por xmm4, xmm1
movdqa xmm1, xmm0
psrld xmm0, 6
pxor xmm1, xmm5
psrld xmm1, 7
por xmm0, xmm1
movdqa xmm1, xmm6
psrld xmm6, 6
pxor xmm1, xmm5
psrld xmm1, 7
por xmm6, xmm1
movdqa xmm1, xmm7
psrld xmm7, 6
pxor xmm1, xmm5
movdqa xmm5, xmmword [0x493360]
psrld xmm1, 7
por xmm7, xmm1
pand xmm4, xmm5
pand xmm6, xmm5
pand xmm0, xmm5
pand xmm7, xmm5
paddd xmm6, xmm4
paddd xmm7, xmm0
paddd xmm6, xmm2
paddd xmm7, xmm3
jne 0x402db0
mov edx, dword [esp + 4]
paddd xmm7, xmm6
movdqa xmm3, xmmword [0x493360]
pshufd xmm0, xmm7, 0xee
paddd xmm0, xmm7
pshufd xmm1, xmm0, 0x55
cmp dword [esp + 8], edx
paddd xmm1, xmm0
movd ebx, xmm1
jne 0x403040
pcmpeqd xmm2, xmm2
jmp 0x402d12
add ebp, esi
pcmpeqd xmm2, xmm2
shl ecx, 4
add ecx, esi
nop dword [eax + eax]
movdqu xmm0, xmmword [ebp]
add ebp, 0x10
movdqa xmm1, xmm0
psrld xmm0, 6
pxor xmm1, xmm2
psrld xmm1, 7
por xmm0, xmm1
pand xmm0, xmm3
pshufd xmm1, xmm0, 0xee
paddd xmm1, xmm0
pshufd xmm0, xmm1, 0x55
paddd xmm0, xmm1
movd edx, xmm0
add ebx, edx
cmp ebp, ecx
jne 0x403050
jmp 0x402d12
mov eax, dword [esp + 0xc]
shl ecx, 2
xor ebx, ebx
lea eax, [esi + eax*4]
nop
mov esi, dword [eax]
add eax, 4
mov edi, esi
shr esi, 6
not edi
shr edi, 7
or esi, edi
and esi, 0x1010101
add ebx, esi
add ecx, 0xfffffffc
jne 0x4030a0
mov ecx, ebx
shr ebx, 8
and ecx, 0xff00ff
and ebx, 0xff00ff
add ebx, ecx
mov eax, ebx
shl eax, 0x10
add eax, ebx
shr eax, 0x10
add eax, edx
add esp, 0x84
pop esi
pop edi
pop ebx
pop ebp
ret