Function at 0x40ff00
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x14]
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
shl eax, 3
push edi
test esi, esi
je 0x4101ab
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x4101ab
mov bl, byte [esi]
cmp bl, 3
je 0x40ff35
cmp byte [ecx], 0
je 0x4101ab
cdq
and edx, 0x7f
add eax, edx
mov edi, eax
movzx eax, bl
sar edi, 7
dec eax
mov dword [ebp + 0x14], edi
je 0x410184
dec eax
je 0x4100f7
dec eax
jne 0x4101ab
mov eax, dword [esi + 1]
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 5]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 9]
mov dword [ebp - 8], eax
mov eax, dword [esi + 0xd]
mov dword [ebp - 4], eax
mov dword [ebp + 0x14], edi
test edi, edi
jle 0x41017d
add ecx, 0x2a
mov dword [ebp + 8], ecx
xor esi, esi
mov eax, dword [ebp - 0x10]
push dword [ebp + 8]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x20]
push eax
push eax
call fcn.0040f3fb
mov al, byte [ebp - 0xf]
mov cl, byte [ebp - 0x10]
shr al, 7
add cl, cl
or al, cl
mov cl, byte [ebp - 0xf]
mov byte [ebp - 0x10], al
mov al, byte [ebp - 0xe]
shr al, 7
add cl, cl
or al, cl
mov cl, byte [ebp - 0xe]
mov byte [ebp - 0xf], al
mov al, byte [ebp - 0xd]
shr al, 7
add cl, cl
or al, cl
mov cl, byte [ebp - 0xd]
mov byte [ebp - 0xe], al
mov al, byte [ebp - 0xc]
shr al, 7
add cl, cl
or al, cl
mov cl, byte [ebp - 0xc]
mov byte [ebp - 0xd], al
mov al, byte [ebp - 0xb]
shr al, 7
add cl, cl
or al, cl
mov cl, byte [ebp - 0xb]
mov byte [ebp - 0xc], al
mov al, byte [ebp - 0xa]
shr al, 7
add cl, cl
or al, cl
mov cl, byte [ebp - 0xa]
mov byte [ebp - 0xb], al
mov al, byte [ebp - 9]
shr al, 7
add cl, cl
or al, cl
mov cl, byte [ebp - 9]
mov byte [ebp - 0xa], al
mov al, byte [ebp - 8]
shr al, 7
add cl, cl
or al, cl
mov cl, byte [ebp - 8]
mov byte [ebp - 9], al
mov al, byte [ebp - 7]
shr al, 7
add cl, cl
or al, cl
mov cl, byte [ebp - 7]
mov byte [ebp - 8], al
mov al, byte [ebp - 6]
shr al, 7
add cl, cl
or al, cl
mov cl, byte [ebp - 6]
mov byte [ebp - 7], al
mov al, byte [ebp - 5]
shr al, 7
add cl, cl
add esp, 0xc
or al, cl
mov byte [ebp - 6], al
mov al, byte [ebp - 4]
mov cl, byte [ebp - 5]
shr al, 7
add cl, cl
or al, cl
mov cl, byte [ebp - 4]
mov byte [ebp - 5], al
mov al, byte [ebp - 3]
shr al, 7
add cl, cl
or al, cl
mov cl, byte [ebp - 3]
mov byte [ebp - 4], al
mov al, byte [ebp - 2]
shr al, 7
add cl, cl
or al, cl
mov cl, byte [ebp - 2]
mov byte [ebp - 3], al
mov al, byte [ebp - 1]
add cl, cl
shr al, 7
or al, cl
mov byte [ebp - 2], al
mov eax, esi
cdq
and edx, 7
add eax, edx
mov edx, dword [ebp + 0x10]
mov ebx, esi
and ebx, 7
sar eax, 3
mov dl, byte [eax + edx]
mov cl, 7
sub cl, bl
shr dl, cl
mov cl, byte [ebp - 1]
add cl, cl
and dl, 1
or dl, cl
mov ecx, dword [ebp + 0x18]
mov byte [ebp - 1], dl
mov dl, byte [ebp - 0x20]
add eax, ecx
and dl, 0x80
mov cl, bl
shr dl, cl
xor byte [eax], dl
inc esi
cmp esi, 0x80
jl 0x40ff86
dec dword [ebp + 0x14]
cmp dword [ebp + 0x14], 0
jg 0x40ff84
jmp 0x41017d
mov ebx, dword [ebp + 0x10]
lea eax, [ecx + 0x2a]
push eax
mov dword [ebp + 8], eax
lea eax, [ebp - 0x20]
push eax
push ebx
call fcn.0040f7bd
mov ecx, dword [esi + 1]
xor ecx, dword [ebp - 0x20]
mov eax, dword [ebp + 0x18]
mov dword [eax], ecx
mov ecx, dword [esi + 5]
xor ecx, dword [ebp - 0x1c]
add esp, 0xc
mov dword [eax + 4], ecx
mov ecx, dword [esi + 9]
xor ecx, dword [ebp - 0x18]
mov dword [eax + 8], ecx
mov ecx, dword [esi + 0xd]
xor ecx, dword [ebp - 0x14]
dec edi
mov dword [eax + 0xc], ecx
test edi, edi
jle 0x41017a
lea esi, [eax + 0x14]
push dword [ebp + 8]
lea eax, [ebp - 0x20]
push eax
push ebx
call fcn.0040f7bd
mov eax, dword [ebx - 0x10]
xor eax, dword [ebp - 0x20]
add esp, 0xc
mov dword [esi - 4], eax
mov eax, dword [ebx - 0xc]
xor eax, dword [ebp - 0x1c]
add ebx, 0x10
mov dword [esi], eax
mov eax, dword [ebx - 0x18]
xor eax, dword [ebp - 0x18]
add esi, 0x10
mov dword [esi - 0xc], eax
mov eax, dword [ebx - 0x14]
xor eax, dword [ebp - 0x14]
dec edi
mov dword [esi - 8], eax
test edi, edi
jg 0x41013c
mov edi, dword [ebp + 0x14]
mov eax, edi
shl eax, 7
jmp 0x4101ae
mov esi, edi
test edi, edi
jle 0x41017d
lea ebx, [ecx + 0x2a]
push ebx
push dword [ebp + 0x18]
push dword [ebp + 0x10]
call fcn.0040f7bd
add dword [ebp + 0x10], 0x10
add dword [ebp + 0x18], 0x10
add esp, 0xc
dec esi
test esi, esi
jg 0x41018d
jmp 0x41017d
push 0xfffffffffffffffb
pop eax
pop edi
pop esi
pop ebx
leave
ret