Function at 0x652040
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xc
mov ecx, dword [esp + 0x24]
xor eax, eax
test ecx, ecx
je 0x652038
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
not eax
test edx, edx
je 0x652036
nop word [eax + eax]
test cl, 3
je 0x651dd0
movzx esi, byte [ecx]
inc ecx
movzx edi, al
xor edi, esi
shr eax, 8
xor eax, dword [edi*4 + 0x7e40bc]
dec edx
jne 0x651db0
jmp 0x652036
cmp edx, 0x20
jb 0x651f99
lea edi, [edx - 0x20]
mov dword [esp + 8], edi
and edi, 0xffffffe0
lea esi, [edi + 0x20]
mov dword [esp + 4], esi
mov ebp, ecx
nop dword [eax]
xor eax, dword [ebp]
movzx esi, al
movzx ebx, ah
mov ebx, dword [ebx*4 + 0x7e48bc]
xor ebx, dword [esi*4 + 0x7e4cbc]
mov esi, eax
shr esi, 0xe
and esi, 0x3fc
xor ebx, dword [esi + 0x7e44bc]
shr eax, 0x18
xor ebx, dword [eax*4 + 0x7e40bc]
xor ebx, dword [ebp + 4]
movzx esi, bl
movzx eax, bh
mov eax, dword [eax*4 + 0x7e48bc]
xor eax, dword [esi*4 + 0x7e4cbc]
mov esi, ebx
shr esi, 0xe
and esi, 0x3fc
xor eax, dword [esi + 0x7e44bc]
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x7e40bc]
xor eax, dword [ebp + 8]
movzx esi, al
movzx ebx, ah
mov ebx, dword [ebx*4 + 0x7e48bc]
xor ebx, dword [esi*4 + 0x7e4cbc]
mov esi, eax
shr esi, 0xe
and esi, 0x3fc
xor ebx, dword [esi + 0x7e44bc]
shr eax, 0x18
xor ebx, dword [eax*4 + 0x7e40bc]
xor ebx, dword [ebp + 0xc]
movzx esi, bl
movzx eax, bh
mov eax, dword [eax*4 + 0x7e48bc]
xor eax, dword [esi*4 + 0x7e4cbc]
mov esi, ebx
shr esi, 0xe
and esi, 0x3fc
xor eax, dword [esi + 0x7e44bc]
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x7e40bc]
xor eax, dword [ebp + 0x10]
movzx esi, al
movzx ebx, ah
mov ebx, dword [ebx*4 + 0x7e48bc]
xor ebx, dword [esi*4 + 0x7e4cbc]
mov esi, eax
shr esi, 0xe
and esi, 0x3fc
xor ebx, dword [esi + 0x7e44bc]
shr eax, 0x18
xor ebx, dword [eax*4 + 0x7e40bc]
xor ebx, dword [ebp + 0x14]
movzx esi, bl
movzx eax, bh
mov eax, dword [eax*4 + 0x7e48bc]
xor eax, dword [esi*4 + 0x7e4cbc]
mov esi, ebx
shr esi, 0xe
and esi, 0x3fc
xor eax, dword [esi + 0x7e44bc]
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x7e40bc]
xor eax, dword [ebp + 0x18]
movzx esi, al
movzx ebx, ah
mov ebx, dword [ebx*4 + 0x7e48bc]
xor ebx, dword [esi*4 + 0x7e4cbc]
mov esi, eax
shr esi, 0xe
and esi, 0x3fc
xor ebx, dword [esi + 0x7e44bc]
shr eax, 0x18
xor ebx, dword [eax*4 + 0x7e40bc]
xor ebx, dword [ebp + 0x1c]
movzx esi, bl
movzx eax, bh
mov eax, dword [eax*4 + 0x7e48bc]
xor eax, dword [esi*4 + 0x7e4cbc]
mov esi, ebx
shr esi, 0xe
and esi, 0x3fc
xor eax, dword [esi + 0x7e44bc]
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x7e40bc]
add edx, 0xffffffe0
add ebp, 0x20
cmp edx, 0x1f
ja 0x651df0
add ecx, dword [esp + 4]
mov edx, dword [esp + 8]
sub edx, edi
cmp edx, 4
jb 0x65200d
lea esi, [edx - 4]
mov dword [esp + 8], esi
shr esi, 2
mov dword [esp + 4], esi
lea esi, [esi*4]
mov dword [esp], esi
mov ebp, ecx
nop dword [eax + eax]
xor eax, dword [ebp]
movzx ebx, al
movzx esi, ah
mov edi, eax
mov esi, dword [esi*4 + 0x7e48bc]
xor esi, dword [ebx*4 + 0x7e4cbc]
add ebp, 4
shr eax, 0xe
and eax, 0x3fc
xor esi, dword [eax + 0x7e44bc]
shr edi, 0x18
mov eax, esi
xor eax, dword [edi*4 + 0x7e40bc]
add edx, 0xfffffffc
cmp edx, 3
ja 0x651fc0
mov edx, dword [esp + 8]
sub edx, dword [esp]
mov esi, dword [esp + 4]
lea ecx, [ecx + esi*4 + 4]
test edx, edx
je 0x652036
nop word cs:[eax + eax]
movzx esi, byte [ecx]
inc ecx
movzx edi, al
xor edi, esi
shr eax, 8
xor eax, dword [edi*4 + 0x7e40bc]
dec edx
jne 0x652020
not eax
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret
jmp 0x651d80