Function at 0x2021d4e0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x20
mov eax, 0x136d98de
mov r8d, dword [0x20560dd4]
add r8d, eax
cmp ecx, r8d
jne 0x2021d529
test edx, edx
je 0x2021d575
mov eax, dword [0x205b4760]
mov ecx, dword [0x20560dd4]
neg ecx
add ecx, eax
inc ecx
imul ecx, eax
test cl, 1
jne 0x2021d7a0
jmp 0x2021d785
add eax, dword [0x20560dd4]
cmp edx, eax
jne 0x2021d547
mov eax, dword [0x205b4764]
cmp eax, 0x2c
jle 0x2021d84c
jmp 0x2021d85e
movzx eax, byte [0x2055eff3]
cmp al, 0x99
je 0x2021d5f4
mov cl, 0x81
nop dword [rax + rax]
mov al, 0x72
lock cmpxchg byte [0x2055eff3], cl
je 0x2021d58f
cmp al, 0x99
jne 0x2021d560
jmp 0x2021d5f4
mov eax, dword [0x205b4760]
lea ecx, [rax + 1]
imul ecx, eax
test cl, 1
jne 0x2021d635
jmp 0x2021d628
xor eax, eax
lea rcx, [0x2055eff0]
lea rdx, [0x204770d0]
nop
movzx r8d, byte [rax + rdx]
add byte [rax + rcx], r8b
lea r8d, [rax + 1]
cmp r8d, 2
jg 0x2021d5b8
inc rax
jmp 0x2021d5a0
xor eax, eax
nop word [rax + rax]
mov ecx, dword [0x205b4764]
cmp ecx, 0x38
jg 0x2021d5cf
test al, al
je 0x2021d5dc
mov ecx, dword [0x205b4764]
cmp ecx, 0x1b
jge 0x2021d5c0
jmp 0x2021d5cb
movzx eax, byte [0x20560dd0]
mov ecx, eax
xor cl, 0x44
and al, 0x44
add al, al
add al, cl
xchg byte [0x2055eff3], al
xor eax, eax
nop word cs:[rax + rax]
test al, al
jne 0x2021d60f
mov ecx, dword [0x205b4764]
cmp ecx, 0x12
jle 0x2021d61c
mov ecx, dword [0x205b4764]
cmp ecx, 0x28
jge 0x2021d600
jmp 0x2021d604
lea rax, [0x2055eff0]
jmp 0x2021d776
movzx eax, byte [0x2055efbe]
xor ecx, ecx
test cl, cl
je 0x2021d63e
movzx eax, byte [0x2055efbe]
jmp 0x2021d628
cmp al, 0xd
je 0x2021d76f
mov cl, 7
nop dword [rax + rax]
mov al, 0x95
lock cmpxchg byte [0x2055efbe], cl
je 0x2021d670
cmp al, 0xd
jne 0x2021d650
jmp 0x2021d76f
mov eax, dword [0x20560dd4]
mov ecx, eax
xor ecx, 0x136d98de
and eax, 0x136d98de
add eax, eax
add eax, ecx
je 0x2021d69a
mov eax, dword [0x205b4760]
lea ecx, [rax - 1]
imul ecx, eax
test cl, 1
jne 0x2021d670
mov eax, dword [0x205b4760]
lea ecx, [rax + 1]
imul ecx, eax
test cl, 1
jne 0x2021d689
mov edi, 0xffffffff
mov ebx, 1
xor r14d, r14d
lea r15, [0x2055efb0]
lea r12, [0x20477090]
lea rsi, [0x20223680]
nop dword [rax]
mov eax, dword [0x205b4764]
cmp eax, 0x18
jg 0x2021d709
nop dword [rax + rax]
movzx eax, byte [r14 + r15]
movzx ecx, byte [r14 + r12]
mov edx, eax
xor dl, cl
and al, cl
add al, al
add al, dl
mov byte [r14 + r15], al
mov eax, dword [0x205b4760]
lea ecx, [rax - 1]
imul ecx, eax
test cl, 1
je 0x2021d750
movzx ebp, byte [r14 + r15]
mov ecx, 0xa
call fcn.20407ac4
mov qword [0x205b4718], rax
mov rcx, rsi
call fcn.20427ec0
movzx ecx, byte [r14 + r12]
shl bpl, cl
shl bpl, cl
sub cl, bpl
mov eax, ebp
shl al, cl
mov edx, ebp
mov ecx, eax
shl dl, cl
add dl, bpl
mov byte [r14 + r15], dl
jmp 0x2021d6e0
lea eax, [r14 + 1]
cmp eax, 0xd
jg 0x2021d767
add edi, 3
add ebx, 0xfffffffd
inc r14
jmp 0x2021d6d0
mov al, 0xd
xchg byte [0x2055efbe], al
lea rax, [0x2055efb0]
add rsp, 0x20
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
movzx eax, byte [0x2055ecef]
mov cl, 1
test cl, cl
jne 0x2021d7cb
nop word cs:[rax + rax]
movzx eax, byte [0x2055ecef]
mov eax, dword [0x205b4760]
mov ecx, dword [0x20560dd4]
mov edx, eax
sub edx, ecx
inc edx
imul edx, eax
and edx, 1
add ecx, 0x136d98de
cmp edx, ecx
jne 0x2021d7a0
jmp 0x2021d785
movzx ecx, byte [0x20560dd0]
mov edx, ecx
xor dl, 0x10
and cl, 0x10
add cl, cl
add cl, dl
cmp al, cl
je 0x2021d840
mov cl, 0xc6
nop word cs:[rax + rax]
mov al, 0xe5
lock cmpxchg byte [0x2055ecef], cl
je 0x2021d802
cmp al, 0x65
jne 0x2021d7f0
jmp 0x2021d840
xor eax, eax
lea rcx, [0x2055ecd0]
lea rdx, [0x20476dd0]
nop word cs:[rax + rax]
movzx r8d, byte [rax + rdx]
xor byte [rax + rcx], r8b
lea r8d, [rax + 1]
cmp r8d, 0x1e
jg 0x2021d838
inc rax
jmp 0x2021d820
mov al, 0x65
xchg byte [0x2055ecef], al
lea rax, [0x2055ecd0]
jmp 0x2021d776
movzx eax, byte [0x2055f0cd]
mov ecx, dword [0x205b4764]
cmp ecx, 0x60
jl 0x2021d86d
mov al, 1
movzx ecx, byte [0x2055f0cd]
test al, al
je 0x2021d860
jmp 0x2021d84c
cmp al, 0xbf
je 0x2021d8ee
mov cl, 0xb0
nop word cs:[rax + rax]
mov al, 0x6f
lock cmpxchg byte [0x2055f0cd], cl
je 0x2021d892
cmp al, 0xbf
jne 0x2021d880
jmp 0x2021d8ee
xor edx, edx
lea rax, [0x2055f0c0]
lea rcx, [0x20477190]
nop word cs:[rax + rax]
movsxd rdx, edx
movzx r8d, byte [rdx + rcx]
mov r9d, r8d
xor r9b, r8b
not r9b
and r9b, byte [rdx + rax]
xor r9b, r8b
mov byte [rdx + rax], r9b
mov r8d, edx
xor r8d, 1
and edx, 1
lea edx, [r8 + rdx*2]
cmp edx, 0xd
jl 0x2021d8b0
movzx eax, byte [0x20560dd0]
add al, 0x6a
xchg byte [0x2055f0cd], al
lea rax, [0x2055f0c0]
jmp 0x2021d776