Function at 0x40fc84
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
sub esp, 0x24
push ebx
push esi
push edi
test ecx, ecx
je 0x40fef8
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x40fef8
cmp byte [ebx], 1
je 0x40fef8
mov eax, dword [ebp + 0x14]
shl eax, 3
cdq
and edx, 0x7f
add eax, edx
mov esi, eax
movzx eax, byte [ecx]
sar esi, 7
dec eax
mov dword [ebp + 0x14], esi
je 0x40fecc
dec eax
je 0x40fe67
dec eax
jne 0x40fef8
mov eax, dword [ecx + 1]
mov dword [ebp - 0x14], eax
mov eax, dword [ecx + 5]
mov dword [ebp - 0x10], eax
mov eax, dword [ecx + 9]
mov dword [ebp - 0xc], eax
mov eax, dword [ecx + 0xd]
mov dword [ebp - 8], eax
mov dword [ebp + 8], esi
test esi, esi
jle 0x40fef1
lea edi, [ebx + 0x2a]
xor esi, esi
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x10]
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
lea eax, [ebp - 0x24]
push edi
push eax
push eax
call fcn.0040f3fb
mov ecx, dword [ebp + 0x18]
mov eax, esi
cdq
and edx, 7
add eax, edx
mov dl, byte [ebp - 0x24]
and dl, 0x80
sar eax, 3
add eax, ecx
mov ebx, esi
and ebx, 7
mov cl, bl
shr dl, cl
mov cl, byte [ebp - 0x13]
shr cl, 7
add esp, 0xc
xor byte [eax], dl
mov dl, byte [ebp - 0x14]
add dl, dl
or cl, dl
mov dl, byte [ebp - 0x13]
mov byte [ebp - 0x14], cl
mov cl, byte [ebp - 0x12]
shr cl, 7
add dl, dl
or cl, dl
mov dl, byte [ebp - 0x12]
mov byte [ebp - 0x13], cl
mov cl, byte [ebp - 0x11]
shr cl, 7
add dl, dl
or cl, dl
mov dl, byte [ebp - 0x11]
mov byte [ebp - 0x12], cl
mov cl, byte [ebp - 0x10]
shr cl, 7
add dl, dl
or cl, dl
mov dl, byte [ebp - 0x10]
mov byte [ebp - 0x11], cl
mov cl, byte [ebp - 0xf]
shr cl, 7
add dl, dl
or cl, dl
mov dl, byte [ebp - 0xf]
mov byte [ebp - 0x10], cl
mov cl, byte [ebp - 0xe]
mov al, byte [eax]
shr cl, 7
add dl, dl
or cl, dl
mov dl, byte [ebp - 0xe]
mov byte [ebp - 0xf], cl
mov cl, byte [ebp - 0xd]
shr cl, 7
add dl, dl
or cl, dl
mov dl, byte [ebp - 0xd]
mov byte [ebp - 0xe], cl
mov cl, byte [ebp - 0xc]
shr cl, 7
add dl, dl
or cl, dl
mov dl, byte [ebp - 0xc]
mov byte [ebp - 0xd], cl
mov cl, byte [ebp - 0xb]
shr cl, 7
add dl, dl
or cl, dl
mov dl, byte [ebp - 0xb]
mov byte [ebp - 0xc], cl
mov cl, byte [ebp - 0xa]
shr cl, 7
add dl, dl
or cl, dl
mov dl, byte [ebp - 0xa]
mov byte [ebp - 0xb], cl
mov cl, byte [ebp - 9]
shr cl, 7
add dl, dl
or cl, dl
mov dl, byte [ebp - 9]
mov byte [ebp - 0xa], cl
mov cl, byte [ebp - 8]
shr cl, 7
add dl, dl
or cl, dl
mov dl, byte [ebp - 8]
mov byte [ebp - 9], cl
mov cl, byte [ebp - 7]
shr cl, 7
add dl, dl
or cl, dl
mov dl, byte [ebp - 7]
mov byte [ebp - 8], cl
mov cl, byte [ebp - 6]
shr cl, 7
add dl, dl
or cl, dl
mov dl, byte [ebp - 6]
mov byte [ebp - 7], cl
mov cl, byte [ebp - 5]
shr cl, 7
add dl, dl
or cl, dl
mov byte [ebp - 6], cl
mov cl, 7
sub cl, bl
shr al, cl
mov cl, byte [ebp - 5]
add cl, cl
and al, 1
or al, cl
inc esi
cmp esi, 0x80
mov byte [ebp - 5], al
jl 0x40fd00
dec dword [ebp + 8]
cmp dword [ebp + 8], 0
jg 0x40fcfe
jmp 0x40fec7
mov ebx, dword [ecx + 1]
mov edi, dword [ecx + 5]
mov eax, dword [ecx + 9]
mov ecx, dword [ecx + 0xd]
mov dword [ebp + 8], esi
test esi, esi
jle 0x40fef1
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
add edx, 0x2a
mov dword [ebp - 4], edx
jmp 0x40fe8e
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
xor eax, dword [esi + 8]
push dword [ebp - 4]
xor ebx, dword [esi]
xor edi, dword [esi + 4]
xor ecx, dword [esi + 0xc]
push dword [ebp + 0x18]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x18], ecx
call fcn.0040f3fb
add dword [ebp + 0x18], 0x10
add esp, 0xc
add esi, 0x10
dec dword [ebp + 8]
cmp dword [ebp + 8], 0
jg 0x40fe88
mov esi, dword [ebp + 0x14]
jmp 0x40fef1
mov edi, esi
test esi, esi
jle 0x40fef1
add ebx, 0x2a
push ebx
push dword [ebp + 0x18]
push dword [ebp + 0x10]
call fcn.0040f3fb
add dword [ebp + 0x10], 0x10
add dword [ebp + 0x18], 0x10
add esp, 0xc
dec edi
test edi, edi
jg 0x40fed5
mov eax, esi
shl eax, 7
jmp 0x40fefb
push 0xfffffffffffffffb
pop eax
pop edi
pop esi
pop ebx
leave
ret