Function at 0x1002e490
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
push 4
mov ebx, ecx
call fcn.1008c952
mov edi, eax
push 4
mov dword [ebp - 0xc], edi
call fcn.1008c952
mov esi, eax
add esp, 8
mov eax, dword [ebx + 4]
xor edx, edx
mov dword [ebp - 0x10], esi
lea ecx, [eax*4]
test ecx, ecx
jle 0x1002e4f1
mov edi, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
sub edi, ecx
nop
mov al, byte [ecx + edi]
lea ecx, [ecx + 1]
mov byte [ecx - 1], al
inc edx
mov esi, dword [ebx + 4]
lea eax, [esi*4]
cmp edx, eax
jl 0x1002e4d0
mov edi, dword [ebp - 0xc]
mov esi, dword [ebp - 0x10]
mov eax, dword [ebx + 4]
lea edx, [eax*4]
mov eax, dword [ebx + 8]
inc eax
mov dword [ebp - 8], edx
imul eax, dword [ebx]
shl eax, 2
cmp edx, eax
jge 0x1002e661
mov eax, dword [ebp + 0xc]
add eax, 0xfffffffd
add eax, edx
mov ecx, eax
mov dword [ebp - 0xc], ecx
mov dl, byte [ecx - 1]
mov byte [edi], dl
mov al, byte [eax]
mov byte [edi + 1], al
mov byte [ebp + 0xb], al
mov al, byte [ecx + 1]
mov byte [edi + 2], al
mov byte [ebp - 1], al
mov al, byte [ecx + 2]
mov byte [edi + 3], al
mov ecx, dword [ebx + 4]
mov byte [ebp - 2], al
mov eax, dword [ebp - 8]
mov byte [ebp - 3], dl
cdq
and edx, 3
add eax, edx
sar eax, 2
cdq
idiv ecx
test edx, edx
jne 0x1002e5c2
mov al, byte [ebp + 0xb]
mov ecx, ebx
mov byte [edi], al
mov al, byte [ebp - 1]
mov byte [edi + 1], al
mov al, byte [ebp - 2]
mov byte [edi + 2], al
mov al, byte [ebp - 3]
push edi
mov byte [edi + 3], al
call fcn.1002e710
mov esi, dword [ebx + 4]
mov cl, 1
mov eax, dword [ebp - 8]
shl esi, 2
cdq
idiv esi
lea edx, [eax - 1]
test edx, edx
jle 0x1002e59a
mov al, cl
add cl, cl
shr al, 7
movzx eax, al
imul eax, eax, 0x1b
xor cl, al
sub edx, 1
jne 0x1002e586
mov esi, dword [ebp - 0x10]
mov byte [esi], cl
mov word [esi + 2], 0
mov byte [esi + 1], 0
xor byte [edi], cl
movzx eax, byte [esi + 1]
xor byte [edi + 1], al
movzx eax, byte [esi + 2]
xor byte [edi + 2], al
movzx eax, byte [esi + 3]
xor byte [edi + 3], al
jmp 0x1002e5d4
cmp ecx, 6
jle 0x1002e5d4
cmp edx, 4
jne 0x1002e5d4
push edi
mov ecx, ebx
call fcn.1002e710
mov ecx, dword [ebx + 4]
mov edx, dword [ebp - 8]
mov eax, edx
shl ecx, 2
sub eax, ecx
mov ecx, dword [ebp + 0xc]
movzx eax, byte [eax + ecx]
xor al, byte [edi]
mov ecx, dword [ebp - 0xc]
mov byte [ecx + 3], al
lea eax, [ecx + 4]
mov ecx, dword [ebx + 4]
mov dword [ebp + 8], eax
mov eax, edx
shl ecx, 2
sub eax, ecx
mov ecx, dword [ebp + 0xc]
movzx eax, byte [eax + ecx + 1]
xor al, byte [edi + 1]
mov ecx, dword [ebp + 8]
mov byte [ecx], al
mov eax, edx
mov ecx, dword [ebx + 4]
shl ecx, 2
sub eax, ecx
mov ecx, dword [ebp + 0xc]
movzx eax, byte [eax + ecx + 2]
xor al, byte [edi + 2]
mov ecx, dword [ebp - 0xc]
mov byte [ecx + 5], al
mov eax, edx
mov ecx, dword [ebx + 4]
add edx, 4
shl ecx, 2
sub eax, ecx
mov dword [ebp - 8], edx
mov ecx, dword [ebp + 0xc]
movzx eax, byte [eax + ecx + 3]
xor al, byte [edi + 3]
mov ecx, dword [ebp - 0xc]
mov byte [ecx + 6], al
mov eax, dword [ebx + 8]
inc eax
imul eax, dword [ebx]
shl eax, 2
cmp edx, eax
mov eax, dword [ebp + 8]
jl 0x1002e515
push esi
call fcn.1008c404
push edi
call fcn.1008c404
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8