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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 8
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x40d5d2
mov eax, dword [ebp + 8]
not eax
cmp dword [ebp + 0x10], 0
je 0x40d3a5
test dl, 3
je 0x40d3a5
inc edx
mov cl, al
xor cl, byte [edx - 1]
shr eax, 8
dec dword [ebp + 0x10]
movzx ecx, cl
xor eax, dword [ecx*4 + 0x4176ec]
jmp 0x40d382
mov esi, dword [ebp + 0x10]
mov edi, edx
add esi, edx
mov dword [ebp - 0x10], esi
mov ecx, dword [ebp - 0x10]
sub ecx, edx
cmp ecx, 0x1f
jbe 0x40d54c
xor eax, dword [edx]
mov ecx, eax
movzx ebx, al
shr ecx, 0x10
movzx esi, ah
mov ebx, dword [ebx*4 + 0x4182ec]
shr eax, 0x18
movzx ecx, cl
xor ebx, dword [eax*4 + 0x4176ec]
xor ebx, dword [edx + 4]
xor ebx, dword [esi*4 + 0x417eec]
xor ebx, dword [ecx*4 + 0x417aec]
mov eax, ebx
movzx esi, bl
shr eax, 0x10
movzx ecx, bh
mov esi, dword [esi*4 + 0x4182ec]
shr ebx, 0x18
movzx eax, al
xor esi, dword [ebx*4 + 0x4176ec]
xor esi, dword [edx + 8]
xor esi, dword [ecx*4 + 0x417eec]
xor esi, dword [eax*4 + 0x417aec]
mov eax, esi
mov ebx, esi
movzx ecx, ah
movzx ebx, bl
shr eax, 0x10
mov ebx, dword [ebx*4 + 0x4182ec]
shr esi, 0x18
movzx eax, al
xor ebx, dword [esi*4 + 0x4176ec]
xor ebx, dword [edx + 0xc]
xor ebx, dword [ecx*4 + 0x417eec]
xor ebx, dword [eax*4 + 0x417aec]
mov eax, ebx
movzx esi, bl
shr eax, 0x10
movzx ecx, bh
mov esi, dword [esi*4 + 0x4182ec]
shr ebx, 0x18
movzx eax, al
xor esi, dword [ebx*4 + 0x4176ec]
xor esi, dword [edx + 0x10]
xor esi, dword [ecx*4 + 0x417eec]
xor esi, dword [eax*4 + 0x417aec]
mov eax, esi
mov ebx, esi
movzx ecx, ah
movzx ebx, bl
shr eax, 0x10
mov ebx, dword [ebx*4 + 0x4182ec]
shr esi, 0x18
movzx eax, al
xor ebx, dword [esi*4 + 0x4176ec]
xor ebx, dword [edx + 0x14]
xor ebx, dword [ecx*4 + 0x417eec]
xor ebx, dword [eax*4 + 0x417aec]
mov eax, ebx
movzx esi, bl
shr eax, 0x10
movzx ecx, bh
mov esi, dword [esi*4 + 0x4182ec]
movzx eax, al
shr ebx, 0x18
xor esi, dword [ebx*4 + 0x4176ec]
add edx, 0x20
xor esi, dword [edx - 8]
xor esi, dword [ecx*4 + 0x417eec]
xor esi, dword [eax*4 + 0x417aec]
mov eax, esi
mov ecx, esi
movzx ebx, ah
movzx ecx, cl
shr eax, 0x10
mov ecx, dword [ecx*4 + 0x4182ec]
movzx eax, al
shr esi, 0x18
xor ecx, dword [esi*4 + 0x4176ec]
xor ecx, dword [edx - 4]
xor ecx, dword [ebx*4 + 0x417eec]
xor ecx, dword [eax*4 + 0x417aec]
mov ebx, ecx
mov eax, ecx
shr ebx, 0x10
movzx esi, cl
shr eax, 0x18
movzx ebx, bl
mov eax, dword [eax*4 + 0x4176ec]
movzx ecx, ch
xor eax, dword [esi*4 + 0x4182ec]
xor eax, dword [ecx*4 + 0x417eec]
xor eax, dword [ebx*4 + 0x417aec]
jmp 0x40d3af
mov ebx, dword [ebp + 0x10]
and ebx, 0xffffffe0
add ebx, edi
mov edi, dword [ebp + 0x10]
mov edx, ebx
and edi, 0x1f
mov dword [ebp - 0x10], edi
add edi, ebx
mov dword [ebp - 0x14], edi
mov ecx, dword [ebp - 0x14]
sub ecx, edx
cmp ecx, 3
jbe 0x40d5a5
add edx, 4
xor eax, dword [edx - 4]
mov ecx, eax
shr eax, 0x10
movzx edi, cl
movzx esi, al
mov eax, ecx
shr eax, 0x18
movzx ecx, ch
mov eax, dword [eax*4 + 0x4176ec]
xor eax, dword [edi*4 + 0x4182ec]
xor eax, dword [ecx*4 + 0x417eec]
xor eax, dword [esi*4 + 0x417aec]
jmp 0x40d564
mov edx, dword [ebp - 0x10]
and edx, 0x1c
add ebx, edx
mov edx, dword [ebp + 0x10]
and edx, 3
je 0x40d5ce
add edx, ebx
inc ebx
mov cl, al
xor cl, byte [ebx - 1]
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x4176ec]
cmp ebx, edx
jne 0x40d5b7
not eax
jmp 0x40d5d4
xor eax, eax
pop edx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
ret