Function at 0x66d170
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x24
call fcn.006d13f0
mov eax, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
lea edi, [eax + 1]
movzx eax, byte [eax]
shl eax, 8
cmp dword [ebp + 0x1c], 0
je 0x66d3ca
movzx ecx, byte [edi]
movzx edx, byte [edi + 3]
or ecx, eax
movzx eax, byte [edi + 1]
mov esi, dword [ebp + 0xc]
shl eax, 8
shl ecx, 0x10
or ecx, eax
shl edx, 0x18
movzx eax, byte [edi + 2]
or ecx, eax
movzx eax, byte [edi + 4]
shl eax, 0x10
or edx, eax
mov dword [ebp - 4], ecx
movzx eax, byte [edi + 5]
shl eax, 8
or edx, eax
movzx eax, byte [edi + 6]
dec edi
or edx, eax
add ebx, 0xfffffff8
mov dword [ebp + 0x1c], edx
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 8], ebx
js 0x66d2ad
lea edi, [ebx + 8]
shr edi, 3
mov eax, edi
neg eax
lea ebx, [ebx + eax*8]
mov dword [ebp - 8], ebx
mov ebx, dword [ebp + 8]
nop
movzx edx, byte [ebx]
movzx eax, byte [ebx + 1]
movzx ecx, byte [ebx + 4]
shl eax, 0x10
push dword [ebp + 0x14]
shl edx, 0x18
or edx, eax
shl ecx, 0x18
movzx eax, byte [ebx + 2]
shl eax, 8
or edx, eax
movzx eax, byte [ebx + 3]
or edx, eax
movzx eax, byte [ebx + 5]
xor edx, dword [ebp - 4]
shl eax, 0x10
or ecx, eax
mov dword [ebp - 0x1c], edx
movzx eax, byte [ebx + 6]
shl eax, 8
or ecx, eax
movzx eax, byte [ebx + 7]
or ecx, eax
add ebx, 8
xor ecx, dword [ebp + 0x1c]
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x18], ecx
call fcn.0066d680
mov ecx, dword [ebp - 0x1c]
add esp, 8
mov edx, dword [ebp - 0x18]
mov eax, ecx
shr eax, 0x18
mov byte [esi], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 1], al
mov eax, ecx
shr eax, 8
mov byte [esi + 2], al
mov eax, edx
shr eax, 0x18
mov byte [esi + 3], cl
mov byte [esi + 4], al
mov eax, edx
shr eax, 0x10
mov byte [esi + 5], al
mov eax, edx
shr eax, 8
mov byte [esi + 6], al
mov byte [esi + 7], dl
add esi, 8
mov dword [ebp - 4], ecx
mov dword [ebp + 0x1c], edx
sub edi, 1
jne 0x66d200
mov edi, dword [ebp - 0x24]
jmp 0x66d2b0
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 8]
cmp eax, 0xfffffff8
je 0x66d384
mov edx, dword [ebp - 8]
lea ecx, [eax + 8]
add ecx, ebx
add edx, 7
xor eax, eax
mov dword [ebp - 0x24], edx
xor ebx, ebx
mov dword [ebp + 0x10], eax
cmp edx, 7
ja case.default.0x66d2d6
jmp dword [edx*4 + 0x66d640]
movzx ebx, byte [ecx - 1]
dec ecx
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 8
or ebx, eax
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 0x10
or ebx, eax
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 0x18
or ebx, eax
movzx eax, byte [ecx - 1]
dec ecx
mov dword [ebp + 0x10], eax
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 8
or dword [ebp + 0x10], eax
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 0x10
or dword [ebp + 0x10], eax
movzx eax, byte [ecx - 1]
shl eax, 0x18
or dword [ebp + 0x10], eax
mov eax, dword [ebp + 0x10]
xor eax, dword [ebp - 4]
push dword [ebp + 0x14]
xor ebx, dword [ebp + 0x1c]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x18], ebx
call fcn.0066d680
mov ecx, dword [ebp - 0x1c]
add esp, 8
mov edx, dword [ebp - 0x18]
mov eax, ecx
shr eax, 0x18
mov byte [esi], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 1], al
mov eax, ecx
shr eax, 8
mov byte [esi + 2], al
mov eax, edx
shr eax, 0x18
mov byte [esi + 3], cl
mov byte [esi + 4], al
mov eax, edx
shr eax, 0x10
mov byte [esi + 5], al
mov eax, edx
shr eax, 8
mov byte [esi + 6], al
mov dword [ebp + 0x1c], edx
mov byte [esi + 7], dl
inc edi
mov dword [ebp + 0x10], edx
shr dword [ebp + 0x10], 0x18
mov ebx, edx
mov dword [ebp - 0x14], edi
inc edi
mov eax, edi
mov dword [ebp - 0x20], edi
add eax, 4
shr ebx, 0x10
mov dword [ebp - 0x24], eax
mov esi, edi
mov eax, edx
add edi, 2
shr eax, 8
mov dword [ebp - 8], eax
mov eax, ecx
shr eax, 8
mov dword [ebp - 0x18], eax
mov eax, ecx
shr eax, 0x10
mov dword [ebp - 4], eax
mov eax, ecx
shr eax, 0x18
mov dword [ebp - 0xc], eax
jmp 0x66d608
mov esi, edi
movzx ecx, byte [esi]
movzx edx, byte [esi + 3]
or ecx, eax
movzx eax, byte [esi + 1]
shl eax, 8
shl ecx, 0x10
or ecx, eax
shl edx, 0x18
movzx eax, byte [esi + 2]
or ecx, eax
movzx eax, byte [esi + 4]
shl eax, 0x10
or edx, eax
mov dword [ebp - 4], ecx
movzx eax, byte [esi + 5]
shl eax, 8
or edx, eax
movzx eax, byte [esi + 6]
dec esi
or edx, eax
add ebx, 0xfffffff8
mov dword [ebp + 0x1c], edx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], ebx
js 0x66d505
lea eax, [ebx + 8]
shr eax, 3
mov dword [ebp - 0xc], eax
neg eax
lea ebx, [ebx + eax*8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov ebx, dword [ebp + 8]
mov dword [ebp + 0x10], eax
movzx edi, byte [ebx]
movzx eax, byte [ebx + 1]
movzx esi, byte [ebx + 4]
shl eax, 0x10
push dword [ebp + 0x14]
shl edi, 0x18
or edi, eax
shl esi, 0x18
movzx eax, byte [ebx + 2]
shl eax, 8
or edi, eax
movzx eax, byte [ebx + 3]
or edi, eax
movzx eax, byte [ebx + 5]
shl eax, 0x10
or esi, eax
mov dword [ebp - 0x24], edi
movzx eax, byte [ebx + 6]
shl eax, 8
or esi, eax
mov dword [ebp - 0x1c], edi
movzx eax, byte [ebx + 7]
add ebx, 8
or esi, eax
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x18], esi
call fcn.0066d680
mov edi, dword [ebp + 0x10]
add esp, 8
mov ecx, dword [ebp - 0x1c]
xor ecx, dword [ebp - 4]
inc dword [ebp + 0x10]
mov eax, ecx
shr eax, 0x18
mov byte [edi], al
mov eax, ecx
mov edi, dword [ebp + 0x10]
inc dword [ebp + 0x10]
mov edx, dword [ebp - 0x18]
xor edx, dword [ebp + 0x1c]
shr eax, 0x10
mov byte [edi], al
mov eax, ecx
mov edi, dword [ebp + 0x10]
shr eax, 8
mov byte [edi], al
mov eax, edi
inc eax
mov dword [ebp + 0x10], eax
mov byte [eax], cl
mov ecx, eax
mov eax, edx
shr eax, 0x18
mov byte [ecx + 1], al
mov eax, edx
shr eax, 0x10
mov byte [ecx + 2], al
mov eax, edx
shr eax, 8
mov byte [ecx + 3], al
mov byte [ecx + 4], dl
add ecx, 5
sub dword [ebp - 0xc], 1
mov edx, esi
mov dword [ebp + 0x10], ecx
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 4], ecx
mov dword [ebp + 0x1c], edx
jne 0x66d435
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp + 0x10]
jmp 0x66d50b
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
cmp dword [ebp - 8], 0xfffffff8
je 0x66d5cb
movzx ecx, byte [ebx]
movzx eax, byte [ebx + 1]
movzx edx, byte [ebx + 4]
push dword [ebp + 0x14]
shl eax, 0x10
shl ecx, 0x18
or ecx, eax
shl edx, 0x18
movzx eax, byte [ebx + 2]
shl eax, 8
or ecx, eax
movzx eax, byte [ebx + 3]
or ecx, eax
movzx eax, byte [ebx + 5]
mov dword [ebp + 0x10], ecx
mov dword [ebp - 0x1c], ecx
movzx ecx, byte [ebx + 6]
shl eax, 0x10
or edx, eax
shl ecx, 8
movzx eax, byte [ebx + 7]
or ecx, eax
lea eax, [ebp - 0x1c]
or edx, ecx
push eax
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x18], edx
call fcn.0066d680
mov eax, dword [ebp - 8]
add esp, 8
mov edx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x18]
xor edx, dword [ebp - 4]
xor ebx, dword [ebp + 0x1c]
lea ecx, [eax + 8]
add eax, 7
add ecx, edi
cmp eax, 7
ja case.default.0x66d589
jmp dword [eax*4 + 0x66d660]
dec ecx
mov byte [ecx], bl
dec ecx
mov eax, ebx
shr eax, 8
mov byte [ecx], al
dec ecx
mov eax, ebx
shr eax, 0x10
mov byte [ecx], al
dec ecx
shr ebx, 0x18
mov byte [ecx], bl
dec ecx
mov byte [ecx], dl
dec ecx
mov eax, edx
shr eax, 8
mov byte [ecx], al
dec ecx
mov eax, edx
shr eax, 0x10
mov byte [ecx], al
shr edx, 0x18
mov byte [ecx - 1], dl
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp + 0x10]
mov dword [ebp + 0x1c], edx
inc esi
mov dword [ebp + 0x10], edx
shr dword [ebp + 0x10], 0x18
mov ebx, edx
mov dword [ebp - 0x14], esi
inc esi
shr ebx, 0x10
mov dword [ebp - 0x20], esi
lea edi, [esi + 2]
lea eax, [edi + 2]
mov dword [ebp - 0x24], eax
mov eax, edx
shr eax, 8
mov edx, ecx
mov dword [ebp - 8], eax
mov eax, ecx
shr eax, 8
mov dword [ebp - 0x18], eax
mov eax, ecx
shr eax, 0x10
shr edx, 0x18
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
mov byte [eax], dl
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov byte [edx], al
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp + 0x1c]
mov byte [esi], al
mov eax, dword [ebp - 0x20]
mov byte [eax + 1], cl
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 8]
mov byte [edi], cl
mov ecx, dword [ebp - 0x24]
mov byte [edi + 1], bl
pop edi
pop esi
mov byte [ecx], al
mov byte [ecx + 1], dl
pop ebx
mov esp, ebp
pop ebp
ret