Function at 0x10014b5c
Capabilities:
Encode data using xor

Disassembly:
push ebp
lea ebp, [esp - 0x68]
sub esp, 0xe0
push ebx
mov ebx, dword [ebp + 0x78]
push esi
shr ebx, 3
cmp byte [ebp + 0x7c], 0
push edi
je 0x10014b85
lea ebx, [ebx*8 + 0x10]
lea eax, [ebx - 8]
mov dword [ebp + 0x50], eax
jmp 0x10014b8f
lea ebx, [ebx*8 - 8]
mov dword [ebp + 0x50], ebx
mov esi, dword [ebp + 0x70]
cmp dword [esi + 0x14], ebx
jae 0x10014bb0
call fcn.1001474f
lea eax, [ebx + 1]
push eax
call sub.MSVCRT.dll_malloc
mov dword [esi + 0x10], eax
mov byte [eax + ebx], 0
pop ecx
mov dword [esi + 0x14], ebx
lea eax, [ebp - 0x78]
push eax
push esi
mov dword [esi + 0x18], ebx
call fcn.10014a0d
lea eax, [ebp - 0x18]
push eax
lea eax, [esi + 8]
push eax
call fcn.10014a0d
cmp byte [ebp + 0x7c], 0
mov edi, dword [esi + 0x10]
je 0x10014c33
xor esi, esi
call sub.MSVCRT.dll_rand
sar eax, 4
and eax, 0x800000ff
jns 0x10014beb
dec eax
or eax, 0xffffff00
inc eax
mov byte [ebp + esi + 0x54], al
inc esi
cmp esi, 8
jb 0x10014bd5
xor eax, eax
cmp byte [ebp + 0x7c], 1
sete al
and dword [ebp + 0x64], 0
mov esi, eax
mov eax, dword [ebp + 0x64]
and eax, 1
imul eax, eax, 0x60
push esi
push edi
lea ecx, [ebp + 0x54]
lea eax, [ebp + eax - 0x78]
push ecx
call fcn.1001492d
xor eax, eax
test esi, esi
sete al
inc dword [ebp + 0x64]
cmp dword [ebp + 0x64], 3
mov esi, eax
jb 0x10014c04
add edi, 8
jmp 0x10014c3b
add dword [ebp + 0x74], 8
sub dword [ebp + 0x78], 8
mov eax, dword [ebp + 0x78]
and dword [ebp + 0x78], 0
cmp dword [ebp + 0x50], 0
mov dword [ebp + 0x5c], eax
jbe 0x10014d6c
xor ecx, ecx
cmp byte [ebp + 0x7c], 1
mov esi, edi
sete cl
mov dword [ebp + 0x48], ecx
mov ecx, dword [ebp + 0x74]
sub ecx, edi
mov dword [ebp + 0x4c], ecx
jmp 0x10014c6d
mov eax, dword [ebp + 0x5c]
mov ecx, dword [ebp + 0x4c]
test eax, eax
push 8
jne 0x10014c80
lea eax, [ebp + 0x54]
push 8
push eax
call sub.MSVCRT.dll_memset
jmp 0x10014cbb
pop edx
cmp eax, edx
jae 0x10014cae
mov ecx, edx
sub ecx, eax
push ecx
sub edx, eax
push edx
lea eax, [ebp + eax + 0x54]
push eax
call sub.MSVCRT.dll_memset
push dword [ebp + 0x5c]
mov eax, dword [ebp + 0x4c]
add eax, esi
push eax
lea eax, [ebp + 0x54]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0x18
jmp 0x10014cbe
push edx
add ecx, esi
push ecx
lea eax, [ebp + 0x54]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
cmp byte [ebp + 0x7c], 0
je 0x10014ce8
mov eax, dword [ebp + 0x78]
lea eax, [eax + edi - 8]
mov dword [ebp + 0x64], eax
lea eax, [ebp + 0x54]
xor ecx, ecx
sub dword [ebp + 0x64], eax
mov edx, dword [ebp + 0x64]
lea eax, [ebp + ecx + 0x54]
mov dl, byte [edx + eax]
xor byte [eax], dl
inc ecx
cmp ecx, 8
jb 0x10014cd6
mov eax, dword [ebp + 0x48]
and dword [ebp + 0x64], 0
mov dword [ebp + 0x60], eax
mov eax, dword [ebp + 0x64]
push dword [ebp + 0x60]
and eax, 1
imul eax, eax, 0x60
push esi
lea ecx, [ebp + 0x54]
lea eax, [ebp + eax - 0x78]
push ecx
call fcn.1001492d
xor eax, eax
cmp dword [ebp + 0x60], eax
push 8
sete al
push esi
mov dword [ebp + 0x60], eax
lea eax, [ebp + 0x54]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
inc dword [ebp + 0x64]
cmp dword [ebp + 0x64], 3
jb 0x10014cf2
cmp byte [ebp + 0x7c], 0
jne 0x10014d55
mov eax, dword [ebp + 0x74]
mov ecx, dword [ebp + 0x78]
lea ecx, [ecx + eax - 8]
mov eax, esi
sub ecx, esi
mov dword [ebp + 0x60], 8
mov dl, byte [ecx + eax]
xor byte [eax], dl
inc eax
dec dword [ebp + 0x60]
jne 0x10014d4a
add dword [ebp + 0x78], 8
mov eax, dword [ebp + 0x78]
sub dword [ebp + 0x5c], 8
add esi, 8
cmp eax, dword [ebp + 0x50]
jb 0x10014c67
cmp byte [ebp + 0x7c], 0
jne 0x10014dab
mov cl, byte [edi + ebx - 1]
cmp cl, 8
ja 0x10014dab
movzx esi, cl
mov edx, ebx
lea eax, [ebx - 2]
sub edx, esi
jmp 0x10014d8d
cmp byte [eax + edi], cl
jne 0x10014dab
dec eax
cmp eax, edx
ja 0x10014d87
test cl, cl
je 0x10014dab
push esi
sub edi, esi
push 0
add edi, ebx
push edi
call sub.MSVCRT.dll_memset
mov eax, dword [ebp + 0x70]
add esp, 0xc
sub dword [eax + 0x18], esi
pop edi
pop esi
mov al, 1
pop ebx
add ebp, 0x68
leave
ret 0x10