Function at 0x14009d8d4
Capabilities:
Encode data using xor

Disassembly:
push rbp
mov rbp, rsp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x58
mov rax, qword [0x14017dc20]
test rax, rax
je 0x14009ddd1
mov r15, qword [0x14017dc20]
xor eax, eax
test byte [r15], 1
mov qword [rsp + 0x48], r15
mov qword [rbp + 0x10], rax
je 0x14009dd55
xor r13d, r13d
mov qword [rsp + 0x20], r13
cmp dword [r15 + 4], eax
jbe 0x14009dd55
lea rsi, [r15 + 0xc]
lea r11, [0x140000000]
mov edi, 0x7fffffff
mov qword [rsp + 0x28], rsi
mov r14d, 0x9d690795
mov r10d, dword [rsi]
mov r8d, dword [rsi + 4]
mov rax, qword [0x14010bb18]
shr r10, 1
mov rcx, r11
and r8d, 0xfffffff
and r10d, 0xfffffff
add r10, r11
sub rcx, rax
mov qword [rbp + 0x28], rcx
jne 0x14009d9f3
xor r11d, r11d
test r8, r8
je 0x14009dd2c
mov eax, dword [rbp + 0x14]
mov r9d, dword [rbp + 0x10]
movzx ecx, byte [r11 + r10]
inc r11
sub ecx, 0x6296f86b
add r9d, ecx
add ecx, eax
mov eax, ecx
ror ecx, 5
imul eax, eax, 0x273c
rol eax, 5
xor eax, ecx
imul rax, r14
mov qword [rbp + 0x18], rax
shr rax, 0x20
add eax, dword [rbp + 0x18]
imul rax, r14
mov qword [rbp + 0x18], rax
mov ecx, dword [rbp + 0x18]
shr rax, 0x20
lea edx, [rcx - 0x7fffffff]
sar ecx, 0x1f
lea edx, [rdx + rax*2]
and ecx, edi
sub edx, ecx
mov eax, edx
sar eax, 0x1f
and eax, edi
add eax, edx
add r9d, eax
cmp r11, r8
jb 0x14009d985
mov dword [rbp + 0x14], eax
mov dword [rbp + 0x10], r9d
jmp 0x14009dd2c
movsxd rdx, dword [0x14000003c]
lea rax, [r10 + r8]
mov qword [rsp + 0x40], rax
lea rax, [0x1400000b0]
add rdx, rax
mov eax, r10d
mov r14d, dword [rdx + 4]
sub eax, r11d
lea rsi, [rax + r8]
mov r8d, dword [rdx]
mov r9d, eax
mov rdi, rsi
and r9, 0xfffffffffffff000
mov ebx, eax
and rdi, 0xfffffffffffff000
add r8, r11
sub rbx, r9
sub rsi, rdi
mov qword [rsp + 0x30], rdi
add r14, r8
mov qword [rsp + 0x38], rsi
jmp 0x14009da5b
mov eax, dword [r8]
cmp rax, r9
jae 0x14009da60
mov eax, dword [r8 + 4]
add r8, rax
cmp r8, r14
jne 0x14009da4c
xor r11d, r11d
cmp r8, r14
je 0x14009da9a
mov eax, dword [r8]
cmp rax, r9
jne 0x14009da9a
mov ecx, dword [r8 + 4]
sub rcx, 8
shr rcx, 1
je 0x14009da9a
lea rdx, [r8 + 8]
movzx eax, word [rdx]
and eax, 0xfff
cmp rax, rbx
jae 0x14009da9a
inc r11
add rdx, 2
cmp r11, rcx
jne 0x14009da81
mov ebx, dword [rbp + 0x14]
mov r12d, dword [rbp + 0x10]
mov r15, qword [rbp + 0x28]
cmp r8, r14
je 0x14009dc9c
mov eax, dword [r8]
cmp rax, rdi
ja 0x14009dc9c
mov ecx, dword [r8 + 4]
lea rax, [rcx - 8]
shr rax, 1
cmp r11, rax
jne 0x14009dae7
add r8, rcx
cmp r8, r14
je 0x14009dc9c
mov eax, dword [r8]
cmp rax, rdi
ja 0x14009dc9c
xor r11d, r11d
jmp 0x14009daba
mov eax, dword [r8]
cmp rax, rdi
jne 0x14009db03
movzx eax, word [r8 + r11*2 + 8]
and eax, 0xfff
cmp rax, rsi
jae 0x14009dc9c
mov rax, r11
mov ecx, 0xf000
inc r11
test word [r8 + rax*2 + 8], cx
je 0x14009daa5
movzx r9d, word [r8 + rax*2 + 8]
lea rax, [0x140000000]
xor r13d, r13d
mov edi, r9d
and edi, 0xfff
add edi, dword [r8]
add rdi, rax
mov rsi, rdi
sub rsi, r10
je 0x14009dbb6
mov r15d, 0x9d690795
movzx ecx, byte [r13 + r10]
inc r13
sub ecx, 0x6296f86b
add r12d, ecx
add ecx, ebx
mov eax, ecx
ror ecx, 5
imul eax, eax, 0x273c
rol eax, 5
xor eax, ecx
imul rax, r15
mov qword [rbp + 0x18], rax
shr rax, 0x20
add eax, dword [rbp + 0x18]
imul rax, r15
mov qword [rbp + 0x18], rax
mov ecx, dword [rbp + 0x18]
shr rax, 0x20
lea edx, [rcx - 0x7fffffff]
sar ecx, 0x1f
lea edx, [rdx + rax*2]
mov eax, 0x7fffffff
and ecx, eax
sub edx, ecx
mov ebx, edx
sar ebx, 0x1f
and ebx, eax
add ebx, edx
add r12d, ebx
cmp r13, rsi
jb 0x14009db43
mov r15, qword [rbp + 0x28]
mov dword [rbp + 0x14], ebx
mov dword [rbp + 0x10], r12d
shr r9d, 0xc
cmp r9d, 3
je 0x14009dbce
sub r9d, 0xa
neg r9d
sbb edx, edx
add edx, 3
jmp 0x14009dbd3
mov edx, 2
mov rax, qword [rdi]
mov r9, r15
neg r9
mov qword [rbp + 0x18], rax
sub edx, 2
je 0x14009dbfe
dec edx
je 0x14009dbef
or r9, 0xffffffffffffffff
jmp 0x14009dc08
add rax, r9
mov r9d, 8
mov qword [rbp + 0x18], rax
jmp 0x14009dc08
add dword [rbp + 0x18], r9d
mov r9d, 4
xor r10d, r10d
test r9, r9
je 0x14009dc89
mov r15d, 0x9d690795
movzx ecx, byte [rbp + r10 + 0x18]
inc r10
sub ecx, 0x6296f86b
add r12d, ecx
add ecx, ebx
mov eax, ecx
ror ecx, 5
imul eax, eax, 0x273c
rol eax, 5
xor eax, ecx
imul rax, r15
mov qword [rbp + 0x20], rax
shr rax, 0x20
add eax, dword [rbp + 0x20]
imul rax, r15
mov qword [rbp + 0x20], rax
shr rax, 0x20
mov ecx, dword [rbp + 0x20]
lea edx, [rcx - 0x7fffffff]
sar ecx, 0x1f
lea edx, [rdx + rax*2]
mov eax, 0x7fffffff
and ecx, eax
sub edx, ecx
mov ebx, edx
sar ebx, 0x1f
and ebx, eax
add ebx, edx
add r12d, ebx
cmp r10, r9
jb 0x14009dc16
mov r15, qword [rbp + 0x28]
mov dword [rbp + 0x14], ebx
mov dword [rbp + 0x10], r12d
mov rsi, qword [rsp + 0x38]
lea r10, [r9 + rdi]
mov rdi, qword [rsp + 0x30]
jmp 0x14009daa5
mov r13, qword [rsp + 0x40]
mov r15, qword [rsp + 0x48]
xor r8d, r8d
mov edi, 0x7fffffff
mov r14d, 0x9d690795
sub r13, r10
je 0x14009dd22
movzx ecx, byte [r8 + r10]
inc r8
sub ecx, 0x6296f86b
add r12d, ecx
add ecx, ebx
mov eax, ecx
ror ecx, 5
imul eax, eax, 0x273c
rol eax, 5
xor eax, ecx
imul rax, r14
mov qword [rbp + 0x18], rax
shr rax, 0x20
add eax, dword [rbp + 0x18]
imul rax, r14
mov qword [rbp + 0x18], rax
mov ecx, dword [rbp + 0x18]
shr rax, 0x20
lea edx, [rcx - 0x7fffffff]
sar ecx, 0x1f
and ecx, edi
lea edx, [rdx + rax*2]
sub edx, ecx
mov ebx, edx
sar ebx, 0x1f
and ebx, edi
add ebx, edx
add r12d, ebx
cmp r8, r13
jb 0x14009dcb9
mov dword [rbp + 0x14], ebx
mov dword [rbp + 0x10], r12d
mov r13, qword [rsp + 0x20]
mov rsi, qword [rsp + 0x28]
mov eax, dword [r15 + 4]
inc r13
add rsi, 8
mov qword [rsp + 0x20], r13
mov qword [rsp + 0x28], rsi
lea r11, [0x140000000]
cmp r13, rax
jb 0x14009d940
mov rax, qword [rbp + 0x10]
cmp rax, qword [0x14017dc28]
je 0x14009ddd1
mov rax, qword [0x14017dbb0]
xor ebx, ebx
mov r8d, 0xffff
imul rax, rax, 0x343fd
shl rbx, 0x10
shr r8, 0x10
add rax, 0x269ec3
mov rcx, rax
shr rcx, 0x10
movzx edx, cx
or rbx, rdx
test r8, r8
jne 0x14009dd6d
mov qword [0x14017dbb0], rax
call fcn.14009eca8
mov r11, rax
movabs rax, 0x8000800080008001
and r11, 0xfffffffffffff000
mul rbx
shr rdx, 0xf
imul rdx, rdx, 0xffff
sub rbx, rdx
mov rdx, r11
lea rcx, [rbx + 1]
call fcn.1400bd550
add rsp, 0x58
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret