Function at 0x40d2af
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 8], 0
push ebx
push esi
push edi
not eax
mov ecx, 0xff
je 0x40d2df
test dl, 3
je 0x40d2df
movzx ebx, byte [edx]
xor ebx, eax
and ebx, ecx
shr eax, 8
xor eax, dword [ebx*4 + 0x4169b0]
inc edx
dec dword [ebp + 8]
jne 0x40d2c3
cmp dword [ebp + 8], 0x20
push 4
mov esi, edx
pop edi
jb 0x40d48c
mov edx, dword [ebp + 8]
shr edx, 5
mov dword [ebp - 4], edx
xor eax, dword [esi]
add esi, edi
mov edx, eax
shr edx, 0x10
movzx ebx, ah
and edx, ecx
mov edx, dword [edx*4 + 0x416db0]
xor edx, dword [ebx*4 + 0x4171b0]
mov ebx, eax
and eax, ecx
shr ebx, 0x18
xor edx, dword [ebx*4 + 0x4169b0]
xor edx, dword [eax*4 + 0x4175b0]
xor edx, dword [esi]
add esi, edi
mov eax, edx
shr eax, 0x10
and eax, ecx
mov eax, dword [eax*4 + 0x416db0]
movzx ebx, dh
xor eax, dword [ebx*4 + 0x4171b0]
mov ebx, edx
and edx, ecx
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x4169b0]
xor eax, dword [edx*4 + 0x4175b0]
xor eax, dword [esi]
add esi, edi
mov edx, eax
shr edx, 0x10
movzx ebx, ah
and edx, ecx
mov edx, dword [edx*4 + 0x416db0]
xor edx, dword [ebx*4 + 0x4171b0]
mov ebx, eax
and eax, ecx
shr ebx, 0x18
xor edx, dword [ebx*4 + 0x4169b0]
xor edx, dword [eax*4 + 0x4175b0]
xor edx, dword [esi]
add esi, edi
mov eax, edx
shr eax, 0x10
and eax, ecx
mov eax, dword [eax*4 + 0x416db0]
movzx ebx, dh
xor eax, dword [ebx*4 + 0x4171b0]
mov ebx, edx
and edx, ecx
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x4169b0]
xor eax, dword [edx*4 + 0x4175b0]
xor eax, dword [esi]
add esi, edi
mov edx, eax
shr edx, 0x10
movzx ebx, ah
and edx, ecx
mov edx, dword [edx*4 + 0x416db0]
xor edx, dword [ebx*4 + 0x4171b0]
mov ebx, eax
and eax, ecx
shr ebx, 0x18
xor edx, dword [ebx*4 + 0x4169b0]
xor edx, dword [eax*4 + 0x4175b0]
xor edx, dword [esi]
add esi, edi
mov eax, edx
shr eax, 0x10
and eax, ecx
mov eax, dword [eax*4 + 0x416db0]
movzx ebx, dh
xor eax, dword [ebx*4 + 0x4171b0]
mov ebx, edx
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x4169b0]
and edx, ecx
xor eax, dword [edx*4 + 0x4175b0]
xor eax, dword [esi]
add esi, edi
mov edx, eax
shr edx, 0x10
movzx ebx, ah
and edx, ecx
mov edx, dword [edx*4 + 0x416db0]
xor edx, dword [ebx*4 + 0x4171b0]
mov ebx, eax
and eax, ecx
sub dword [ebp + 8], 0x20
shr ebx, 0x18
xor edx, dword [ebx*4 + 0x4169b0]
xor edx, dword [eax*4 + 0x4175b0]
xor edx, dword [esi]
add esi, edi
mov eax, edx
shr eax, 0x10
and eax, ecx
mov eax, dword [eax*4 + 0x416db0]
movzx ebx, dh
xor eax, dword [ebx*4 + 0x4171b0]
mov ebx, edx
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x4169b0]
and edx, ecx
xor eax, dword [edx*4 + 0x4175b0]
dec dword [ebp - 4]
jne 0x40d2f7
cmp dword [ebp + 8], edi
jb 0x40d4d5
mov edx, dword [ebp + 8]
shr edx, 2
mov dword [ebp - 4], edx
xor eax, dword [esi]
sub dword [ebp + 8], edi
mov edx, eax
shr edx, 0x10
and edx, ecx
mov edx, dword [edx*4 + 0x416db0]
movzx ebx, ah
xor edx, dword [ebx*4 + 0x4171b0]
mov ebx, eax
shr ebx, 0x18
xor edx, dword [ebx*4 + 0x4169b0]
and eax, ecx
xor edx, dword [eax*4 + 0x4175b0]
add esi, edi
dec dword [ebp - 4]
mov eax, edx
jne 0x40d49a
cmp dword [ebp + 8], 0
je 0x40d4f2
movzx edx, byte [esi]
xor edx, eax
and edx, ecx
shr eax, 8
xor eax, dword [edx*4 + 0x4169b0]
inc esi
dec dword [ebp + 8]
jne 0x40d4db
pop edi
pop esi
not eax
pop ebx
leave
ret