Function at 0x52ea80
Capabilities:
Encode data using xor

Disassembly:
mov eax, 8
call fcn.00452110
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x34]
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 0x20]
movzx edx, byte [edi + 1]
movzx eax, byte [edi]
movzx esi, byte [edi + 4]
movzx ecx, byte [edi + 7]
shl edx, 8
or edx, eax
shl ecx, 8
movzx eax, byte [edi + 2]
shl eax, 0x10
or edx, eax
movzx eax, byte [edi + 3]
shl eax, 0x18
or edx, eax
movzx eax, byte [edi + 5]
shl eax, 8
or esi, eax
mov dword [esp + 0x20], edx
movzx eax, byte [edi + 6]
or ecx, eax
shl ecx, 0x10
or esi, ecx
cmp dword [esp + 0x38], 0
mov dword [esp + 0x1c], esi
je 0x52ecb0
mov eax, dword [esp + 0x24]
add eax, 0xfffffff8
mov dword [esp + 0x24], eax
js 0x52ebd9
mov ecx, dword [esp + 0x24]
lea edi, [eax + 8]
shr edi, 3
mov eax, edi
neg eax
lea ecx, [ecx + eax*8]
mov dword [esp + 0x24], ecx
jmp 0x52eb16
mov esi, dword [esp + 0x1c]
movzx eax, byte [ebp + 1]
movzx edx, byte [ebp]
movzx ecx, byte [ebp + 4]
push dword [esp + 0x30]
shl eax, 8
or edx, eax
movzx eax, byte [ebp + 2]
push dword [esp + 0x30]
shl eax, 0x10
push dword [esp + 0x30]
or edx, eax
movzx eax, byte [ebp + 3]
shl eax, 0x18
or edx, eax
movzx eax, byte [ebp + 5]
xor edx, dword [esp + 0x2c]
shl eax, 8
or ecx, eax
mov dword [esp + 0x1c], edx
movzx eax, byte [ebp + 6]
shl eax, 0x10
or ecx, eax
movzx eax, byte [ebp + 7]
shl eax, 0x18
add ebp, 8
or ecx, eax
lea eax, [esp + 0x1c]
xor ecx, esi
push eax
mov dword [esp + 0x24], ecx
call fcn.0052f4d0
mov edx, dword [esp + 0x20]
add esp, 0x10
mov ecx, dword [esp + 0x14]
mov eax, edx
shr eax, 8
mov byte [ebx], dl
mov byte [ebx + 1], al
mov eax, edx
shr eax, 0x10
mov byte [ebx + 2], al
mov eax, edx
shr eax, 0x18
mov byte [ebx + 3], al
mov eax, ecx
shr eax, 8
mov byte [ebx + 4], cl
mov byte [ebx + 5], al
mov eax, ecx
shr eax, 0x10
mov byte [ebx + 6], al
mov eax, ecx
shr eax, 0x18
mov byte [ebx + 7], al
add ebx, 8
mov dword [esp + 0x20], edx
mov dword [esp + 0x1c], ecx
sub edi, 1
jne 0x52eb12
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x24]
jmp 0x52ebdd
mov ecx, dword [esp + 0x1c]
cmp eax, 0xfffffff8
je 0x52ee7d
lea ecx, [ebp + 8]
xor esi, esi
add ecx, eax
xor edi, edi
add eax, 7
cmp eax, 7
ja case.default.0x52ebf7
jmp dword [eax*4 + 0x52eedc]
movzx esi, byte [ecx - 1]
dec ecx
shl esi, 0x18
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 0x10
or esi, eax
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 8
or esi, eax
movzx eax, byte [ecx - 1]
dec ecx
or esi, eax
movzx edi, byte [ecx - 1]
dec ecx
shl edi, 0x18
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 0x10
or edi, eax
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 8
or edi, eax
movzx eax, byte [ecx - 1]
or edi, eax
push dword [esp + 0x30]
xor esi, dword [esp + 0x20]
lea eax, [esp + 0x14]
push dword [esp + 0x30]
xor edi, edx
mov dword [esp + 0x1c], esi
push dword [esp + 0x30]
mov dword [esp + 0x1c], edi
push eax
call fcn.0052f4d0
mov edx, dword [esp + 0x20]
add esp, 0x10
mov ecx, dword [esp + 0x14]
mov eax, edx
shr eax, 8
mov byte [ebx], dl
mov byte [ebx + 1], al
mov eax, edx
mov edi, dword [esp + 0x34]
shr eax, 0x10
mov byte [ebx + 2], al
mov eax, edx
shr eax, 0x18
mov byte [ebx + 3], al
mov eax, ecx
shr eax, 8
mov byte [ebx + 4], cl
mov byte [ebx + 5], al
mov eax, ecx
shr eax, 0x10
mov byte [ebx + 6], al
mov eax, ecx
shr eax, 0x18
mov byte [ebx + 7], al
jmp 0x52ee7d
mov esi, dword [esp + 0x24]
add esi, 0xfffffff8
js 0x52ed97
lea eax, [esi + 8]
shr eax, 3
mov dword [esp + 0x24], eax
neg eax
lea esi, [esi + eax*8]
mov dword [esp + 0x38], esi
movzx eax, byte [ebp + 1]
movzx edi, byte [ebp]
movzx esi, byte [ebp + 4]
push dword [esp + 0x30]
shl eax, 8
or edi, eax
movzx eax, byte [ebp + 2]
push dword [esp + 0x30]
shl eax, 0x10
push dword [esp + 0x30]
or edi, eax
movzx eax, byte [ebp + 3]
shl eax, 0x18
or edi, eax
movzx eax, byte [ebp + 5]
shl eax, 8
or esi, eax
mov dword [esp + 0x1c], edi
movzx eax, byte [ebp + 6]
shl eax, 0x10
or esi, eax
movzx eax, byte [ebp + 7]
shl eax, 0x18
add ebp, 8
or esi, eax
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x24], esi
call fcn.0052e970
mov ecx, dword [esp + 0x20]
add esp, 0x10
xor ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
mov eax, ecx
xor edx, dword [esp + 0x1c]
mov byte [ebx], cl
shr eax, 8
mov byte [ebx + 1], al
mov eax, ecx
shr eax, 0x10
mov byte [ebx + 2], al
mov eax, edx
shr ecx, 0x18
mov byte [ebx + 3], cl
mov ecx, esi
mov byte [ebx + 4], dl
shr eax, 8
mov byte [ebx + 5], al
mov eax, edx
shr eax, 0x10
shr edx, 0x18
mov byte [ebx + 6], al
mov byte [ebx + 7], dl
add ebx, 8
sub dword [esp + 0x24], 1
mov edx, edi
mov dword [esp + 0x20], edx
mov dword [esp + 0x1c], ecx
jne 0x52ecd0
mov edi, dword [esp + 0x34]
mov esi, dword [esp + 0x38]
jmp 0x52ed9b
mov ecx, dword [esp + 0x1c]
cmp esi, 0xfffffff8
je 0x52ee7d
movzx eax, byte [ebp + 1]
movzx edx, byte [ebp]
movzx ecx, byte [ebp + 4]
push dword [esp + 0x30]
shl eax, 8
push dword [esp + 0x30]
or edx, eax
movzx eax, byte [ebp + 2]
push dword [esp + 0x30]
shl eax, 0x10
or edx, eax
movzx eax, byte [ebp + 3]
shl eax, 0x18
or edx, eax
movzx eax, byte [ebp + 5]
shl eax, 8
or ecx, eax
mov dword [esp + 0x30], edx
movzx eax, byte [ebp + 6]
mov dword [esp + 0x40], ecx
movzx ecx, byte [ebp + 7]
mov ebp, dword [esp + 0x40]
shl ecx, 8
or ecx, eax
mov dword [esp + 0x1c], edx
shl ecx, 0x10
lea eax, [esp + 0x1c]
or ebp, ecx
push eax
mov dword [esp + 0x24], ebp
call fcn.0052e970
mov eax, dword [esp + 0x20]
lea ecx, [esi + 8]
mov edx, dword [esp + 0x24]
add esi, 7
xor eax, dword [esp + 0x30]
add esp, 0x10
xor edx, dword [esp + 0x1c]
add ecx, ebx
mov dword [esp + 0x34], eax
cmp esi, 7
ja case.default.0x52ee30
jmp dword [esi*4 + 0x52eefc]
dec ecx
mov eax, edx
shr eax, 0x18
mov byte [ecx], al
dec ecx
mov eax, edx
shr eax, 0x10
mov byte [ecx], al
dec ecx
mov eax, edx
shr eax, 8
mov byte [ecx], al
mov eax, dword [esp + 0x34]
dec ecx
mov byte [ecx], dl
dec ecx
shr eax, 0x18
mov byte [ecx], al
mov eax, dword [esp + 0x34]
dec ecx
shr eax, 0x10
mov byte [ecx], al
mov eax, dword [esp + 0x34]
dec ecx
shr eax, 8
mov byte [ecx], al
mov eax, dword [esp + 0x34]
mov byte [ecx - 1], al
mov edx, dword [esp + 0x24]
mov ecx, ebp
mov esi, ecx
mov byte [edi], dl
shr esi, 8
mov eax, ecx
mov dword [esp + 0x20], esi
mov ebx, ecx
mov esi, edx
shr ebx, 0x10
shr esi, 0x18
mov dword [esp + 0x1c], esi
mov esi, edx
shr esi, 0x10
mov dword [esp + 0x24], esi
mov esi, edx
shr eax, 0x18
shr esi, 8
mov dword [esp + 0x34], esi
mov edx, dword [esp + 0x34]
mov byte [edi + 1], dl
mov edx, dword [esp + 0x24]
mov byte [edi + 2], dl
mov edx, dword [esp + 0x1c]
mov byte [edi + 3], dl
mov byte [edi + 4], cl
mov ecx, dword [esp + 0x20]
mov byte [edi + 5], cl
mov byte [edi + 6], bl
mov byte [edi + 7], al
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret