Function at 0x180009970
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rdi
sub rsp, 0x40
mov rax, qword [0x18017a408]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rbx, rcx
mov rbp, r8
mov rcx, r8
mov rdi, rdx
call fcn.18000e820
test rbx, rbx
je 0x180009c8d
test rdi, rdi
je 0x180009c8d
or rax, 0xffffffffffffffff
mov rcx, rax
inc rcx
cmp byte [rdi + rcx], 0
jne 0x1800099b1
cmp rcx, 8
jb 0x180009c8d
inc rax
cmp byte [rbx + rax], 0
jne 0x1800099c4
cmp rax, 9
jb 0x180009c8d
mov r8d, 0x10
mov qword [rsp + 0x78], r14
mov rdx, rdi
lea rcx, [rsp + 0x20]
call fcn.18002b520
xor r8d, r8d
mov byte [rsp + 0x30], 0
mov r9d, r8d
lea r10, [rbx + 1]
lea r11d, [r8 + 7]
movsx eax, byte [r10 - 1]
movsx ecx, byte [r10]
sub ecx, eax
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
test r9d, r9d
jns 0x180009a1e
add r9d, eax
jmp 0x180009a21
sub r9d, eax
inc r10
sub r11, 1
jne 0x180009a02
mov eax, r9d
movabs r14, 0x7fffffe03ff
cdq
mov r9d, eax
xor r9d, edx
sub r9d, edx
lea edx, [r9 + 0x30]
lea eax, [rdx - 0x30]
cmp eax, 0x2a
ja 0x180009a56
movsxd rcx, eax
bt r14, rcx
jb 0x180009a84
lea eax, [rdx - 0x61]
cmp eax, 0x19
jbe 0x180009a84
mov edx, 0x7a
sub edx, r9d
lea eax, [rdx - 0x30]
cmp eax, 0x2a
ja 0x180009a76
cdqe
bt r14, rax
jb 0x180009a84
lea eax, [rdx - 0x61]
mov ecx, 0x78
cmp eax, 0x19
cmova edx, ecx
movsx eax, byte [rbx + 7]
movsx ecx, byte [rbx + 8]
xor ecx, eax
mov byte [rsp + 0x28], dl
movsx eax, byte [rbx + 6]
xor ecx, eax
movsx eax, byte [rbx + 5]
xor ecx, eax
movsx eax, byte [rbx + 4]
xor ecx, eax
movsx eax, byte [rbx + 3]
xor ecx, eax
movsx eax, byte [rbx + 2]
xor ecx, eax
movsx eax, byte [rbx + 1]
xor ecx, eax
movsx eax, byte [rbx]
xor ecx, eax
cmp ecx, 0x30
jge 0x180009ac7
movsx ecx, byte [rsp + 0x20]
inc ecx
movzx edi, byte [rsp + 0x21]
cmp ecx, 0x7a
jle 0x180009ad7
movsx ecx, dil
inc ecx
lea eax, [rcx - 0x30]
cmp eax, 0x2a
ja 0x180009ae7
cdqe
bt r14, rax
jb 0x180009af5
lea eax, [rcx - 0x61]
mov edx, 0x52
cmp eax, 0x19
cmova ecx, edx
mov byte [rsp + 0x29], cl
mov r9d, 1
mov ecx, r8d
nop dword [rax]
nop word [rax + rax]
movsx edx, byte [rsp + r9 + 0x1f]
movsx eax, byte [rsp + r9 + 0x20]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
test ecx, ecx
jns 0x180009b2b
add ecx, eax
jmp 0x180009b2d
sub ecx, eax
inc r9
cmp r9, 8
jl 0x180009b10
lea r9, [rbx + 2]
mov r10d, 8
movsx edx, byte [r9 - 2]
movsx eax, byte [r9]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
test ecx, ecx
jns 0x180009b58
add ecx, eax
jmp 0x180009b5a
sub ecx, eax
inc r9
sub r10, 1
jne 0x180009b40
mov eax, ecx
cdq
mov r9d, eax
xor r9d, edx
sub r9d, edx
lea edx, [r9 + 0x30]
lea eax, [rdx - 0x30]
cmp eax, 0x2a
ja 0x180009b84
movsxd rcx, eax
bt r14, rcx
jb 0x180009bb2
lea eax, [rdx - 0x61]
cmp eax, 0x19
jbe 0x180009bb2
mov edx, 0x7a
sub edx, r9d
lea eax, [rdx - 0x30]
cmp eax, 0x2a
ja 0x180009ba4
cdqe
bt r14, rax
jb 0x180009bb2
lea eax, [rdx - 0x61]
mov ecx, 0x6e
cmp eax, 0x19
cmova edx, ecx
mov byte [rsp + 0x2a], dl
mov rcx, r8
nop dword [rax]
movsx eax, byte [rcx + rbx]
add rcx, 2
xor r8d, eax
cmp rcx, 0xa
jl 0x180009bc0
movsx eax, byte [rsp + 0x27]
movsx ecx, byte [rsp + 0x26]
movsx edx, byte [rsp + 0x25]
xor ecx, eax
movsx r9d, byte [rsp + 0x22]
movsx r10d, byte [rsp + 0x23]
movsx r11d, byte [rsp + 0x24]
movsx eax, dil
xor ecx, eax
movsx eax, byte [rsp + 0x20]
xor ecx, eax
xor ecx, edx
xor ecx, r9d
xor ecx, r10d
xor ecx, r11d
xor r8d, ecx
cmp r8d, 0x30
jge 0x180009c19
lea r8d, [rdx + 0x14]
cmp r8d, 0x7a
jle 0x180009c23
lea r8d, [r9 - 0xa]
cmp r8d, 0x30
jge 0x180009c2d
lea r8d, [r10 + 0x14]
cmp r8d, 0x7a
jle 0x180009c37
lea r8d, [r11 - 0xa]
lea eax, [r8 - 0x30]
cmp eax, 0x2a
ja 0x180009c48
cdqe
bt r14, rax
jb 0x180009c58
lea eax, [r8 - 0x61]
mov ecx, 0x47
cmp eax, 0x19
cmova r8d, ecx
mov rdx, rbx
mov byte [rsp + 0x2b], r8b
mov rcx, rbp
mov byte [rsp + 0x2c], 0
call fcn.18000d160
mov dl, 0x5f
mov rcx, rbp
call fcn.18000d3a0
lea rdx, [rsp + 0x20]
mov rcx, rbp
call fcn.18000d160
mov r14, qword [rsp + 0x78]
mov al, 1
jmp 0x180009c8f
xor al, al
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1800c9b90
add rsp, 0x40
pop rdi
pop rbp
pop rbx
ret