Function at 0x140372520
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x78
mov rsi, rdx
mov rbx, rcx
mov eax, dword [rcx]
mov ecx, eax
and cl, 0xdf
cmp cl, 0x82
je 0x14037283e
cmp cl, 0x80
je 0x140372551
mov ebp, 0xffffdf80
jmp 0x14037286b
mov r15, qword [rbx + 0x10]
mov qword [rsp + 0x20], r15
and eax, 0xdf
mov ebp, 0xffffd800
cmp eax, 0x80
jne 0x14037286b
add r15, qword [rbx + 8]
lea rcx, [rsp + 0x20]
lea r8, [rsp + 0x28]
mov rdx, r15
mov r9d, 6
call fcn.1404988c0
test eax, eax
jne 0x140372809
cmp qword [rsp + 0x28], 8
jne 0x140372547
mov r14, qword [rsp + 0x20]
lea rax, [fcn.1401e93f0]
mov ecx, eax
and ecx, 1
inc ecx
xor edx, edx
xor ecx, eax
sete dl
movzx eax, byte [0x1406466f4]
bt eax, edx
jb 0x1403726de
mov al, byte [0x1406466f4]
lea rdx, [fcn.1401e93f0]
mov ebp, edx
and ebp, 1
inc ebp
mov ecx, edx
xor ecx, ebp
sete cl
xor cl, 7
mov bl, 1
shl bl, cl
or bl, al
lock cmpxchg byte [0x1406466f4], bl
jne 0x1403725d9
lea rcx, [fcn.1401e93f0]
mov edx, ecx
and edx, 1
inc edx
xor edx, ecx
sete cl
xor cl, 7
movzx ecx, cl
movzx eax, al
bt eax, ecx
jae 0x14037263c
lea rax, [fcn.1401e93f0]
mov ecx, eax
and ecx, 1
inc ecx
xor edx, edx
mov ebp, eax
xor ebp, ecx
sete dl
movzx ebp, byte [0x1406466f4]
bt ebp, edx
jae 0x140372622
jmp 0x1403726de
lea rax, [fcn.1401e93f0]
mov ecx, eax
and ecx, 1
inc ecx
xor edx, edx
xor ecx, eax
sete dl
mov eax, 0xae8b9b10
add rdx, rax
add rdx, 0x888
mov eax, edx
and al, 7
movzx eax, al
movzx ecx, byte [0x1406466f4]
bt ecx, eax
jb 0x1403726be
lea rbp, [0x1406466e5]
xor eax, eax
mov ebx, dword [rbp]
xor ebx, edx
mov edi, edx
mov ecx, eax
shl edi, cl
xor cl, 0x1f
shr edx, cl
mov dword [rbp], ebx
or edx, edi
not ebx
imul edx, ebx
add rbp, 4
inc eax
cmp eax, 3
jne 0x14037267c
lea rax, [fcn.1401e93f0]
mov ecx, eax
and ecx, 1
inc ecx
xor ecx, eax
sete cl
mov al, 1
shl al, cl
or byte [0x1406466f4], al
lea rax, [fcn.1401e93f0]
mov ecx, eax
and ecx, 1
inc ecx
xor ecx, eax
sete cl
xor cl, 7
mov al, 0xfe
rol al, cl
and byte [0x1406466f4], al
lea rcx, [0x1406466e5]
mov ebx, 8
mov r8d, 8
mov rdx, r14
call fcn.1401ff280
mov ebp, 0xffffdf80
test eax, eax
jne 0x14037286b
mov dword [rsp + 0x30], 6
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x40], r14
lea r8, [rsp + 0x28]
mov rax, qword [r8]
lea rcx, [rsp + 0x20]
add qword [rcx], rax
mov rdx, r15
mov r9d, 0xa0
call fcn.1404988c0
test eax, eax
jne 0x140372809
mov rax, qword [rsp + 0x20]
add rax, qword [rsp + 0x28]
mov ebp, 0xffffda9a
cmp r15, rax
jne 0x14037286b
lea rcx, [rsp + 0x20]
lea r8, [rsp + 0x28]
mov rdx, r15
mov r9d, 0x30
call fcn.1404988c0
test eax, eax
jne 0x140372809
mov rax, qword [rsp + 0x20]
add rax, qword [rsp + 0x28]
cmp r15, rax
jne 0x14037286b
lea rcx, [rsp + 0x20]
lea r8, [rsp + 0x28]
mov rdx, r15
mov r9d, 6
call fcn.1404988c0
test eax, eax
jne 0x140372809
mov dword [rsp + 0x48], 6
lea rcx, [rsp + 0x20]
mov rax, qword [rcx]
mov qword [rsp + 0x58], rax
lea r8, [rsp + 0x28]
mov rdx, qword [r8]
mov qword [rsp + 0x50], rdx
add rax, rdx
mov qword [rcx], rax
mov rdx, r15
mov r9d, 4
call fcn.1404988c0
test eax, eax
jne 0x140372809
mov dword [rsp + 0x60], 4
mov rax, qword [rsp + 0x20]
mov qword [rsp + 0x70], rax
mov rcx, qword [rsp + 0x28]
mov qword [rsp + 0x68], rcx
add rax, rcx
mov qword [rsp + 0x20], rax
cmp rax, r15
je 0x140372812
jmp 0x14037286b
add eax, 0xffffdb00
mov ebp, eax
jne 0x14037286b
xor ebp, ebp
mov r8d, 0x50
mov rcx, rsi
xor edx, edx
call fcn.1401ee070
mov dword [rsi], 0
add rsi, 8
lea rdx, [rsp + 0x30]
mov r8d, 0x48
mov rcx, rsi
jmp 0x140372866
xor ebp, ebp
mov r8d, 0x50
mov rcx, rsi
xor edx, edx
call fcn.1401ee070
mov dword [rsi], 2
add rsi, 8
mov r8d, 0x18
mov rcx, rsi
mov rdx, rbx
call fcn.1401fed70
mov eax, ebp
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret