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

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x408a52
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
test ecx, ecx
not eax
je 0x4087df
test bl, 3
je 0x4087f4
mov ecx, dword [esp + 0x1c]
jmp 0x4087c5
test bl, 3
je 0x4087f0
add ebx, 1
mov edx, eax
shr eax, 8
xor dl, byte [ebx - 1]
movzx edx, dl
xor eax, dword [edx*4 + 0x40e040]
sub ecx, 1
jne 0x4087c0
pop ebx
not eax
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x1c], ecx
cmp dword [esp + 0x1c], 0x1f
jbe 0x4089c9
mov esi, dword [esp + 0x1c]
mov ecx, ebx
mov dword [esp + 0x18], ebx
lea esi, [esi]
xor eax, dword [ecx]
mov ebp, eax
movzx edi, al
mov edx, eax
shr ebp, 0x18
mov edi, dword [edi*4 + 0x40ec40]
shr edx, 0x10
xor edi, dword [ebp*4 + 0x40e040]
movzx eax, ah
movzx edx, dl
xor edi, dword [ecx + 4]
xor edi, dword [eax*4 + 0x40e840]
mov eax, dword [edx*4 + 0x40e440]
xor eax, edi
mov edx, eax
mov ebp, eax
shr edx, 0x10
shr ebp, 0x18
movzx edi, dl
movzx edx, al
movzx eax, ah
mov edx, dword [edx*4 + 0x40ec40]
xor edx, dword [ebp*4 + 0x40e040]
xor edx, dword [ecx + 8]
xor edx, dword [eax*4 + 0x40e840]
xor edx, dword [edi*4 + 0x40e440]
mov eax, edx
mov ebp, edx
shr eax, 0x10
shr ebp, 0x18
movzx edi, al
movzx eax, dl
movzx edx, dh
mov eax, dword [eax*4 + 0x40ec40]
xor eax, dword [ebp*4 + 0x40e040]
xor eax, dword [ecx + 0xc]
xor eax, dword [edx*4 + 0x40e840]
xor eax, dword [edi*4 + 0x40e440]
mov edx, eax
mov ebp, eax
shr edx, 0x10
shr ebp, 0x18
movzx edi, dl
movzx edx, al
movzx eax, ah
mov edx, dword [edx*4 + 0x40ec40]
xor edx, dword [ebp*4 + 0x40e040]
xor edx, dword [ecx + 0x10]
xor edx, dword [eax*4 + 0x40e840]
xor edx, dword [edi*4 + 0x40e440]
mov eax, edx
mov ebp, edx
shr eax, 0x10
shr ebp, 0x18
movzx edi, al
movzx eax, dl
movzx edx, dh
mov eax, dword [eax*4 + 0x40ec40]
xor eax, dword [ebp*4 + 0x40e040]
xor eax, dword [ecx + 0x14]
xor eax, dword [edx*4 + 0x40e840]
xor eax, dword [edi*4 + 0x40e440]
mov ebp, eax
mov edx, eax
movzx edi, al
shr ebp, 0x18
shr edx, 0x10
mov edi, dword [edi*4 + 0x40ec40]
xor edi, dword [ebp*4 + 0x40e040]
movzx eax, ah
movzx edx, dl
xor edi, dword [ecx + 0x18]
mov ebx, dword [edx*4 + 0x40e440]
add ecx, 0x20
xor edi, dword [eax*4 + 0x40e840]
sub esi, 0x20
xor ebx, edi
mov ebp, ebx
movzx edx, bl
mov eax, ebx
shr ebp, 0x18
mov edx, dword [edx*4 + 0x40ec40]
shr eax, 0x10
xor edx, dword [ebp*4 + 0x40e040]
movzx edi, bh
movzx eax, al
xor edx, dword [ecx - 4]
xor edx, dword [edi*4 + 0x40e840]
xor edx, dword [eax*4 + 0x40e440]
mov eax, edx
movzx ebp, dl
shr eax, 0x10
movzx edi, al
mov eax, edx
movzx edx, dh
shr eax, 0x18
mov eax, dword [eax*4 + 0x40e040]
xor eax, dword [ebp*4 + 0x40ec40]
xor eax, dword [edx*4 + 0x40e840]
xor eax, dword [edi*4 + 0x40e440]
cmp esi, 0x1f
ja 0x408810
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
and dword [esp + 0x1c], 0x1f
lea edx, [esi - 0x20]
and edx, 0xffffffe0
lea ebx, [ebx + edx + 0x20]
cmp dword [esp + 0x1c], 3
jbe 0x408a59
mov esi, dword [esp + 0x1c]
lea edx, [esi - 4]
shr edx, 2
lea ecx, [ebx + edx*4 + 4]
add ebx, 4
xor eax, dword [ebx - 4]
mov edx, eax
mov esi, eax
shr edx, 0x10
shr esi, 0x18
movzx edi, dl
movzx edx, al
mov esi, dword [esi*4 + 0x40e040]
xor esi, dword [edx*4 + 0x40ec40]
movzx edx, ah
mov eax, dword [edx*4 + 0x40e840]
xor eax, esi
xor eax, dword [edi*4 + 0x40e440]
cmp ebx, ecx
jne 0x4089e2
and dword [esp + 0x1c], 3
mov edx, dword [esp + 0x1c]
test edx, edx
je 0x4087df
mov edx, dword [esp + 0x1c]
add edx, ecx
add ecx, 1
mov ebx, eax
shr eax, 8
xor bl, byte [ecx - 1]
movzx ebx, bl
xor eax, dword [ebx*4 + 0x40e040]
cmp ecx, edx
jne 0x408a34
jmp 0x4087df
pop ebx
xor eax, eax
pop esi
pop edi
pop ebp
ret
mov ecx, ebx
jmp 0x408a22