Function at 0x4ca5a4
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
and dword [ebp - 0x48], 0
push ebx
push edi
mov edi, dword [ebp + 0x14]
push edi
call fcn.00460b39
push edi
call fcn.00460a7c
push edi
mov dword [ebp - 0x14], eax
call fcn.00460a7c
push edi
mov dword [ebp - 0x18], eax
call fcn.00460a7c
push dword [ebp + 0x14]
mov edi, eax
mov dword [ebp - 0x28], edi
call fcn.00460a7c
mov ebx, eax
add esp, 0x14
mov dword [ebp - 0x10], ebx
test ebx, ebx
je 0x4ca8b4
push esi
mov esi, dword [ebp + 0x10]
push esi
push dword [ebp + 0xc]
push edi
call fcn.004ca14e
add esp, 0xc
test eax, eax
je 0x4ca8b3
push edi
call fcn.0045faee
pop ecx
test eax, eax
jne 0x4ca8b3
push esi
push ebx
call fcn.0045f94e
pop ecx
pop ecx
test eax, eax
je 0x4ca8b3
push edi
call fcn.0045fb93
push ebx
mov dword [ebp - 8], eax
call fcn.0045fb93
mov esi, dword [esi + 4]
push esi
push edi
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x40], esi
call fcn.00460230
add esp, 0x10
test eax, eax
je 0x4ca8b3
mov eax, dword [edi + 4]
mov ebx, dword [edi]
mov dword [ebp - 0x44], ebx
cmp eax, esi
jge 0x4ca66b
mov ecx, esi
lea edi, [ebx + eax*4]
sub ecx, eax
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 0x28]
mov dword [edi + 4], esi
mov edi, dword [ebp - 0x14]
push esi
push edi
call fcn.00460230
pop ecx
pop ecx
test eax, eax
je 0x4ca8b3
mov edx, dword [edi]
xor eax, eax
inc eax
mov dword [ebp - 0x1c], edx
mov dword [edx], eax
cmp esi, eax
jle 0x4ca69d
lea ecx, [esi - 1]
xor eax, eax
lea edi, [edx + 4]
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 0x14]
mov dword [edi + 4], esi
mov edi, dword [ebp - 0x18]
push esi
push edi
call fcn.00460230
pop ecx
pop ecx
test eax, eax
je 0x4ca8b3
mov edx, edi
mov edi, dword [edx]
mov dword [ebp - 0x30], edi
test esi, esi
jle 0x4ca6c5
mov ecx, esi
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 0x10]
mov dword [edx + 4], esi
mov edx, dword [ebp - 8]
mov eax, dword [edi]
mov dword [ebp - 0x2c], eax
test edx, edx
je 0x4ca7c1
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebx]
mov dword [ebp - 0x24], eax
test al, 1
jne 0x4ca7be
mov ecx, dword [edi]
mov eax, ecx
and dword [ebp - 0xc], 0
and eax, 1
neg eax
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov eax, dword [eax]
and eax, dword [ebp - 0x38]
xor ecx, eax
lea eax, [esi - 1]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x50], eax
test eax, eax
jle 0x4ca79d
mov esi, dword [ebp - 0x24]
lea eax, [edi + 4]
mov edx, dword [ebp - 0x38]
mov dword [ebp - 4], eax
mov eax, ebx
push 0xfffffffffffffffc
sub eax, edi
pop ecx
sub ecx, edi
mov dword [ebp - 0x3c], eax
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x4c], ecx
mov ecx, dword [ebp - 4]
mov eax, dword [eax + ecx]
mov ecx, dword [ebp - 0xc]
shl eax, 0x1f
shr esi, 1
or eax, esi
shr edi, 1
mov esi, dword [ebp - 0x3c]
mov dword [ebx + ecx*4], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ebp + 0x10]
mov esi, dword [esi + ecx]
mov eax, dword [eax]
add ecx, dword [ebp - 0x4c]
mov ecx, dword [ecx + eax + 4]
mov eax, dword [ebp - 4]
and ecx, edx
xor ecx, dword [eax]
mov eax, ecx
shl eax, 0x1f
or eax, edi
mov edi, dword [ebp - 4]
mov dword [edi - 4], eax
mov edi, ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
inc eax
add ecx, 4
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp - 0x50]
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 4], ecx
jl 0x4ca739
mov edx, dword [ebp - 8]
mov dword [ebp - 0x20], edi
mov edi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x24], esi
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 0x24]
shr eax, 1
shr ecx, 1
sub edx, 1
mov dword [ebx + esi*4], eax
mov eax, esi
mov esi, dword [ebp - 0x40]
mov dword [ebp - 8], edx
mov dword [edi + eax*4], ecx
jne 0x4ca6de
mov edi, dword [ebp - 0x10]
cmp edx, 0x20
jg 0x4ca7d8
cmp dword [ebx], 0
je 0x4ca8b3
cmp dword [ebx], 1
je 0x4ca891
mov ecx, dword [ebp - 0x34]
cmp edx, ecx
jge 0x4ca814
mov eax, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x34], edx
mov edx, ecx
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x28], edi
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ecx]
mov dword [ebp - 0x14], edi
mov edi, dword [ebp - 0x30]
mov dword [ebp - 0x18], eax
mov eax, dword [eax]
mov dword [ebp - 8], edx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x30], eax
jmp 0x4ca817
mov edi, dword [ebp - 0x1c]
test esi, esi
jle 0x4ca852
mov eax, dword [ebp - 0x2c]
mov ecx, ebx
sub eax, ebx
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x30]
sub eax, ebx
sub edi, ebx
mov ebx, esi
mov dword [ebp - 0x4c], eax
mov esi, dword [ebp - 0x50]
mov edx, eax
mov eax, dword [esi + ecx]
xor dword [ecx], eax
mov eax, dword [edx + ecx]
xor dword [edi + ecx], eax
lea ecx, [ecx + 4]
sub ebx, 1
jne 0x4ca836
mov esi, dword [ebp - 0x40]
mov ebx, dword [ebp - 0x44]
mov edx, dword [ebp - 8]
mov edi, dword [ebp - 0x10]
cmp edx, dword [ebp - 0x34]
jne 0x4ca6d3
lea eax, [edx - 1]
cdq
and edx, 0x1f
lea edi, [edx + eax]
sar edi, 5
jmp 0x4ca872
test edi, edi
je 0x4ca879
dec edi
mov eax, dword [ebx + edi*4]
test eax, eax
je 0x4ca86d
push eax
call fcn.0045fbc9
shl edi, 5
pop ecx
lea edx, [edi + eax]
mov edi, dword [ebp - 0x10]
mov dword [ebp - 8], edx
jmp 0x4ca6d3
mov ebx, dword [ebp - 0x14]
push ebx
call fcn.00460014
push ebx
push dword [ebp + 8]
call fcn.0045f94e
add esp, 0xc
xor ecx, ecx
test eax, eax
push 1
pop eax
cmovne ecx, eax
mov dword [ebp - 0x48], ecx
pop esi
push dword [ebp + 0x14]
call fcn.004609dc
mov eax, dword [ebp - 0x48]
pop ecx
pop edi
pop ebx
leave
ret