Function at 0x52c5e0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x50
lea rbp, [rsp + 0x50]
movdqa xmmword [rbp - 0x10], xmm8
movdqa xmmword [rbp - 0x20], xmm7
movdqa xmmword [rbp - 0x30], xmm6
mov r12d, r8d
mov rbx, rcx
mov edi, 0xfffffffe
test rbx, rbx
je 0x52c62f
cmp qword [rbx + 0x30], 0
je 0x52c62f
cmp qword [rbx + 0x38], 0
je 0x52c62f
mov r14, qword [rbx + 0x28]
test r14, r14
je 0x52c62f
cmp qword [r14], rbx
je 0x52c64d
mov eax, edi
movaps xmm6, xmmword [rbp - 0x30]
movaps xmm7, xmmword [rbp - 0x20]
movaps xmm8, xmmword [rbp - 0x10]
add rsp, 0x50
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
pop rbp
ret
mov eax, dword [r14 + 8]
lea ecx, [rax - 0x39]
cmp ecx, 0x38
ja 0x52c717
movabs rsi, 0x100400400011001
bt rsi, rcx
jae 0x52c717
cmp edx, 0xffffffff
mov r15d, 6
cmovne r15d, edx
cmp r12d, 4
ja 0x52c62f
cmp r15d, 9
ja 0x52c62f
cmp dword [r14 + 0xb0], r12d
jne 0x52c6b8
movsxd rax, dword [r14 + 0xac]
shl rax, 4
lea rcx, [0x0095d4f0]
mov rax, qword [rax + rcx + 8]
movsxd rdx, r15d
shl rdx, 4
cmp rax, qword [rdx + rcx + 8]
je 0x52c6bf
cmp dword [r14 + 0x40], 0xfffffffe
jne 0x52c730
mov eax, dword [r14 + 0xac]
cmp eax, r15d
je 0x52ca09
test eax, eax
jne 0x52c9c5
mov eax, dword [r14 + 0x1704]
test eax, eax
je 0x52c9c5
cmp eax, 1
jne 0x52c775
mov eax, dword [r14 + 0x44]
mov edi, dword [r14 + 0x74]
mov r9, qword [r14 + 0x68]
lea rcx, [r9 + rdi*2]
lea edx, [rdi - 1]
lea rbx, [rdx + 1]
cmp rbx, 8
jae 0x52c796
mov edx, edi
jmp 0x52c880
cmp eax, 0x29a
je 0x52c671
cmp eax, 0x2a
jne 0x52c62f
jmp 0x52c671
mov edx, 5
mov rcx, rbx
call fcn.0052ca20
cmp eax, 0xfffffffe
je 0x52c62f
mov edi, 0xfffffffb
cmp dword [rbx + 8], 0
jne 0x52c62f
mov eax, dword [r14 + 0x94]
sub eax, dword [r14 + 0x84]
add eax, dword [r14 + 0x9c]
jne 0x52c62f
jmp 0x52c6bf
mov rcx, qword [r14 + 0x68]
mov r8d, dword [r14 + 0x74]
dec r8d
mov word [rcx + r8*2], 0
add r8, r8
xor edx, edx
call fcn.00719ae0
jmp 0x52c9ba
mov r8d, edi
and r8d, 7
sub rbx, r8
neg rdx
lea rdx, [r8 + rdx - 1]
lea rcx, [rcx + rdx*2]
mov edx, edi
sub edx, ebx
movd xmm0, eax
pshufd xmm0, xmm0, 0
lea rdi, [r9 + rdi*2 - 0x10]
pxor xmm8, xmm8
movdqa xmm2, xmmword [0x00801c20]
movdqa xmm1, xmm0
pxor xmm1, xmm2
movdqu xmm4, xmmword [rdi]
pshufd xmm4, xmm4, 0x4e
pshuflw xmm4, xmm4, 0x1b
pshufhw xmm5, xmm4, 0x1b
movdqa xmm4, xmm5
punpcklwd xmm4, xmm8
punpckhwd xmm5, xmm8
movdqa xmm6, xmm5
pxor xmm6, xmm2
movdqa xmm7, xmm1
pcmpgtd xmm7, xmm6
pshuflw xmm6, xmm7, 0xe8
pshufhw xmm6, xmm6, 0xe8
pshufd xmm6, xmm6, 0xe8
movdqa xmm7, xmm4
pxor xmm7, xmm2
movdqa xmm3, xmm1
pcmpgtd xmm3, xmm7
pshuflw xmm3, xmm3, 0xe8
pshufhw xmm3, xmm3, 0xe8
pshufd xmm3, xmm3, 0xe8
punpcklqdq xmm3, xmm6
psubd xmm4, xmm0
psubd xmm5, xmm0
pslld xmm5, 0x10
psrad xmm5, 0x10
pslld xmm4, 0x10
psrad xmm4, 0x10
packssdw xmm4, xmm5
pandn xmm3, xmm4
pshufd xmm3, xmm3, 0x4e
pshuflw xmm3, xmm3, 0x1b
pshufhw xmm3, xmm3, 0x1b
movdqu xmmword [rdi], xmm3
add rdi, 0xfffffffffffffff0
add rbx, 0xfffffffffffffff8
jne 0x52c7d3
test r8d, r8d
je 0x52c89a
add rcx, 0xfffffffffffffffe
xor ebx, ebx
movzx edi, word [rcx]
sub edi, eax
cmovb di, bx
mov word [rcx], di
add rcx, 0xfffffffffffffffe
dec edx
jne 0x52c886
mov rdi, qword [r14 + 0x60]
lea rcx, [rdi + rax*2]
lea edx, [rax - 1]
lea rbx, [rdx + 1]
cmp rbx, 8
jae 0x52c8b6
mov edx, eax
jmp 0x52c9a0
mov r8d, eax
and r8d, 7
sub rbx, r8
neg rdx
lea rdx, [r8 + rdx - 1]
lea rcx, [rcx + rdx*2]
mov edx, eax
sub edx, ebx
movd xmm0, eax
pshufd xmm0, xmm0, 0
lea rdi, [rdi + rax*2 - 0x10]
pxor xmm8, xmm8
movdqa xmm2, xmmword [0x00801c20]
movdqa xmm1, xmm0
pxor xmm1, xmm2
movdqu xmm4, xmmword [rdi]
pshufd xmm4, xmm4, 0x4e
pshuflw xmm4, xmm4, 0x1b
pshufhw xmm5, xmm4, 0x1b
movdqa xmm4, xmm5
punpcklwd xmm4, xmm8
punpckhwd xmm5, xmm8
movdqa xmm6, xmm5
pxor xmm6, xmm2
movdqa xmm7, xmm1
pcmpgtd xmm7, xmm6
pshuflw xmm6, xmm7, 0xe8
pshufhw xmm6, xmm6, 0xe8
pshufd xmm6, xmm6, 0xe8
movdqa xmm7, xmm4
pxor xmm7, xmm2
movdqa xmm3, xmm1
pcmpgtd xmm3, xmm7
pshuflw xmm3, xmm3, 0xe8
pshufhw xmm3, xmm3, 0xe8
pshufd xmm3, xmm3, 0xe8
punpcklqdq xmm3, xmm6
psubd xmm4, xmm0
psubd xmm5, xmm0
pslld xmm5, 0x10
psrad xmm5, 0x10
pslld xmm4, 0x10
psrad xmm4, 0x10
packssdw xmm4, xmm5
pandn xmm3, xmm4
pshufd xmm3, xmm3, 0x4e
pshuflw xmm3, xmm3, 0x1b
pshufhw xmm3, xmm3, 0x1b
movdqu xmmword [rdi], xmm3
add rdi, 0xfffffffffffffff0
add rbx, 0xfffffffffffffff8
jne 0x52c8f3
test r8d, r8d
je 0x52c9ba
add rcx, 0xfffffffffffffffe
xor ebx, ebx
movzx edi, word [rcx]
sub edi, eax
cmovb di, bx
mov word [rcx], di
add rcx, 0xfffffffffffffffe
dec edx
jne 0x52c9a6
mov dword [r14 + 0x1704], 0
mov dword [r14 + 0xac], r15d
movsxd rax, r15d
shl rax, 4
lea rcx, [0x0095d4f0]
movzx edx, word [rax + rcx + 2]
mov dword [r14 + 0xa8], edx
movzx edx, word [rax + rcx]
mov dword [r14 + 0xb4], edx
movzx edx, word [rax + rcx + 4]
mov dword [r14 + 0xb8], edx
movzx eax, word [rax + rcx + 6]
mov dword [r14 + 0xa4], eax
mov dword [r14 + 0xb0], r12d
xor edi, edi
jmp 0x52c62f