Function at 0x480320
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xc
mov ebp, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
lea ecx, [ebp + 3]
mov eax, edx
and ecx, 0xfffffffc
mov esi, ecx
sub esi, ebp
sub eax, esi
jb 0x480348
cmp eax, 4
jae 0x480404
xor ebx, ebx
test edx, edx
je 0x4806dc
cmp edx, 8
mov esi, 0
jb 0x4803eb
movdqa xmm2, xmmword [0x57f270]
movdqa xmm3, xmmword [0x577b80]
mov esi, edx
lea eax, [ebp + 4]
pxor xmm0, xmm0
pxor xmm1, xmm1
and esi, 0xfffffff8
mov edi, esi
nop word cs:[eax + eax]
nop dword [eax]
movd xmm5, dword [eax - 4]
movd xmm4, dword [eax]
add eax, 8
add edi, 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 0x480390
paddd xmm1, xmm0
cmp esi, edx
pshufd xmm0, xmm1, 0xee
paddd xmm0, xmm1
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd ebx, xmm1
je 0x4806dc
sub edx, esi
add ebp, esi
nop
xor eax, eax
cmp byte [ebp], 0xc0
setge al
inc ebp
add ebx, eax
dec edx
jne 0x4803f0
jmp 0x4806dc
mov edx, eax
mov dword [esp], esi
xor edi, edi
mov esi, 0
and edx, 3
cmp ecx, ebp
mov dword [esp + 4], edx
je 0x48043e
mov ebx, ebp
xor esi, esi
sub ebx, ecx
mov ecx, ebp
nop word cs:[eax + eax]
nop dword [eax]
xor edx, edx
cmp byte [ecx], 0xc0
setge dl
inc ecx
add esi, edx
inc ebx
jne 0x480430
mov edx, dword [esp + 4]
add ebp, dword [esp]
mov ebx, esi
test edx, edx
je 0x48046e
mov esi, eax
xor edi, edi
and esi, 0xfffffffc
add esi, ebp
nop word cs:[eax + eax]
nop
xor ecx, ecx
cmp byte [esi], 0xc0
setge cl
inc esi
add edi, ecx
dec edx
jne 0x480460
movdqa xmm2, xmmword [0x57f260]
add edi, ebx
shr eax, 2
pcmpeqd xmm7, xmm7
jmp 0x4804c5
mov eax, esi
shr esi, 8
mov ecx, dword [esp + 4]
and eax, 0xff00ff
and esi, 0xff00ff
add esi, eax
mov edi, esi
shl edi, 0x10
mov eax, ecx
add edi, esi
mov esi, ebp
lea ebp, [ebp + edx*4]
sub eax, edx
shr edi, 0x10
add edi, ebx
test dl, 3
jne 0x480672
mov ebx, edi
test eax, eax
je 0x4806dc
cmp eax, 0xc0
mov edx, 0xc0
mov dword [esp + 4], eax
cmovb edx, eax
xor esi, esi
cmp edx, 4
jb 0x480490
mov ecx, edx
xor esi, esi
mov edi, ebp
shr ecx, 2
lea eax, [ecx - 1]
and eax, 0xfffffff
cmp eax, 3
jb 0x480624
inc eax
mov esi, ebp
pxor xmm3, xmm3
mov dword [esp], eax
and eax, 0xfffffffc
mov edi, eax
mov dword [esp + 8], eax
shl edi, 4
add edi, ebp
mov ebp, eax
mov eax, esi
nop dword [eax]
movdqu xmm2, xmmword [esi]
movdqu xmm1, xmmword [esi + 0x20]
movdqu xmm4, xmmword [esi + 0x10]
movdqu xmm7, xmmword [esi + 0x30]
add esi, 0x40
add ebp, 0xfffffffc
movdqa xmm5, xmm2
movdqa xmm0, xmm1
punpckhdq xmm1, xmm7
punpckhdq xmm2, xmm4
punpckldq xmm5, xmm4
punpckldq xmm0, xmm7
pcmpeqd xmm7, xmm7
movdqa xmm4, xmm2
punpckhqdq xmm2, xmm1
movdqa xmm6, xmm5
punpckhqdq xmm5, xmm0
punpcklqdq xmm4, xmm1
movdqa xmm1, xmmword [0x57f260]
punpcklqdq xmm6, xmm0
movdqa xmm0, xmm6
psrld xmm6, 6
pxor xmm0, xmm7
psrld xmm0, 7
por xmm6, xmm0
movdqa xmm0, xmm5
psrld xmm5, 6
pxor xmm0, xmm7
pand xmm6, xmm1
psrld xmm0, 7
paddd xmm6, xmm3
movdqa xmm3, xmm2
psrld xmm2, 6
por xmm5, xmm0
movdqa xmm0, xmm4
pxor xmm3, xmm7
psrld xmm4, 6
pxor xmm0, xmm7
psrld xmm3, 7
pand xmm5, xmm1
psrld xmm0, 7
por xmm2, xmm3
por xmm4, xmm0
pand xmm2, xmm1
pand xmm4, xmm1
movdqa xmm3, xmm2
paddd xmm4, xmm5
paddd xmm4, xmm6
paddd xmm3, xmm4
jne 0x480520
mov ebp, dword [esp + 8]
pshufd xmm0, xmm3, 0xee
movdqa xmm2, xmmword [0x57f260]
paddd xmm0, xmm3
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
cmp dword [esp], ebp
movd esi, xmm1
mov ebp, eax
je 0x480490
shl ecx, 4
add ecx, ebp
nop dword [eax]
movdqu xmm0, xmmword [edi]
add edi, 0x10
movdqa xmm1, xmm0
psrld xmm0, 6
pxor xmm1, xmm7
psrld xmm1, 7
por xmm0, xmm1
pand xmm0, xmm2
pshufd xmm1, xmm0, 0xee
paddd xmm1, xmm0
pshufd xmm0, xmm1, 0x55
paddd xmm0, xmm1
movd eax, xmm0
add esi, eax
cmp edi, ecx
jne 0x480630
jmp 0x480490
and edx, 0xfc
cmp ecx, 0xc0
lea eax, [esi + edx*4]
mov esi, 0xc0
cmovb esi, ecx
xor ecx, ecx
and esi, 3
shl esi, 2
nop word cs:[eax + eax]
nop dword [eax + eax]
mov edx, dword [eax]
add eax, 4
mov ebx, edx
shr edx, 6
not ebx
shr ebx, 7
or edx, ebx
and edx, 0x1010101
add ecx, edx
add esi, 0xfffffffc
jne 0x4806a0
mov eax, ecx
shr ecx, 8
and eax, 0xff00ff
and ecx, 0xff00ff
add ecx, eax
mov ebx, ecx
shl ebx, 0x10
add ebx, ecx
shr ebx, 0x10
add ebx, edi
mov eax, ebx
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret