Function at 0x520650
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x44
call fcn.0059eec0
mov eax, dword [0x66ea60]
xor eax, esp
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x58]
push ebx
mov ebx, dword [esp + 0x54]
push ebp
mov ebp, dword [esp + 0x54]
push esi
mov esi, dword [esp + 0x54]
mov dword [esp + 0x1c], eax
push edi
mov dword [esp + 0x38], esi
mov dl, byte [esi]
mov ecx, dword [esi + 0x28]
mov eax, dword [esi + 0x2c]
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], ebx
mov byte [esp + 0x13], dl
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test dl, 0x40
jne 0x5206b9
push eax
lea eax, [esi + 0x10]
push eax
push esi
call ecx
mov dl, byte [esp + 0x1f]
add esp, 0xc
add dword [esi + 0x20], 1
adc dword [esi + 0x24], 0
movzx eax, dl
mov ecx, 0xf
and eax, 7
xor edx, edx
sub ecx, eax
mov dword [esp + 0x3c], eax
mov byte [esi], al
cmp ecx, 0xf
jae 0x5206e6
movzx eax, byte [esi + ecx]
or edx, eax
mov byte [esi + ecx], 0
inc ecx
shl edx, 8
cmp ecx, 0xf
jb 0x5206d3
movzx eax, byte [esi + 0xf]
mov edi, dword [esp + 0x64]
or edx, eax
mov byte [esi + 0xf], 1
cmp edx, edi
je 0x52070e
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.0059e5bd
add esp, 0x44
ret
lea eax, [edi + 0xf]
or eax, 8
shr eax, 3
add dword [esi + 0x20], eax
adc dword [esi + 0x24], 0
cmp dword [esi + 0x24], 0x20000000
jb 0x520747
ja 0x52072f
cmp dword [esi + 0x20], 0
jbe 0x520747
pop edi
pop esi
pop ebp
mov eax, 0xfffffffe
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.0059e5bd
add esp, 0x44
ret
mov ecx, edi
shr ecx, 4
mov dword [esp + 0x14], ecx
test ecx, ecx
je 0x520791
lea eax, [esi + 0x10]
push eax
push esi
push dword [esp + 0x20]
push ecx
push ebx
push ebp
call dword [esp + 0x38]
mov eax, dword [esp + 0x2c]
add esp, 0x18
shl eax, 4
add ebp, eax
add ebx, eax
sub edi, eax
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], ebx
mov dword [esp + 0x64], edi
je 0x520791
shr eax, 4
push eax
push esi
call fcn.00520a90
add esp, 8
jmp 0x520799
test edi, edi
je 0x520919
test edi, edi
je 0x5207b9
mov edx, ebp
mov dword [esp + 0x14], edi
lea ecx, [esi + 0x10]
mov al, byte [edx]
lea edx, [edx + 1]
xor byte [ecx], al
lea ecx, [ecx + 1]
sub edi, 1
jne 0x5207a6
mov edi, dword [esp + 0x64]
push dword [esp + 0x18]
lea eax, [esi + 0x10]
push eax
push eax
call dword [esp + 0x28]
push dword [esp + 0x24]
lea eax, [esp + 0x50]
push eax
push esi
call dword [esp + 0x34]
add esp, 0x18
xor eax, eax
test edi, edi
je 0x520919
cmp edi, 8
jb 0x5208fe
lea edx, [ebx - 1]
lea ecx, [esp + edi + 0x3f]
add edx, edi
cmp ebx, ecx
ja 0x520803
lea ecx, [esp + 0x40]
cmp edx, ecx
jae 0x5208fe
lea ecx, [ebp - 1]
add ecx, edi
cmp ebx, ecx
ja 0x520814
cmp edx, ebp
jae 0x5208fe
cmp edi, 0x40
jb 0x5208ce
lea edx, [ebp + 0x30]
mov ecx, edi
mov edi, ebp
lea esi, [esp + 0x40]
lea ebp, [esp + 0x50]
sub edi, ebx
sub ebp, ebx
mov dword [esp + 0x14], edi
mov dword [esp + 0x2c], ebp
sub esi, ebx
and ecx, 0xffffffc0
mov dword [esp + 0x20], esi
lea ebp, [esp + 0x60]
mov dword [esp + 0x34], ecx
sub ebp, ebx
lea ecx, [ebx + 0x10]
mov ebx, dword [esp + 0x2c]
mov esi, edi
mov dword [esp + 0x30], ebp
mov ebp, dword [esp + 0x20]
nop dword [eax]
movups xmm0, xmmword [edx - 0x30]
mov edi, dword [esp + 0x30]
lea edx, [edx + 0x40]
movups xmm1, xmmword [esp + eax + 0x40]
add eax, 0x40
lea ecx, [ecx + 0x40]
xorps xmm1, xmm0
movups xmmword [ecx - 0x50], xmm1
movups xmm0, xmmword [ecx + esi - 0x40]
movups xmm1, xmmword [ecx + ebp - 0x40]
xorps xmm1, xmm0
movups xmmword [ecx - 0x40], xmm1
movups xmm0, xmmword [edx - 0x50]
movups xmm1, xmmword [ecx + ebx - 0x40]
xorps xmm1, xmm0
movups xmmword [ecx - 0x30], xmm1
movups xmm1, xmmword [ecx + edi - 0x40]
mov edi, dword [esp + 0x64]
movups xmm0, xmmword [edx - 0x40]
xorps xmm1, xmm0
movups xmmword [ecx - 0x20], xmm1
cmp eax, dword [esp + 0x34]
jb 0x520860
mov esi, dword [esp + 0x38]
mov ecx, edi
mov ebx, dword [esp + 0x24]
and cl, 0x3f
mov ebp, dword [esp + 0x28]
cmp cl, 8
jb 0x5208fa
mov ecx, edi
and ecx, 0xfffffff8
nop dword [eax]
nop word [eax + eax]
movq xmm1, qword [eax + ebp]
movq xmm0, qword [esp + eax + 0x40]
xorps xmm1, xmm0
movq qword [ebx + eax], xmm1
add eax, 8
cmp eax, ecx
jb 0x5208e0
cmp eax, edi
jae 0x520919
lea ecx, [esp + 0x40]
sub ebp, ecx
sub ebx, ecx
lea edx, [esp + 0x40]
add edx, eax
inc eax
mov cl, byte [edx + ebp]
xor cl, byte [edx]
mov byte [edx + ebx], cl
cmp eax, edi
jb 0x520906
mov ecx, 0xf
sub ecx, dword [esp + 0x3c]
cmp ecx, 0x10
jae 0x52093d
mov eax, 0x10
sub eax, ecx
push eax
lea eax, [ecx + esi]
push 0
push eax
call fcn.005b6630
add esp, 0xc
push dword [esp + 0x18]
lea eax, [esp + 0x44]
push eax
push esi
call dword [esp + 0x28]
mov eax, dword [esp + 0x4c]
add esp, 0xc
xor dword [esi + 0x10], eax
mov eax, dword [esp + 0x44]
xor dword [esi + 0x14], eax
mov eax, dword [esp + 0x48]
xor dword [esi + 0x18], eax
mov eax, dword [esp + 0x4c]
xor dword [esi + 0x1c], eax
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x50]
pop edi
mov byte [esi], al
xor eax, eax
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0059e5bd
add esp, 0x44
ret