Function at 0x14012f330
Capabilities:
Encode data using xor

Disassembly:
push rsi
push rbx
mov r8d, dword [rsp + 0x38]
test ecx, ecx
je 0x14012f369
movzx eax, byte [0x140561848]
cmp al, 0x8b
je 0x14012f4c1
mov cl, 0x8a
nop dword [rax]
mov al, 0x52
lock cmpxchg byte [0x140561848], cl
je 0x14012f3fb
cmp al, 0x8b
jne 0x14012f350
jmp 0x14012f4c1
test edx, edx
je 0x14012f4cd
movzx eax, byte [0x140561929]
movzx ecx, byte [0x140561c98]
mov edx, r8d
xor dl, 0x9c
add dl, 0x12
mov r9d, edx
not r9b
mov r10d, r9d
and r10b, cl
mov r11d, edx
xor dl, cl
not cl
and r11b, cl
or r11b, r10b
and cl, r9b
or cl, dl
not cl
add cl, cl
add cl, r11b
add cl, 0xee
cmp al, cl
je 0x14012f60b
nop dword [rax + rax]
movzx ecx, byte [0x140561c98]
lea eax, [rcx + r8]
add al, 0x80
mov edx, r8d
xor dl, 0x21
add dl, cl
add dl, 0x92
mov ecx, edx
xor cl, 0x6e
and dl, 0x6e
add dl, dl
add dl, cl
lock cmpxchg byte [0x140561929], dl
je 0x14012f5b6
cmp al, 0xd9
jne 0x14012f3c0
jmp 0x14012f60b
xor edx, edx
lea rax, [0x140561830]
lea rcx, [0x14048c470]
xor r8d, 0xf98cfca1
nop word cs:[rax + rax]
movsxd rdx, edx
movzx r9d, byte [rdx + rax]
movzx r10d, byte [rdx + rcx]
mov r11d, r10d
not r11b
mov ebx, r9d
and bl, r11b
xor r11b, r9b
not r9b
mov esi, r9d
xor sil, r10b
or bl, sil
not bl
and r9b, r10b
or r9b, r11b
not r9b
or r9b, bl
mov byte [rdx + rax], r9b
mov r9d, edx
not r9d
mov r10d, edx
mov r11d, edx
xor edx, 0x7ffffffe
and edx, r9d
and r9d, 1
and r10d, 0xfffffffe
or r10d, r9d
xor r11d, 1
or edx, r11d
not edx
add edx, edx
mov r9d, r10d
xor r9d, edx
not r10d
not edx
and edx, r10d
or edx, r9d
not edx
lea edx, [r9 + rdx*2]
mov r9d, dword [0x140561c9c]
mov r10d, r8d
xor r10d, r9d
and r9d, r8d
lea r9d, [r10 + r9*2]
cmp edx, r9d
jl 0x14012f420
mov al, 0x8b
xchg byte [0x140561848], al
lea rax, [0x140561830]
jmp 0x14012f623
movzx eax, byte [0x1405618a3]
nop word cs:[rax + rax]
cmp al, 0xc7
je 0x14012f61c
movzx ecx, byte [0x140561c98]
mov edx, r8d
not dl
mov eax, r8d
or al, 0xea
mov r9d, eax
not r9b
mov r10d, r8d
xor r10b, 0x15
and r10b, r8b
xor al, r9b
and al, r10b
xor al, r9b
and r9b, r10b
or al, r9b
add al, 3
mov r9d, eax
xor r9b, cl
and al, cl
add al, al
add al, r9b
mov r9d, eax
xor r9b, 0xfd
and al, 0x7d
add al, al
add al, r9b
mov r9d, r8d
xor r9b, 0x10
and dl, 0xef
or r9b, dl
not r9b
or r9b, dl
add r9b, cl
lock cmpxchg byte [0x1405618a3], r9b
jne 0x14012f4e0
xor eax, eax
lea rcx, [0x1405618a0]
lea rdx, [0x14048c4d0]
xor r8d, 0xf98cfc54
nop dword [rax]
movzx r9d, byte [rax + rcx]
movzx r10d, byte [rax + rdx]
mov r11d, r9d
not r11b
mov ebx, r10d
not bl
xor r9b, bl
xor bl, r11b
and bl, r10b
and r11b, r10b
or r11b, r9b
not r11b
or r11b, bl
mov byte [rax + rcx], r11b
lea r9d, [rax + 1]
mov r10d, dword [0x140561c9c]
add r10d, r8d
cmp r9d, r10d
jge 0x14012f614
inc rax
jmp 0x14012f570
xor edx, edx
lea rax, [0x140561910]
lea rcx, [0x14048c540]
nop word cs:[rax + rax]
movsxd rdx, edx
movzx r8d, byte [rdx + rax]
movzx r9d, byte [rdx + rcx]
mov r10d, r8d
xor r10b, r9b
and r8b, r9b
add r8b, r8b
add r8b, r10b
mov byte [rdx + rax], r8b
mov r8d, edx
xor r8d, 1
and edx, 1
lea edx, [r8 + rdx*2]
cmp edx, 0x19
jl 0x14012f5d0
mov al, 0xd9
xchg byte [0x140561929], al
lea rax, [0x140561910]
jmp 0x14012f623
mov al, 0xc7
xchg byte [0x1405618a3], al
lea rax, [0x1405618a0]
pop rbx
pop rsi
ret