Function at 0xe6d678
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], edx
mov dword [esp + 0x34], ecx
cmp dword [eax + 8], edx
jl 0xe6d89c
mov eax, 1
mov esi, eax
mov cl, byte [esp + 0x74]
shl esi, cl
cmp dword [esp + 0x74], 3
jg 0xe6d768
mov edi, dword [esp + 0x48]
test edi, edi
jle 0xe6d8c5
mov eax, dword [esp + 0x44]
mov eax, dword [eax]
mov dword [esp + 0x4c], eax
lea ecx, [esi*4]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], eax
lea eax, [eax + edi*4]
mov dword [esp + 0x18], eax
test esi, esi
jle 0xe6d8be
mov edi, dword [esp + 0x34]
xor ebp, ebp
xor ebx, ebx
mov edx, dword [edi]
mov eax, dword [esp + 0x70]
xor eax, ebx
lea ecx, [eax - 1]
not eax
and eax, ecx
sar eax, 0x1f
and eax, edx
or ebp, eax
inc ebx
add edi, 4
cmp esi, ebx
jne 0xe6d6e8
mov eax, dword [esp + 0x14]
mov dword [eax], ebp
mov ecx, dword [esp + 0x1c]
add dword [esp + 0x34], ecx
add eax, 4
mov dword [esp + 0x14], eax
cmp dword [esp + 0x18], eax
jne 0xe6d6d8
mov edi, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
mov dword [edi + 4], edx
mov edi, dword [esp + 0x4c]
lea eax, [edi + edx*4 - 4]
lea esi, [esi]
sub eax, 4
mov ecx, dword [eax + 4]
test ecx, ecx
jne 0xe6d745
dec edx
jne 0xe6d738
mov eax, dword [esp + 0x44]
mov dword [eax + 4], edx
mov eax, 1
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [esp + 0x74]
lea ecx, [edi - 2]
shl eax, cl
mov edi, eax
mov dword [esp + 0x18], eax
dec eax
and eax, dword [esp + 0x70]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x70]
sar eax, cl
mov ecx, eax
mov edx, eax
not edx
lea eax, [eax - 1]
and eax, edx
cdq
mov dword [esp + 0x24], edx
mov eax, ecx
xor eax, 1
mov edx, eax
not edx
dec eax
and eax, edx
cdq
mov dword [esp + 0x28], edx
mov eax, ecx
xor eax, 2
mov edx, eax
not edx
dec eax
and eax, edx
cdq
mov dword [esp + 0x2c], edx
xor ecx, 3
mov edx, ecx
mov eax, ecx
not eax
dec edx
and eax, edx
cdq
mov dword [esp + 0x30], edx
mov ecx, dword [esp + 0x48]
test ecx, ecx
jle 0xe6d8c5
mov eax, dword [esp + 0x44]
mov eax, dword [eax]
mov dword [esp + 0x4c], eax
shl esi, 2
mov dword [esp + 0x40], esi
mov dword [esp + 0x38], eax
lea eax, [eax + ecx*4]
mov dword [esp + 0x3c], eax
mov eax, edi
shl eax, 2
mov dword [esp + 0x1c], eax
mov ebx, dword [esp + 0x18]
test ebx, ebx
jle 0xe6d892
nop
mov ebp, dword [esp + 0x34]
mov dword [esp + 0x14], 0
xor edi, edi
nop
mov ecx, dword [ebp]
mov edx, dword [esp + 0x1c]
mov eax, edx
add eax, ebp
mov esi, dword [eax]
add eax, edx
mov ebx, dword [eax]
add eax, edx
mov edx, dword [eax]
mov eax, dword [esp + 0x20]
xor eax, edi
and esi, dword [esp + 0x28]
and ebx, dword [esp + 0x2c]
or ebx, esi
and ecx, dword [esp + 0x24]
or ebx, ecx
and edx, dword [esp + 0x30]
or ebx, edx
mov edx, eax
not edx
dec eax
and eax, edx
sar eax, 0x1f
and ebx, eax
or dword [esp + 0x14], ebx
inc edi
add ebp, 4
cmp dword [esp + 0x18], edi
jne 0xe6d818
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x14]
mov dword [eax], edi
mov esi, dword [esp + 0x40]
add dword [esp + 0x34], esi
add eax, 4
mov dword [esp + 0x38], eax
cmp eax, dword [esp + 0x3c]
je 0xe6d721
mov ebx, dword [esp + 0x18]
test ebx, ebx
jg 0xe6d808
mov dword [esp + 0x14], 0
jmp 0xe6d863
mov dword [esp + 4], edx
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.00dcd838
test eax, eax
jne 0xe6d694
xor eax, eax
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
xor ebp, ebp
jmp 0xe6d706
mov eax, dword [esp + 0x44]
mov edi, dword [esp + 0x48]
mov dword [eax + 4], edi
mov eax, 1
jmp 0xe6d751