Function at 0x402c40
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x94
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 0x402c7e
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 0x402c70
mov ebp, dword [esp]
test ebx, ebx
je 0x402c9e
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 0x402c90
movdqa xmm3, xmmword [0x4181e0]
add edx, esi
shr ebp, 2
pcmpeqd xmm2, xmm2
jmp 0x402cf8
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 0x403013
mov eax, edx
test ebp, ebp
je 0x40305d
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 0x402cc0
shr ecx, 2
xor ebx, ebx
mov ebp, esi
lea edx, [ecx - 1]
and edx, 0xfffffff
cmp edx, 7
jb 0x402fbf
inc edx
lea edi, [esi + 0x40]
xorps xmm0, xmm0
pxor xmm2, xmm2
mov dword [esp + 8], edx
and edx, 0xfffffff8
mov ebp, edx
mov dword [esp + 4], edx
shl ebp, 4
nop dword [eax + eax]
movdqu xmm5, xmmword [edi - 0x20]
movdqu xmmword [esp + 0x74], xmm2
movdqu xmm1, xmmword [edi - 0x40]
movdqu xmm2, xmmword [edi - 0x10]
movdqu xmm3, xmmword [edi - 0x30]
movups xmmword [esp + 0x84], xmm0
movdqu xmm7, xmmword [edi + 0x10]
movdqu xmm4, xmmword [edi + 0x30]
movdqa xmm0, xmm5
movdqu xmmword [esp + 0x14], xmm2
movdqu xmmword [esp + 0x54], xmm3
movdqu xmmword [esp + 0x34], xmm1
movdqu xmmword [esp + 0x44], xmm7
punpckldq xmm0, xmm2
movdqa xmm2, xmm1
movdqu xmm1, xmmword [edi + 0x20]
punpckldq xmm2, xmm3
movdqu xmm3, xmmword [edi]
sub edi, 0xffffff80
add edx, 0xfffffff8
movdqa xmm6, xmm2
punpckhqdq xmm2, xmm0
movdqu xmmword [esp + 0x64], xmm2
punpcklqdq xmm6, xmm0
movdqa xmm0, xmm1
punpckhdq xmm1, xmm4
movdqa xmm2, xmm3
punpckldq xmm0, xmm4
movdqu xmm4, xmmword [esp + 0x44]
punpckldq xmm2, xmm7
movdqa xmm7, xmm2
punpckhqdq xmm2, xmm0
punpcklqdq xmm7, xmm0
movdqu xmm0, xmmword [esp + 0x14]
movdqu xmmword [esp + 0x24], xmm7
movdqu xmm7, xmmword [esp + 0x54]
punpckhdq xmm3, xmm4
punpckhdq xmm5, xmm0
movdqu xmm0, xmmword [esp + 0x34]
punpckhdq xmm0, xmm7
movdqu xmm7, xmmword [esp + 0x64]
movdqa xmm4, xmm0
punpckhqdq xmm0, xmm5
punpcklqdq xmm4, xmm5
movdqa xmm5, xmm3
punpckhqdq xmm3, xmm1
movdqu xmmword [esp + 0x34], xmm0
movdqa xmm0, xmm6
psrld xmm6, 6
movdqu xmmword [esp + 0x14], xmm3
movdqu xmm3, xmmword [esp + 0x24]
punpcklqdq xmm5, xmm1
pcmpeqd xmm1, xmm1
pxor xmm0, xmm1
psrld xmm0, 7
por xmm6, xmm0
movdqa xmm0, xmm3
psrld xmm3, 6
pxor xmm0, xmm1
movdqa xmm1, xmmword [0x4181e0]
psrld xmm0, 7
por xmm3, xmm0
movdqu xmm0, xmmword [esp + 0x84]
pand xmm6, xmm1
pand xmm3, xmm1
paddd xmm6, xmm0
movdqu xmm0, xmmword [esp + 0x74]
paddd xmm3, xmm0
movdqa xmm0, xmm7
psrld xmm7, 6
movdqu xmmword [esp + 0x24], xmm3
pcmpeqd xmm3, xmm3
pxor xmm0, xmm3
psrld xmm0, 7
por xmm7, xmm0
movdqa xmm0, xmm2
psrld xmm2, 6
pxor xmm0, xmm3
pand xmm7, xmm1
psrld xmm0, 7
por xmm2, xmm0
movdqa xmm0, xmm4
psrld xmm4, 6
pxor xmm0, xmm3
pand xmm2, xmm1
psrld xmm0, 7
por xmm4, xmm0
movdqa xmm0, xmm5
psrld xmm5, 6
pxor xmm0, xmm3
movdqu xmm3, xmmword [esp + 0x34]
pand xmm4, xmm1
psrld xmm0, 7
paddd xmm4, xmm7
por xmm5, xmm0
movdqu xmm0, xmmword [esp + 0x24]
paddd xmm4, xmm6
pcmpeqd xmm6, xmm6
pand xmm5, xmm1
paddd xmm5, xmm2
movdqu xmm2, xmmword [esp + 0x14]
paddd xmm5, xmm0
movdqa xmm0, xmm3
psrld xmm3, 6
pxor xmm0, xmm6
psrld xmm0, 7
por xmm3, xmm0
movdqa xmm0, xmm2
psrld xmm2, 6
pxor xmm0, xmm6
pand xmm3, xmm1
psrld xmm0, 7
por xmm2, xmm0
movdqa xmm0, xmm3
pand xmm2, xmm1
paddd xmm0, xmm4
paddd xmm2, xmm5
jne 0x402d60
mov edx, dword [esp + 4]
paddd xmm2, xmm0
movdqa xmm3, xmmword [0x4181e0]
pshufd xmm0, xmm2, 0xee
paddd xmm0, xmm2
pshufd xmm1, xmm0, 0x55
cmp dword [esp + 8], edx
paddd xmm1, xmm0
movd ebx, xmm1
jne 0x402fb9
pcmpeqd xmm2, xmm2
jmp 0x402cc2
add ebp, esi
pcmpeqd xmm2, xmm2
shl ecx, 4
add ecx, esi
nop word cs:[eax + eax]
nop
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 0x402fd0
jmp 0x402cc2
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 0x403020
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, 0x94
pop esi
pop edi
pop ebx
pop ebp
ret