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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 8
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
test ebx, ebx
je 0x409303
mov eax, dword [esp + 0x1c]
test ebp, ebp
not eax
jne 0x40908e
jmp 0x4092f9
add ebx, 1
mov edx, eax
shr eax, 8
xor dl, byte [ebx - 1]
movzx edx, dl
xor eax, dword [edx*4 + 0x40e1a0]
sub ebp, 1
je 0x4092f9
test bl, 3
jne 0x409070
cmp ebp, 0x1f
mov dword [esp], ebx
jbe 0x409262
lea ecx, [ebp - 0x20]
mov esi, ebx
mov dword [esp + 0x20], ebx
mov edx, ecx
mov dword [esp], ecx
and edx, 0xffffffe0
lea ecx, [ebx + edx + 0x20]
xor eax, dword [esi]
mov edi, eax
movzx edx, al
mov ebx, eax
shr edi, 0x18
mov edx, dword [edx*4 + 0x40eda0]
shr ebx, 0x10
xor edx, dword [edi*4 + 0x40e1a0]
movzx eax, ah
movzx ebx, bl
xor edx, dword [esi + 4]
xor edx, dword [eax*4 + 0x40e9a0]
xor edx, dword [ebx*4 + 0x40e5a0]
mov edi, edx
movzx eax, dl
mov ebx, edx
shr edi, 0x18
mov eax, dword [eax*4 + 0x40eda0]
shr ebx, 0x10
xor eax, dword [edi*4 + 0x40e1a0]
movzx edx, dh
movzx ebx, bl
xor eax, dword [esi + 8]
xor eax, dword [edx*4 + 0x40e9a0]
xor eax, dword [ebx*4 + 0x40e5a0]
mov edi, eax
movzx edx, al
mov ebx, eax
shr edi, 0x18
mov edx, dword [edx*4 + 0x40eda0]
shr ebx, 0x10
xor edx, dword [edi*4 + 0x40e1a0]
movzx eax, ah
movzx ebx, bl
xor edx, dword [esi + 0xc]
xor edx, dword [eax*4 + 0x40e9a0]
xor edx, dword [ebx*4 + 0x40e5a0]
mov edi, edx
movzx eax, dl
mov ebx, edx
shr edi, 0x18
mov eax, dword [eax*4 + 0x40eda0]
shr ebx, 0x10
xor eax, dword [edi*4 + 0x40e1a0]
movzx edx, dh
movzx ebx, bl
xor eax, dword [esi + 0x10]
xor eax, dword [edx*4 + 0x40e9a0]
xor eax, dword [ebx*4 + 0x40e5a0]
mov edi, eax
movzx edx, al
mov ebx, eax
shr edi, 0x18
mov edx, dword [edx*4 + 0x40eda0]
shr ebx, 0x10
xor edx, dword [edi*4 + 0x40e1a0]
movzx eax, ah
movzx ebx, bl
xor edx, dword [esi + 0x14]
xor edx, dword [eax*4 + 0x40e9a0]
xor edx, dword [ebx*4 + 0x40e5a0]
mov ebx, edx
mov edi, edx
movzx eax, dl
shr ebx, 0x10
shr edi, 0x18
mov eax, dword [eax*4 + 0x40eda0]
xor eax, dword [edi*4 + 0x40e1a0]
movzx edx, dh
movzx ebx, bl
xor eax, dword [esi + 0x18]
add esi, 0x20
xor eax, dword [edx*4 + 0x40e9a0]
xor eax, dword [ebx*4 + 0x40e5a0]
mov edi, eax
movzx edx, al
mov ebx, eax
shr edi, 0x18
mov edx, dword [edx*4 + 0x40eda0]
shr ebx, 0x10
xor edx, dword [edi*4 + 0x40e1a0]
movzx eax, ah
movzx ebx, bl
xor edx, dword [esi - 4]
xor edx, dword [eax*4 + 0x40e9a0]
xor edx, dword [ebx*4 + 0x40e5a0]
mov edi, edx
mov ebx, edx
movzx eax, dl
shr edi, 0x18
shr ebx, 0x10
mov eax, dword [eax*4 + 0x40eda0]
movzx edx, dh
xor eax, dword [edi*4 + 0x40e1a0]
movzx ebx, bl
xor eax, dword [edx*4 + 0x40e9a0]
xor eax, dword [ebx*4 + 0x40e5a0]
cmp esi, ecx
jne 0x4090b4
mov edx, dword [esp]
mov ebx, dword [esp + 0x20]
and ebp, 0x1f
and edx, 0xffffffe0
lea ecx, [ebx + edx + 0x20]
mov dword [esp], ecx
cmp ebp, 3
jbe 0x4092cf
lea ecx, [ebp - 4]
mov edx, ecx
mov dword [esp + 4], ecx
mov ecx, dword [esp]
shr edx, 2
lea esi, [ecx + edx*4 + 4]
lea esi, [esi]
add ecx, 4
xor eax, dword [ecx - 4]
mov edx, eax
movzx edi, al
mov ebx, eax
shr edx, 0x18
mov edi, dword [edi*4 + 0x40eda0]
shr ebx, 0x10
xor edi, dword [edx*4 + 0x40e1a0]
movzx edx, ah
movzx ebx, bl
mov eax, dword [edx*4 + 0x40e9a0]
xor eax, edi
xor eax, dword [ebx*4 + 0x40e5a0]
cmp ecx, esi
jne 0x409280
mov edx, dword [esp + 4]
mov ecx, dword [esp]
and ebp, 3
and edx, 0xfffffffc
lea ecx, [ecx + edx + 4]
mov dword [esp], ecx
test ebp, ebp
je 0x4092f9
mov esi, dword [esp]
mov ecx, esi
add ecx, ebp
lea esi, [esi]
add esi, 1
mov edx, eax
shr eax, 8
xor dl, byte [esi - 1]
movzx edx, dl
xor eax, dword [edx*4 + 0x40e1a0]
cmp esi, ecx
jne 0x4092e0
add esp, 8
not eax
pop ebx
pop esi
pop edi
pop ebp
ret
add esp, 8
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret