Function at 0x140217990
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov edi, r9d
mov esi, dword [rsp + 0xb0]
test ecx, ecx
je 0x1402179f9
test edx, edx
je 0x140217a44
movzx eax, byte [0x14051cb1c]
movzx ecx, byte [0x14051e608]
mov edx, esi
xor dl, 0x10
mov r8d, edx
xor r8b, cl
and dl, cl
add dl, dl
add dl, r8b
cmp al, dl
je 0x140217c13
mov cl, 0xcd
mov al, 0xff
lock cmpxchg byte [0x14051cb1c], cl
je 0x140217ba4
cmp al, 0xbf
jne 0x1402179e0
jmp 0x140217c13
test edx, edx
je 0x140217b3d
movzx eax, byte [0x14051cd71]
cmp al, 0x8e
je 0x140217c84
mov cl, 0xa3
nop word cs:[rax + rax]
mov al, 0xfd
lock cmpxchg byte [0x14051cd71], cl
je 0x140217c1f
mov edx, esi
xor dl, 0x5f
add dl, byte [0x14051e608]
cmp al, dl
jne 0x140217a20
jmp 0x140217c84
movzx eax, byte [0x14051c8a4]
nop dword [rax + rax]
cmp al, 0xea
je 0x140217b31
movzx ecx, byte [0x14051e608]
mov eax, esi
not al
mov edx, esi
xor dl, 0xf0
and dl, al
mov r8d, eax
and r8b, 0x77
mov eax, esi
and al, 0x88
or al, r8b
add al, 0x63
mov r8d, eax
xor r8b, cl
and al, cl
add al, al
add al, r8b
add al, 0x9d
mov r8d, esi
and r8b, 0xf
or r8b, dl
add r8b, cl
lock cmpxchg byte [0x14051c8a4], r8b
jne 0x140217a50
xor r15d, r15d
mov ebx, edi
xor ebx, 0x2af281bb
mov ebp, esi
xor ebp, 0x32cb357
lea r14, [rsp + 0x40]
lea r12, [0x14051c860]
lea r13, [0x140431680]
xor edi, 0x33f790d8
xor esi, 0x7816dfd7
nop word cs:[rax + rax]
mov ecx, r15d
mov rdx, r14
mov r8d, ebx
mov r9d, ebp
call fcn.1400aa810
mov rax, qword [rsp + 0x40]
movsxd rcx, r15d
movzx r8d, byte [rcx + r13]
mov edx, r8d
xor dl, r8b
not dl
and dl, byte [rax + r12]
xor dl, r8b
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], edi
mov r8d, ecx
mov r9, r14
call fcn.140219070
mov r15d, dword [rsp + 0x40]
test al, 1
je 0x140217ae0
mov al, 0xea
xchg byte [0x14051c8a4], al
lea rax, [0x14051c860]
jmp 0x140217cfb
movzx eax, byte [0x14051c99d]
cmp al, 0x86
je 0x140217cf4
mov bpl, 0x3d
mov ebx, edi
xor ebx, 0xc9513149
mov r15d, esi
xor r15d, 0x7041f0b1
lea r14, [rsp + 0x40]
nop word cs:[rax + rax]
mov al, 0x4f
lock cmpxchg byte [0x14051c99d], bpl
sete dl
mov dword [rsp + 0x20], r15d
mov ecx, eax
mov r8, r14
mov r9d, ebx
call fcn.1400ac800
test al, 1
jne 0x140217c8d
cmp byte [rsp + 0x40], 0x86
jne 0x140217b70
jmp 0x140217cf4
xor ecx, ecx
lea r15, [0x14051cb10]
lea r12, [0x140431920]
mov ebx, edi
xor ebx, 0x44e981d1
mov ebp, esi
xor ebp, 0xfeb6cc3c
lea r14, [rsp + 0x40]
nop dword [rax]
movsxd rcx, ecx
movzx eax, byte [rcx + r12]
mov edx, eax
xor dl, al
not dl
and dl, byte [rcx + r15]
xor dl, al
mov byte [rcx + r15], dl
mov rdx, r14
mov r8d, ebx
mov r9d, ebp
call fcn.1402190a0
mov ecx, dword [rsp + 0x40]
test al, 1
je 0x140217bd0
xor edi, 0x3f0a141
xor esi, 0x13862afc
mov ecx, edi
mov edx, esi
call fcn.1402174a0
lea rax, [0x14051cb10]
jmp 0x140217cfb
xor ebx, ebx
mov ebp, esi
xor ebp, 0xa4305cce
xor esi, 0x9947d568
lea r14, [rsp + 0x3f]
lea r15, [rsp + 0x40]
lea r12, [0x14051cd60]
mov r9d, dword [0x14051e5f8]
add r9d, ebp
xor r9d, edi
mov dword [rsp + 0x20], esi
mov ecx, ebx
mov rdx, r14
mov r8, r15
call fcn.1402197c0
movzx eax, byte [rsp + 0x3f]
mov rcx, qword [rsp + 0x40]
mov byte [rcx + r12], al
mov eax, ebx
xor eax, 1
and ebx, 1
lea ebx, [rax + rbx*2]
cmp ebx, 0x11
jl 0x140217c40
mov al, 0x8e
xchg byte [0x14051cd71], al
lea rax, [0x14051cd60]
jmp 0x140217cfb
xor ecx, ecx
lea r14, [0x14051c990]
xor edi, 0x888eea96
mov ebp, esi
xor ebp, 0x698e2030
lea rbx, [rsp + 0x40]
nop dword [rax]
movsxd rcx, ecx
movzx edx, byte [rcx + r14]
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], edi
mov r8d, ecx
mov r9, rbx
call fcn.140219180
mov ecx, dword [rsp + 0x40]
test al, 1
je 0x140217cb0
mov eax, esi
not al
and al, 0x57
xor sil, 0xa8
or sil, al
not sil
or sil, al
add sil, byte [0x14051e608]
xchg byte [0x14051c99d], sil
lea rax, [0x14051c990]
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret