Function at 0x40ce50
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x1c
push ebx
push esi
mov esi, dword [esp + 0x28]
push edi
mov edi, dword [esp + 0x30]
mov al, byte [esi + 1]
mov cl, byte [esi + 2]
mov byte [esp + 0x24], al
mov al, byte [esi + 3]
mov dl, byte [esi]
mov bl, byte [esi + 4]
mov byte [esp + 0x10], al
mov al, byte [esi + 6]
mov byte [esp + 0xc], cl
mov cl, byte [esi + 5]
mov byte [esp + 0x18], al
xor eax, eax
mov al, byte [edi]
mov byte [esp + 0x14], cl
mov cl, byte [esi + 7]
mov esi, eax
cmp esi, 0xd
jbe 0x40ce99
mov esi, 0xd
mov eax, esi
shl eax, 4
xor cl, byte [edi + eax + 8]
lea eax, [edi + eax + 8]
dec eax
mov edi, esi
mov byte [esp + 0x30], cl
mov cl, byte [eax]
sub byte [esp + 0x18], cl
mov cl, byte [eax - 1]
sub byte [esp + 0x14], cl
dec eax
dec eax
mov cl, byte [eax]
xor bl, cl
mov cl, byte [eax - 1]
xor byte [esp + 0x10], cl
dec eax
dec eax
mov cl, byte [eax]
sub byte [esp + 0xc], cl
mov cl, byte [esp + 0x24]
sub cl, byte [eax - 1]
dec eax
dec eax
mov byte [esp + 0x24], cl
xor dl, byte [eax]
dec esi
test edi, edi
je 0x40d109
inc esi
mov cl, byte [esp + 0x24]
mov byte [esp + 0x1c], cl
mov cl, byte [esp + 0xc]
mov byte [esp + 0xc], bl
mov bl, byte [esp + 0x14]
mov byte [esp + 0x2c], bl
mov bl, byte [esp + 0x10]
mov byte [esp + 0x14], bl
mov bl, byte [esp + 0x18]
mov byte [esp + 0x10], bl
mov bl, byte [esp + 0x1c]
sub dl, bl
sub bl, dl
mov byte [esp + 0x20], dl
mov dl, byte [esp + 0x14]
mov byte [esp + 0x1c], bl
mov bl, byte [esp + 0xc]
sub cl, dl
sub dl, cl
mov byte [esp + 0x14], dl
mov dl, byte [esp + 0x2c]
sub bl, dl
sub dl, bl
mov byte [esp + 0xc], bl
mov bl, byte [esp + 0x30]
mov byte [esp + 0x18], dl
mov dl, byte [esp + 0x10]
sub dl, bl
sub bl, dl
mov byte [esp + 0x10], dl
mov dl, byte [esp + 0xc]
mov byte [esp + 0x30], bl
mov bl, byte [esp + 0x20]
sub bl, dl
sub dl, bl
mov byte [esp + 0x20], bl
mov bl, byte [esp + 0x18]
mov byte [esp + 0xc], dl
mov dl, byte [esp + 0x1c]
sub dl, bl
mov byte [esp + 0x1c], dl
sub bl, dl
mov dl, byte [esp + 0x10]
mov byte [esp + 0x18], bl
mov bl, byte [esp + 0x30]
sub cl, dl
sub dl, cl
mov byte [esp + 0x10], dl
mov dl, byte [esp + 0x14]
sub dl, bl
mov byte [esp + 0x14], dl
sub bl, dl
mov dl, byte [esp + 0x20]
mov byte [esp + 0x30], bl
mov bl, byte [esp + 0xc]
sub dl, cl
mov byte [esp + 0x20], dl
mov dl, byte [esp + 0x10]
sub bl, dl
mov dl, byte [esp + 0x14]
mov byte [esp + 0xc], bl
mov bl, byte [esp + 0x1c]
sub bl, dl
mov dl, byte [esp + 0x18]
mov byte [esp + 0x1c], bl
mov bl, byte [esp + 0x30]
sub dl, bl
mov bl, byte [eax - 1]
dec eax
mov byte [esp + 0x18], dl
add bl, dl
mov dl, byte [esp + 0x30]
sub dl, bl
mov bl, byte [esp + 0x18]
dec eax
mov byte [esp + 0x30], dl
mov dl, byte [eax]
xor bl, dl
mov dl, byte [esp + 0x14]
mov byte [esp + 0x18], bl
dec eax
mov bl, byte [esp + 0x1c]
sub dl, bl
xor dl, byte [eax]
dec eax
mov byte [esp + 0x14], dl
mov dl, byte [eax]
sub bl, dl
mov dl, byte [eax - 1]
dec eax
mov byte [esp + 0x1c], bl
mov bl, byte [esp + 0xc]
add dl, bl
mov bl, byte [esp + 0x10]
sub bl, dl
mov dl, byte [eax - 1]
dec eax
mov byte [esp + 0x10], bl
mov bl, byte [esp + 0xc]
xor bl, dl
mov dl, byte [esp + 0x20]
dec eax
mov byte [esp + 0xc], bl
sub cl, dl
mov bl, byte [eax]
xor cl, bl
mov bl, byte [eax - 1]
dec eax
mov byte [esp + 0x24], cl
mov ecx, dword [esp + 0x30]
sub dl, bl
mov bl, byte [eax - 1]
and ecx, 0xff
dec eax
mov byte [esp + 0x20], dl
mov dl, byte [ecx + 0x438798]
mov ecx, dword [esp + 0x18]
xor dl, bl
mov bl, byte [eax - 1]
and ecx, 0xff
dec eax
mov byte [esp + 0x30], dl
mov dl, byte [ecx + 0x438898]
mov ecx, dword [esp + 0x14]
sub dl, bl
and ecx, 0xff
dec eax
mov byte [esp + 0x18], dl
mov dl, byte [ecx + 0x438898]
mov cl, byte [eax]
sub dl, cl
mov ecx, dword [esp + 0x1c]
dec eax
and ecx, 0xff
mov byte [esp + 0x14], dl
mov bl, byte [ecx + 0x438798]
mov dl, byte [eax]
xor bl, dl
mov edx, dword [esp + 0x10]
and edx, 0xff
dec eax
mov cl, byte [edx + 0x438798]
mov dl, byte [eax]
xor cl, dl
mov edx, dword [esp + 0xc]
and edx, 0xff
dec eax
mov byte [esp + 0x10], cl
mov cl, byte [edx + 0x438898]
mov dl, byte [eax]
sub cl, dl
mov edx, dword [esp + 0x24]
and edx, 0xff
dec eax
mov byte [esp + 0xc], cl
mov cl, byte [edx + 0x438898]
mov dl, byte [eax]
sub cl, dl
mov edx, dword [esp + 0x20]
dec eax
mov byte [esp + 0x24], cl
and edx, 0xff
mov dl, byte [edx + 0x438798]
xor dl, byte [eax]
dec esi
jne 0x40cee8
mov eax, dword [esp + 0x34]
pop edi
pop esi
mov byte [eax + 1], cl
mov cl, byte [esp + 4]
mov byte [eax], dl
mov dl, byte [esp + 8]
mov byte [eax + 2], cl
mov cl, byte [esp + 0xc]
mov byte [eax + 3], dl
mov dl, byte [esp + 0x10]
mov byte [eax + 5], cl
mov cl, byte [esp + 0x28]
mov byte [eax + 4], bl
mov byte [eax + 6], dl
mov byte [eax + 7], cl
pop ebx
add esp, 0x1c
ret