Function at 0x12830
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x58
lea r11, [0x00010000]
mov r14, qword [rcx + 0x10]
mov r15, rdx
mov r12, 0xfffffffffffff000
and qword [rax + 0x18], 0
mov r13, rcx
mov eax, 0xfffffff
mov r9d, dword [r14 + 5]
inc r14
and r9, rax
mov r8d, dword [r14]
mov rcx, r11
and r8, rax
mov rax, qword [0x000192b8]
add r9, r11
sub rcx, rax
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x20], rcx
jne 0x12926
xor r11d, r11d
test r8, r8
je 0x12c44
mov edx, dword [rsp + 0xb4]
mov r15d, 0xf3f4d523
mov r10d, dword [rsp + 0xb0]
movzx eax, byte [r11 + r9]
inc r11
sub eax, 0xc0b2add
add r10d, eax
add eax, edx
imul rax, r15
mov qword [rsp + 0xa0], rax
shr rax, 0x20
mov ecx, dword [rsp + 0xa0]
add ecx, eax
mov edx, ecx
imul edx, edx, 0xef74
rol edx, 3
ror ecx, 3
xor edx, ecx
imul edx, edx, 0xf3f4d523
ror edx, 0x14
add r10d, edx
cmp r11, r8
jb 0x128be
mov r15, qword [rsp + 0xa8]
mov dword [rsp + 0xb4], edx
mov dword [rsp + 0xb0], r10d
jmp 0x12c44
movsxd rdx, dword [0x0001003c]
lea rax, [r9 + r8]
mov qword [rsp + 0x38], rax
lea rax, [0x000100b0]
add rdx, rax
mov eax, r9d
sub eax, r11d
lea rsi, [rax + r8]
mov rdi, rsi
mov ebx, eax
mov r8d, dword [rdx]
mov r10d, eax
and r10, r12
add r8, r11
sub rbx, r10
and rdi, r12
mov r12d, dword [rdx + 4]
sub rsi, rdi
add r12, r8
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x30], rsi
jmp 0x12986
mov eax, dword [r8]
cmp rax, r10
jae 0x1298b
mov eax, dword [r8 + 4]
add r8, rax
cmp r8, r12
jne 0x12977
xor r11d, r11d
cmp r8, r12
je 0x129c5
mov eax, dword [r8]
cmp rax, r10
jne 0x129c5
mov ecx, dword [r8 + 4]
sub rcx, 8
shr rcx, 1
je 0x129c5
lea rdx, [r8 + 8]
movzx eax, word [rdx]
and eax, 0xfff
cmp rax, rbx
jae 0x129c5
inc r11
add rdx, 2
cmp r11, rcx
jne 0x129ac
lea r14, [0x00010000]
mov r13, qword [rsp + 0x20]
mov r15d, 0xf3f4d523
mov ebp, dword [rsp + 0xb0]
mov r10d, dword [rsp + 0xb4]
cmp r8, r12
je 0x12bad
mov eax, dword [r8]
cmp rax, rdi
ja 0x12bad
mov ecx, dword [r8 + 4]
lea rax, [rcx - 8]
shr rax, 1
cmp r11, rax
jne 0x12a28
add r8, rcx
cmp r8, r12
je 0x12bad
mov eax, dword [r8]
cmp rax, rdi
ja 0x12bad
xor r11d, r11d
jmp 0x129fb
mov eax, dword [r8]
cmp rax, rdi
jne 0x12a44
movzx eax, word [r8 + r11*2 + 8]
and eax, 0xfff
cmp rax, rsi
jae 0x12bad
mov rax, r11
inc r11
mov ecx, 0xf000
test word [r8 + rax*2 + 8], cx
je 0x129e6
movzx edx, word [r8 + rax*2 + 8]
xor esi, esi
mov edi, edx
and edi, 0xfff
add edi, dword [r8]
add rdi, r14
mov rbx, rdi
sub rbx, r9
je 0x12ad6
movzx eax, byte [rsi + r9]
inc rsi
sub eax, 0xc0b2add
add ebp, eax
add eax, r10d
imul rax, r15
mov qword [rsp + 0xb8], rax
shr rax, 0x20
mov ecx, dword [rsp + 0xb8]
add ecx, eax
mov r10d, ecx
imul r10d, r10d, 0xef74
rol r10d, 3
ror ecx, 3
xor r10d, ecx
imul r10d, r10d, 0xf3f4d523
ror r10d, 0x14
add ebp, r10d
cmp rsi, rbx
jb 0x12a75
mov dword [rsp + 0xb4], r10d
mov dword [rsp + 0xb0], ebp
mov rax, qword [rdi]
mov qword [rsp + 0xb8], rax
shr edx, 0xc
cmp edx, 3
je 0x12af7
sub edx, 0xa
neg edx
sbb r9d, r9d
add r9d, 3
jmp 0x12afd
mov r9d, 2
mov rdx, r13
neg rdx
sub r9d, 2
je 0x12b27
cmp r9d, 1
je 0x12b15
or rdx, 0xffffffffffffffff
jmp 0x12b33
add rax, rdx
mov edx, 8
mov qword [rsp + 0xb8], rax
jmp 0x12b33
add dword [rsp + 0xb8], edx
mov edx, 4
xor r9d, r9d
test rdx, rdx
je 0x12b9a
movzx eax, byte [rsp + r9 + 0xb8]
inc r9
sub eax, 0xc0b2add
add ebp, eax
add eax, r10d
imul rax, r15
mov qword [rsp + 0x20], rax
shr rax, 0x20
mov ecx, dword [rsp + 0x20]
add ecx, eax
mov r10d, ecx
imul r10d, r10d, 0xef74
rol r10d, 3
ror ecx, 3
xor r10d, ecx
imul r10d, r10d, 0xf3f4d523
ror r10d, 0x14
add ebp, r10d
cmp r9, rdx
jb 0x12b3b
mov dword [rsp + 0xb4], r10d
mov dword [rsp + 0xb0], ebp
mov rsi, qword [rsp + 0x30]
lea r9, [rdx + rdi]
mov rdi, qword [rsp + 0x28]
jmp 0x129e6
mov r13, qword [rsp + 0xa0]
mov r15, qword [rsp + 0xa8]
xor edx, edx
mov r14, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
sub rsi, r9
je 0x12c3d
mov r15d, 0xf3f4d523
movzx eax, byte [rdx + r9]
inc rdx
sub eax, 0xc0b2add
add ebp, eax
add eax, r10d
imul rax, r15
mov qword [rsp + 0xa0], rax
mov ecx, dword [rsp + 0xa0]
shr rax, 0x20
add ecx, eax
mov r10d, ecx
imul r10d, r10d, 0xef74
rol r10d, 3
ror ecx, 3
xor r10d, ecx
imul r10d, r10d, 0xf3f4d523
ror r10d, 0x14
add ebp, r10d
cmp rdx, rsi
jb 0x12bd4
mov r15, qword [rsp + 0xa8]
mov dword [rsp + 0xb4], r10d
mov dword [rsp + 0xb0], ebp
mov r12, 0xfffffffffffff000
lea rsi, [0x00010000]
add qword [r13 + 0x10], 0x11
mov eax, dword [r14 + 8]
mov ebp, 0xfffffff
and rax, rbp
mov rax, qword [rax + rsi]
xor rax, qword [rsp + 0xb0]
je 0x12d75
call fcn.00011784
mov rbx, rax
mov ecx, dword [0x00018c50]
lea r9, [r13 + 0x18]
and r9, 0xfffffffffffffff8
lea rdi, [fcn.00018bfc]
and rbx, r12
mov r11d, 0xffff
mov qword [r13 + 0x10], rdi
lea r10, [r9 + 0xfff]
and r10, r12
mov rax, qword [0x0001d670]
sub r10, rcx
xor r8d, r8d
imul rax, rax, 0x343fd
shl r8, 0x10
shr r11, 0x10
add rax, 0x269ec3
mov rcx, rax
shr rcx, 0x10
movzx edx, cx
or r8, rdx
test r11, r11
jne 0x12caf
mov qword [0x0001d670], rax
mov qword [r15 + 0x98], rbx
movabs rax, 0x8000800080008001
mul r8
shr rdx, 0xf
imul rdx, rdx, 0xffff
sub r8, rdx
inc r8
mov qword [r15 + 0xb0], r8
mov qword [rsp + 0xa0], r11
jmp 0x12d22
mov rax, qword [rsp + 0xa0]
mov qword [r9], rax
add r9, 8
cmp r9, r10
jb 0x12d13
mov qword [r13 + 0x10], rdi
mov eax, dword [r14 + 0xc]
and rax, rbp
movabs r8, 0xffff859109220000
mov rdx, qword [r15 + 0xb0]
mov rcx, rdx
xor rcx, r8
mov qword [r15 + 0x80], rdx
mov eax, dword [rax + rsi]
shl rcx, 0x10
xor rcx, rax
mov eax, dword [str.8_f]
xor rcx, rax
xor rcx, rdx
and qword [r15 + 0xb0], 0
mov qword [r15 + 0xa0], rcx
add rsp, 0x58
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret