Function at 0x1014bd30
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x6ac
mov eax, dword [esp + 0x6b0]
push ebx
push ebp
push esi
push edi
push eax
call fcn.1012c000
add esp, 4
dec eax
mov dword [esp + 0x24], eax
add eax, 7
cdq
mov ecx, dword [esp + 0x6cc]
and edx, 7
add eax, edx
mov ebp, dword [esp + 0x6d4]
mov ebx, eax
mov esi, dword [esp + 0x6d8]
sar ebx, 3
mov dword [ecx], ebx
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x2d]
mov byte [esp + 0x2c], 0
lea edx, [esi + ebp + 2]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp ebx, edx
stosb byte es:[edi], al
jge 0x1014bd9f
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x6ac
ret
lea eax, [ebx + ebx*2]
push 1
lea ecx, [eax + esi*2]
sub ecx, ebp
add ecx, 0xb
push ecx
call fcn.10159572
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x1014bdcd
pop edi
pop esi
pop ebp
mov eax, 0xfffffffe
pop ebx
add esp, 0x6ac
ret
lea edi, [eax + esi + 1]
mov dword [esp + 0x14], edi
lea ecx, [edi + ebp]
lea ecx, [ecx + esi + 9]
mov dword [esp + 0x20], ecx
sub ecx, ebp
mov dword [esp + 0x10], ecx
add ecx, ebx
mov dword [esp + 0x1c], ecx
sub ecx, ebp
add ecx, ebx
test esi, esi
mov dword [esp + 0x28], ecx
je 0x1014be02
push esi
push eax
call fcn.1012eb60
add esp, 8
mov esi, dword [esp + 0x6d0]
mov ecx, ebp
mov edx, ecx
add edi, 8
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x14]
mov ecx, edx
mov edx, dword [esp + 0x6d8]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x18]
add eax, ebp
mov ecx, edx
lea edi, [eax + 8]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x6c4]
and ecx, 3
cmp eax, 2
rep movsb byte es:[edi], byte [esi]
lea ecx, [edx + ebp + 8]
mov edx, dword [esp + 0x14]
push ecx
lea eax, [esp + 0x30]
push edx
push eax
jne 0x1014be62
call fcn.1014d6b0
jmp 0x1014be67
call fcn.10139070
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x6e4]
sub eax, ecx
mov esi, dword [esp + 0x24]
add eax, ebx
add esp, 0xc
lea edx, [eax - 2]
lea edi, [eax - 1]
mov eax, ecx
push ebp
shr ecx, 2
mov byte [edx], 1
mov edx, dword [esp + 0x20]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
lea ecx, [esp + 0x30]
sub edi, ebp
push ecx
lea eax, [edi - 1]
mov dword [esp + 0x18], eax
push eax
mov eax, dword [esp + 0x6d0]
push edx
push eax
call fcn.1014b8d0
mov esi, dword [esp + 0x34]
add esp, 0x14
test edi, edi
jle 0x1014bed4
mov ecx, dword [esp + 0x1c]
mov eax, esi
sub ecx, esi
mov dl, byte [ecx + eax]
xor byte [eax], dl
inc eax
dec edi
jne 0x1014becb
mov edi, dword [esp + 0x24]
lea ecx, [ebx*8]
sub ecx, edi
mov eax, 0xff
sar eax, cl
mov cl, byte [esi]
push ebx
and cl, al
mov eax, dword [esp + 0x2c]
mov byte [esi], cl
mov ecx, dword [esp + 0x14]
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, eax
and ecx, 3
sub edx, ebp
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
lea edi, [edx + ebx - 1]
mov edx, ecx
lea esi, [esp + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x70]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [eax + ebx - 1]
push edx
mov byte [ecx], 0xbc
call fcn.1012bdb0
mov ecx, dword [esp + 0x6cc]
add esp, 0xc
mov eax, dword [ecx + 0x193c]
test eax, eax
je 0x1014bf70
cmp eax, 1
jne 0x1014bf58
mov eax, dword [ecx + 0x161c]
test eax, eax
je 0x1014bf70
push ecx
lea eax, [esp + 0x70]
lea ecx, [esp + 0x398]
push eax
push ecx
call fcn.1014a6c0
add esp, 0xc
jmp 0x1014bf8d
push ecx
add ecx, 0x650
lea edx, [esp + 0x70]
push ecx
lea eax, [esp + 0x39c]
push edx
push eax
call fcn.10130580
add esp, 0x10
mov edx, dword [esp + 0x6c8]
lea ecx, [esp + 0x394]
push ebx
push ecx
push edx
call fcn.1012bd20
mov eax, dword [esp + 0x24]
push eax
call fcn.10158e44
add esp, 0x10
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6ac
ret