Function at 0x51b750
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x88
mov rdi, r8
mov rbx, rdx
mov rsi, rcx
cmp r8, 0xe
jne 0x51b861
movabs rax, 0x5f6c616d69636544
xor rax, qword [rbx]
movabs rcx, 0x7265626d754e5f6c
xor rcx, qword [rbx + 6]
or rcx, rax
jne 0x51b96f
movzx eax, byte [0x009bf181]
mov rcx, qword [0x009bf100]
test rcx, rcx
jne 0x51b7c5
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x51bd64
mov rcx, rax
mov qword [0x009bf100], rax
mov r8d, 0x200
xor edx, edx
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x51bd64
lea rdx, str.anyassignedascii0z
lea rcx, [0x008c93e0]
cmp rax, rdx
jae 0x51bb33
mov rdx, rax
add rdx, 0x200
cmp rdx, rcx
jbe 0x51bb33
xor edx, edx
nop word [rax + rax]
mov r8d, dword [rcx + rdx*8]
mov r9d, dword [rcx + rdx*8 + 4]
cmp r8d, r9d
mov r10d, r9d
cmovb r10d, r8d
cmova r9d, r8d
mov dword [rax + rdx*8], r10d
mov dword [rax + rdx*8 + 4], r9d
mov r8d, dword [rcx + rdx*8 + 8]
mov r9d, dword [rcx + rdx*8 + 0xc]
cmp r8d, r9d
mov r10d, r9d
cmovb r10d, r8d
cmova r9d, r8d
mov dword [rax + rdx*8 + 8], r10d
mov dword [rax + rdx*8 + 0xc], r9d
add rdx, 2
cmp rdx, 0x40
jne 0x51b810
jmp 0x51bb99
cmp rdi, 3
je 0x51b8de
cmp rdi, 8
je 0x51b95c
cmp rdi, 5
jne 0x51b96f
mov eax, 0x49435341
xor eax, dword [rbx]
movzx ecx, byte [rbx + 4]
xor ecx, 0x49
or ecx, eax
jne 0x51b96f
movzx eax, byte [0x009bf181]
mov rcx, qword [0x009bf100]
test rcx, rcx
jne 0x51b8bc
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x51bd84
mov rcx, rax
mov qword [0x009bf100], rax
mov r8d, 8
xor edx, edx
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x51bd84
movabs rcx, 0x7f00000000
jmp 0x51b93d
movzx eax, word [rbx]
xor eax, 0x6e41
movzx ecx, byte [rbx + 2]
xor ecx, 0x79
or cx, ax
jne 0x51b96f
movzx eax, byte [0x009bf181]
mov rcx, qword [0x009bf100]
test rcx, rcx
jne 0x51b91d
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x51bd84
mov rcx, rax
mov qword [0x009bf100], rax
mov r8d, 8
xor edx, edx
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x51bd84
movabs rcx, 0x10ffff00000000
mov qword [rax], rcx
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], 1
mov qword [rsp + 0x30], 1
jmp 0x51bbb0
movabs rax, 0x64656e6769737341
cmp qword [rbx], rax
je 0x51bc64
mov qword [rsp + 0x68], rsi
mov r15d, 0x25
xor r13d, r13d
lea r14, [0x008e1ed8]
mov r12d, 0x25
jmp 0x51b99c
mov r12, r15
sub r15, r13
jbe 0x51bc14
shr r15, 1
add r15, r13
mov rsi, r15
shl rsi, 5
mov rcx, qword [rsi + r14]
mov r8, qword [rsi + r14 + 8]
mov rbp, r8
sub rbp, rdi
cmovae r8, rdi
mov rdx, rbx
call sub.msvcrt.dll_memcmp
cdqe
test eax, eax
cmovne rbp, rax
xor eax, eax
test rbp, rbp
setne al
mov ecx, 0xff
cmovs eax, ecx
cmp al, 1
je 0x51b990
movzx eax, al
cmp eax, 0xff
jne 0x51b9fd
inc r15
mov r13, r15
mov r15, r12
sub r15, r13
ja 0x51b99c
jmp 0x51bc14
mov rbx, qword [rsi + r14 + 0x18]
test rbx, rbx
je 0x51bbbf
mov r14, qword [rsi + r14 + 0x10]
lea rdi, [rbx*8]
movzx eax, byte [0x009bf181]
mov rcx, qword [0x009bf100]
test rcx, rcx
jne 0x51ba43
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x51bd75
mov rcx, rax
mov qword [0x009bf100], rax
xor edx, edx
mov r8, rdi
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x51bd75
cmp rbx, 0x14
jb 0x51baa0
lea rdx, [rax + rbx*8]
add rdx, 0xfffffffffffffff8
xor ecx, ecx
cmp rdx, rax
jb 0x51baa2
lea rdx, [rax + 4]
lea r8, [rax + rbx*8]
add r8, 0xfffffffffffffffc
cmp r8, rdx
jb 0x51baa2
lea rdx, [rbx - 1]
shr rdx, 0x3d
jne 0x51baa2
lea rcx, [r14 + rbx*8]
cmp rax, rcx
jae 0x51bce2
lea rcx, [rax + rbx*8]
cmp r14, rcx
jae 0x51bce2
xor ecx, ecx
mov rdx, rcx
or rdx, 1
test bl, 1
je 0x51bad1
mov r8d, dword [r14 + rcx*8]
mov r9d, dword [r14 + rcx*8 + 4]
cmp r8d, r9d
mov r10d, r9d
cmovb r10d, r8d
cmova r9d, r8d
mov dword [rax + rcx*8], r10d
mov dword [rax + rcx*8 + 4], r9d
mov rcx, rdx
cmp rbx, rdx
je 0x51bb2b
nop word cs:[rax + rax]
mov edx, dword [r14 + rcx*8]
mov r8d, dword [r14 + rcx*8 + 4]
cmp edx, r8d
mov r9d, r8d
cmovb r9d, edx
cmova r8d, edx
mov dword [rax + rcx*8], r9d
mov dword [rax + rcx*8 + 4], r8d
mov edx, dword [r14 + rcx*8 + 8]
mov r8d, dword [r14 + rcx*8 + 0xc]
cmp edx, r8d
mov r9d, r8d
cmovb r9d, edx
cmova r8d, edx
mov dword [rax + rcx*8 + 8], r9d
mov dword [rax + rcx*8 + 0xc], r8d
add rcx, 2
cmp rbx, rcx
jne 0x51bae0
mov rcx, rbx
jmp 0x51bbc6
xor edx, edx
movdqa xmm0, xmmword [0x0086e770]
nop dword [rax]
movdqu xmm1, xmmword [rdx + rcx]
pshufd xmm2, xmm1, 0xe8
pshufd xmm1, xmm1, 0xed
movdqa xmm3, xmm2
pxor xmm3, xmm0
movdqa xmm4, xmm1
pxor xmm4, xmm0
pcmpgtd xmm4, xmm3
movdqa xmm3, xmm4
pandn xmm3, xmm1
movdqa xmm5, xmm4
pandn xmm5, xmm2
pand xmm2, xmm4
por xmm2, xmm3
pand xmm4, xmm1
por xmm4, xmm5
punpckldq xmm2, xmm4
movdqu xmmword [rax + rdx], xmm2
add rdx, 0x10
cmp rdx, 0x200
jne 0x51bb40
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], 0x40
mov qword [rsp + 0x30], 0x40
lea rdx, [rsp + 0x20]
mov rcx, rsi
call fcn.00507780
jmp 0x51bc20
mov eax, 4
xor ecx, ecx
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rcx
lea rcx, [rsp + 0x20]
lea rdx, [rsp + 0x48]
call fcn.00507780
movups xmm0, xmmword [rsp + 0x20]
movaps xmmword [rsp + 0x70], xmm0
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x80], rax
movzx eax, byte [rsp + 0x38]
mov ecx, dword [rsp + 0x39]
mov dword [rsp + 0x40], ecx
mov ecx, dword [rsp + 0x3c]
mov dword [rsp + 0x43], ecx
cmp al, 2
jne 0x51bc34
mov rax, qword [rsp + 0x68]
mov byte [rax], 1
mov byte [rax + 0x18], 2
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [rsp + 0x80]
mov r8, qword [rsp + 0x68]
mov qword [r8 + 0x10], rcx
movaps xmm0, xmmword [rsp + 0x70]
movups xmmword [r8], xmm0
mov ecx, dword [rsp + 0x40]
mov edx, dword [rsp + 0x43]
mov dword [r8 + 0x19], ecx
mov dword [r8 + 0x1c], edx
mov byte [r8 + 0x18], al
jmp 0x51bc20
lea rdx, [0x008cc7ad]
lea rcx, [rsp + 0x20]
mov r8d, 0xa
call fcn.0051b750
movzx eax, byte [rsp + 0x20]
movzx ecx, byte [rsp + 0x38]
cmp cl, 2
jne 0x51bc92
mov byte [rsi], al
mov byte [rsi + 0x18], 2
jmp 0x51bc20
mov rdx, qword [rsp + 0x30]
mov qword [rsp + 0x58], rdx
movups xmm0, xmmword [rsp + 0x21]
movups xmmword [rsp + 0x49], xmm0
mov edx, dword [rsp + 0x39]
mov dword [rsp + 0x61], edx
mov edx, dword [rsp + 0x3c]
mov dword [rsp + 0x64], edx
mov byte [rsp + 0x48], al
mov byte [rsp + 0x60], cl
lea rcx, [rsp + 0x48]
call fcn.0050b4a0
movdqu xmm0, xmmword [rsp + 0x48]
movdqu xmm1, xmmword [rsp + 0x58]
movdqu xmmword [rsi + 0x10], xmm1
movdqu xmmword [rsi], xmm0
jmp 0x51bc20
mov rcx, rbx
and rcx, 0xfffffffffffffffe
xor edx, edx
movdqa xmm0, xmmword [0x0086e770]
nop word cs:[rax + rax]
movdqu xmm1, xmmword [r14 + rdx*8]
pshufd xmm2, xmm1, 0xe8
pshufd xmm1, xmm1, 0xed
movdqa xmm3, xmm2
pxor xmm3, xmm0
movdqa xmm4, xmm1
pxor xmm4, xmm0
pcmpgtd xmm4, xmm3
movdqa xmm3, xmm4
pandn xmm3, xmm1
movdqa xmm5, xmm4
pandn xmm5, xmm2
pand xmm2, xmm4
por xmm2, xmm3
pand xmm4, xmm1
por xmm4, xmm5
punpckldq xmm2, xmm4
movdqu xmmword [rax + rdx*8], xmm2
add rdx, 2
cmp rcx, rdx
jne 0x51bd00
cmp rbx, rcx
je 0x51bb2b
jmp 0x51baa2
mov ecx, 4
mov edx, 0x200
call fcn.0044dfd0
ud2
mov ecx, 4
mov rdx, rdi
call fcn.0044dfd0
ud2
mov ecx, 4
mov edx, 8
call fcn.0044dfd0
ud2