Function at 0x1401b8790
Capabilities:
Encode data using xor

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x20
mov rsi, rcx
mov eax, edx
not eax
mov ecx, edx
xor ecx, 0xfffffff0
and eax, 0xf
mov r8d, ecx
and r8d, eax
or eax, ecx
or eax, r8d
cmp eax, 0xffffffef
jne 0x1401b87d7
cmp edx, 0x1f
je 0x1401b88ea
cmp edx, 0x10
jne 0x1401b88f9
mov edi, 0xfffffff1
mov eax, 0x100
jmp 0x1401b8ab0
lea eax, [rdx - 0xd]
cmp eax, 2
ja 0x1401b8800
cmp edx, 0xe
je 0x1401b892b
cmp edx, 0xf
jne 0x1401b893a
mov edi, 0xf
mov eax, 0x80
jmp 0x1401b8ab0
lea ecx, [rdx - 9]
jmp 0x1401b8816
mov eax, dword [0x140405414]
mov eax, dword [0x140531be8]
lea r8d, [rax - 1]
imul r8d, eax
test r8b, 1
jne 0x1401b8810
movsxd rax, dword [0x140405414]
mov r8d, dword [0x140531bec]
cmp r8d, 0x40
jge 0x1401b8810
mov r8b, 1
nop word cs:[rax + rax]
mov r9d, dword [0x140531bec]
cmp r9d, 0x39
jg 0x1401b886a
mov r9d, dword [0x140531bec]
cmp r9d, 0x4b
jle 0x1401b8871
test r8b, r8b
je 0x1401b8850
jmp 0x1401b885d
lea r8, [0x140405414]
add rax, r8
nop dword [rax + rax]
test rsi, rsi
je 0x1401b889a
mov r8d, dword [0x140531be8]
lea r9d, [r8 - 1]
imul r9d, r8d
test r9b, 1
je 0x1401b88a9
mov r8d, dword [0x140531bec]
cmp r8d, 0x15
jge 0x1401b8880
jmp 0x1401b8885
mov r10d, dword [0x140405410]
cmp ecx, 4
jae 0x1401b8908
add edx, 0x15706cd7
mov eax, edx
xor eax, 0xfffffff6
and edx, 0x7ffffff6
add edx, edx
mov r8d, eax
xor r8d, edx
and edx, eax
xor eax, eax
cmp ecx, 4
lea edi, [r8 + rdx*2 - 0x15706cd7]
cmovae edi, eax
mov eax, 0x8000
jmp 0x1401b8ab0
mov edi, 0xf
mov eax, 0x100
jmp 0x1401b8ab0
add edx, 0xffffffe8
mov eax, 0x100
mov edi, edx
jmp 0x1401b8ab0
mov ecx, dword [0x1404e4940]
lea r8d, [rcx + 1]
mov dword [0x1404e4940], r8d
xor r8d, ecx
not r8d
xor edi, edi
test r8d, ecx
je 0x1401b8946
xor r9d, r9d
jmp 0x1401b8983
mov edi, 1
mov eax, 0x80
jmp 0x1401b8ab0
xor edi, edi
mov eax, 0x80
jmp 0x1401b8ab0
xor r11d, r11d
xor r9d, r9d
test r10d, r10d
jle 0x1401b8983
nop word cs:[rax + rax]
movsxd r11, r11d
xor r9, qword [rax + r11]
neg r11d
mov ebx, r11d
xor ebx, 0xfffffff8
and r11d, 0x7ffffff8
lea r11d, [rbx + r11*2]
neg r11d
cmp r11d, r10d
jl 0x1401b8960
mov eax, 0x20
cmp edx, 8
je 0x1401b8ab0
mov eax, edx
xor eax, 3
and eax, edx
cmp eax, 4
jne 0x1401b8a85
mov eax, edx
and eax, 0xfffffffc
xor r10d, r10d
test r8d, ecx
setne r10b
lea r8, [r10 - 1]
movabs r11, 0x3a47add43ce47d2d
mov rcx, r11
sub rcx, r9
sub rcx, r11
add rcx, qword [0x140405418]
neg r10
xor r10, rcx
mov r9, rcx
xor r9, r8
not r10
and rcx, r8
or rcx, r10
not rcx
or rcx, r9
not rcx
mov r8d, dword [0x140531be8]
lea r9d, [r8 + 1]
jmp 0x1401b8a15
mov r8d, dword [0x140531be8]
lea r9d, [r8 - 1]
mov dword [0x140531bec], 0x46
imul r9d, r8d
test r9b, 1
jne 0x1401b8a00
mov r8d, dword [0x140531bec]
cmp r8d, 0x3d
jge 0x1401b8a00
mov r8, rcx
shr r8, 0x20
mov r9d, dword [0x140531bec]
or r8d, ecx
lea rcx, [fcn.1401b8790]
add ecx, ecx
add ecx, 0x2660
mov r9d, ecx
not r9d
nop word cs:[rax + rax]
test r9d, ecx
jne 0x1401b8a60
add r8d, dword [0x1405316a8]
mov dword [0x1405316a8], r8d
add edx, 0xfffffffa
xor edi, edi
cmp eax, 4
cmove edi, edx
mov eax, 0x4000
jmp 0x1401b8ab0
neg edx
mov eax, edx
xor eax, 1
and edx, 1
lea eax, [rax + rdx*2]
mov ecx, dword [0x1405316a8]
sub ecx, eax
xor edi, edi
cmp ecx, 3
setb dil
mov eax, edi
shl eax, 5
add eax, 0x20
neg edi
or edi, 1
mov rcx, qword [rsi + 8]
mov edx, eax
call fcn.140165de0
mov rcx, qword [rsi + 0x10]
mov edx, edi
add rsp, 0x20
pop rbx
pop rdi
pop rsi
jmp fcn.140165d40