Function at 0x1014ba90
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x6b8
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x6cc]
push edi
call fcn.1012c000
add eax, 7
mov ebx, dword [esp + 0x6d4]
cdq
and edx, 7
add esp, 4
add eax, edx
sub ebx, 2
mov ebp, eax
mov ecx, dword [esp + 0x6dc]
sar ebp, 3
dec ebp
neg ebx
sbb ebx, ebx
and ebx, 0xfffffff4
add ebx, 0x20
lea eax, [ebx + ebx + 1]
cmp ecx, eax
jge 0x1014baea
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x6b8
ret
lea ecx, [ebp + ebp*2 + 3]
push 1
push ecx
call fcn.10159572
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
jne 0x1014bb11
pop edi
pop esi
pop ebp
mov eax, 0xfffffffe
pop ebx
add esp, 0x6b8
ret
mov edx, dword [esp + 0x6dc]
lea esi, [eax + ebp + 1]
mov eax, dword [esp + 0x6d8]
push edx
lea ecx, [esp + 0x3a4]
lea esi, [esi + ebp + 1]
push eax
push ecx
mov dword [esp + 0x20], esi
call fcn.1012bdb0
mov eax, dword [edi + 0x193c]
add esp, 0xc
test eax, eax
je 0x1014bb6e
cmp eax, 1
jne 0x1014bb56
mov eax, dword [edi + 0x161c]
test eax, eax
je 0x1014bb6e
lea edx, [esp + 0x3a0]
push edi
lea eax, [esp + 0x7c]
push edx
push eax
call fcn.1014a6c0
add esp, 0xc
jmp 0x1014bb8e
push edi
add edi, 0x650
lea ecx, [esp + 0x3a4]
push edi
lea edx, [esp + 0x80]
push ecx
push edx
call fcn.10130580
add esp, 0x10
lea eax, [esp + 0x78]
push eax
call fcn.1012c000
add eax, 7
add esp, 4
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, ebp
jle 0x1014bbc8
mov ecx, dword [esp + 0x10]
push ecx
call fcn.10158e44
add esp, 4
mov eax, 0xfffffffe
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6b8
ret
lea edx, [esp + 0x78]
push ebp
push edx
push esi
call fcn.1012bd20
mov ecx, ebx
lea edi, [esp + 0x24]
mov eax, ecx
mov edx, dword [esp + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x6e8]
lea esi, [edx + ebx]
sub ecx, ebx
mov edi, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x6dc]
mov esi, ebp
sub esi, ebx
push esi
push eax
lea eax, [esp + 0x6c]
push ebx
push eax
push ecx
call fcn.1014b8d0
add esp, 0x20
xor eax, eax
test ebx, ebx
jle 0x1014bc41
mov dl, byte [esp + eax + 0x58]
mov cl, byte [esp + eax + 0x18]
xor cl, dl
mov byte [esp + eax + 0x18], cl
inc eax
cmp eax, ebx
jl 0x1014bc2e
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x6d0]
lea eax, [esp + 0x18]
push ebx
push eax
lea edi, [ecx + ebp + 1]
push esi
push edi
push edx
call fcn.1014b8d0
add esp, 0x14
test esi, esi
jle 0x1014bc78
mov eax, dword [esp + 0x10]
sub edi, eax
mov cl, byte [edi + eax]
mov dl, byte [eax]
xor dl, cl
mov byte [eax], dl
inc eax
dec esi
jne 0x1014bc6b
mov eax, dword [esp + 0x6d0]
mov edx, dword [esp + 0x6e4]
cmp eax, 2
mov eax, dword [esp + 0x6e0]
push edx
lea ecx, [esp + 0x3c]
push eax
push ecx
jne 0x1014bca0
call fcn.1014d6b0
jmp 0x1014bca5
call fcn.10139070
mov edi, dword [esp + 0x1c]
add esp, 0xc
mov cl, byte [edi + ebx]
lea eax, [edi + ebx]
test cl, cl
jne 0x1014bcbe
mov cl, byte [eax + 1]
inc eax
test cl, cl
je 0x1014bcb6
cmp byte [eax], 1
jne 0x1014bd13
mov ecx, ebx
lea esi, [esp + 0x38]
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x1014bd0f
mov edx, dword [esp + 0x10]
inc eax
mov ecx, edx
mov edi, dword [esp + 0x6d4]
sub ecx, eax
mov esi, eax
sub ecx, ebx
push edx
add ecx, ebp
mov dword [esp + 0x18], ecx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.10158e44
mov eax, dword [esp + 0x18]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6b8
ret
mov edi, dword [esp + 0x10]
push edi
call fcn.10158e44
add esp, 4
mov eax, 0xfffffffd
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6b8
ret