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

Disassembly:
push ebp
xor eax, eax
push edi
push esi
push ebx
sub esp, 0x14
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
test edx, edx
je 0x408321
mov eax, dword [esp + 0x28]
test ecx, ecx
mov dword [esp + 0x10], 1
not eax
jne 0x4080be
jmp 0x40831f
movzx ebx, byte [edx]
add edx, 1
xor ebx, eax
movzx ebx, bl
shr eax, 8
xor eax, dword [ebx*4 + 0x4145e0]
sub ecx, 1
je 0x40831f
test dl, 3
jne 0x4080a0
cmp ecx, 0x1f
jbe 0x4082a3
mov ebx, ecx
mov esi, edx
mov dword [esp], edx
xor eax, dword [esi]
mov edx, eax
movzx edi, al
shr edx, 0x10
movzx ebp, ah
mov edi, dword [edi*4 + 0x4151e0]
and edx, 0xff
shr eax, 0x18
xor edi, dword [eax*4 + 0x4145e0]
xor edi, dword [esi + 4]
xor edi, dword [ebp*4 + 0x414de0]
xor edi, dword [edx*4 + 0x4149e0]
mov eax, edi
mov ebp, edi
movzx edx, ah
and ebp, 0xff
shr eax, 0x10
mov ebp, dword [ebp*4 + 0x4151e0]
and eax, 0xff
shr edi, 0x18
xor ebp, dword [edi*4 + 0x4145e0]
xor ebp, dword [esi + 8]
xor ebp, dword [edx*4 + 0x414de0]
xor ebp, dword [eax*4 + 0x4149e0]
mov eax, ebp
mov edi, ebp
movzx edx, ah
and edi, 0xff
shr eax, 0x10
mov edi, dword [edi*4 + 0x4151e0]
and eax, 0xff
shr ebp, 0x18
xor edi, dword [ebp*4 + 0x4145e0]
xor edi, dword [esi + 0xc]
xor edi, dword [edx*4 + 0x414de0]
xor edi, dword [eax*4 + 0x4149e0]
mov eax, edi
mov ebp, edi
movzx edx, ah
and ebp, 0xff
shr eax, 0x10
mov ebp, dword [ebp*4 + 0x4151e0]
and eax, 0xff
shr edi, 0x18
xor ebp, dword [edi*4 + 0x4145e0]
xor ebp, dword [esi + 0x10]
xor ebp, dword [edx*4 + 0x414de0]
xor ebp, dword [eax*4 + 0x4149e0]
mov eax, ebp
mov edi, ebp
movzx edx, ah
shr eax, 0x10
and edi, 0xff
and eax, 0xff
mov edi, dword [edi*4 + 0x4151e0]
sub ebx, 0x20
shr ebp, 0x18
xor edi, dword [ebp*4 + 0x4145e0]
xor edi, dword [esi + 0x14]
xor edi, dword [edx*4 + 0x414de0]
xor edi, dword [eax*4 + 0x4149e0]
mov eax, edi
mov ebp, edi
movzx edx, ah
and ebp, 0xff
shr eax, 0x10
mov ebp, dword [ebp*4 + 0x4151e0]
and eax, 0xff
shr edi, 0x18
xor ebp, dword [edi*4 + 0x4145e0]
xor ebp, dword [esi + 0x18]
xor ebp, dword [edx*4 + 0x414de0]
xor ebp, dword [eax*4 + 0x4149e0]
mov eax, ebp
mov edx, ebp
movzx edi, ah
and edx, 0xff
shr eax, 0x10
mov edx, dword [edx*4 + 0x4151e0]
and eax, 0xff
shr ebp, 0x18
xor edx, dword [ebp*4 + 0x4145e0]
xor edx, dword [esi + 0x1c]
add esi, 0x20
xor edx, dword [edi*4 + 0x414de0]
xor edx, dword [eax*4 + 0x4149e0]
mov edi, edx
mov eax, edx
shr edi, 0x10
movzx ebp, dl
shr eax, 0x18
and edi, 0xff
mov eax, dword [eax*4 + 0x4145e0]
movzx edx, dh
xor eax, dword [ebp*4 + 0x4151e0]
xor eax, dword [edx*4 + 0x414de0]
xor eax, dword [edi*4 + 0x4149e0]
cmp ebx, 0x1f
ja 0x4080d3
mov edx, dword [esp]
lea ebx, [ecx - 0x20]
and ecx, 0x1f
and ebx, 0xffffffe0
lea edx, [edx + ebx + 0x20]
cmp ecx, 3
jbe 0x408301
mov edi, ecx
mov esi, edx
mov dword [esp], edx
nop
mov edx, dword [esi]
sub edi, 4
add esi, 4
xor edx, eax
mov ebx, edx
mov eax, edx
shr ebx, 0x10
movzx ebp, dl
shr eax, 0x18
and ebx, 0xff
mov eax, dword [eax*4 + 0x4145e0]
movzx edx, dh
xor eax, dword [ebp*4 + 0x4151e0]
xor eax, dword [edx*4 + 0x414de0]
xor eax, dword [ebx*4 + 0x4149e0]
cmp edi, 3
ja 0x4082b0
mov edx, dword [esp]
lea ebx, [ecx - 4]
and ecx, 3
shr ebx, 2
lea edx, [edx + ebx*4 + 4]
test ecx, ecx
je 0x40831f
movzx ebx, byte [edx]
add edx, 1
xor ebx, eax
movzx ebx, bl
shr eax, 8
xor eax, dword [ebx*4 + 0x4145e0]
sub ecx, 1
jne 0x408305
not eax
add esp, 0x14
pop ebx
pop esi
pop edi
pop ebp
ret