Function at 0x140012904
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r13
push r14
push r15
movzx ecx, word [0x140048d00]
mov ebx, 1
movsxd r14, dword [r8 + 0x1c80]
mov r10, r8
mov rdi, qword [0x140048cb8]
mov r11, rdx
mov rsi, r9
mov eax, dword [r8 + rcx*4]
add eax, dword [0x140048d60]
mov r13b, byte [r8 + rcx*4]
add byte [0x140048cde], bl
movsxd rbp, eax
movzx eax, byte [0x140048cb2]
mov r15d, eax
add al, 0xff
mov byte [0x140048cb2], al
dec dword [rdx]
movsxd rcx, dword [rdx]
mov eax, dword [0x140048d64]
movsxd rdx, dword [0x140048cb4]
add eax, 0x6ba
movsxd r8, eax
mov rax, qword [0x140048d08]
movzx r12d, word [rax + rcx*2]
mov rax, qword [0x140048d58]
movzx r9d, word [rax + rcx*2]
movzx ecx, byte [rdx + rdi]
cmp r9d, ecx
jae 0x140012a5c
lea rbx, [r8 + r9*8]
dec edx
mov eax, 0x1212
mov dword [0x140048cb4], edx
cdq
idiv r9d
xor edx, edx
mov ecx, eax
movzx eax, word [0x140048d00]
mov dword [r10 + rax*4], ecx
mov rax, qword [0x140048d28]
mov eax, dword [rax + 0x1ae0]
add eax, r9d
inc r9d
add eax, r15d
cdqe
div qword [0x140048d40]
mov rdx, qword [0x140048ce0]
mov qword [0x140048d40], rax
mov eax, dword [0x140048d34]
movsxd r8, dword [r10]
add eax, eax
movsxd rcx, eax
mov eax, dword [rdx + r8*4]
imul eax, dword [rcx*8 + 0xdf8]
mov dword [rdx + r8*4], eax
xor edx, edx
movzx ecx, word [0x140048cdc]
mov eax, 0x17bf
sub eax, dword [0x140048d34]
add rcx, rcx
cdqe
div qword [rbx]
xor edx, edx
lea rbx, [rbx + 8]
div qword [rsi + rcx*8]
mov qword [rsi + rcx*8], rax
movsxd rdx, dword [0x140048cb4]
movzx ecx, byte [rdx + rdi]
cmp r9d, ecx
jl 0x1400129ae
mov ebx, 1
mov eax, dword [0x140048cec]
sub edx, ebx
mov r8, qword [0x140048cb8]
inc eax
movsxd rcx, eax
sub r8, rbx
mov rax, qword [0x140048d48]
imul rax, rcx
mov dword [0x140048cb4], edx
xor edx, edx
mov qword [0x140048d48], rax
movzx eax, r13b
mov qword [0x140048cb8], r8
lea ecx, [rax*2 + 9]
movzx eax, word [0x140048cdc]
div r8
sub rax, qword [rsi + rcx*8]
mov qword [rsi + rcx*8], rax
mov eax, dword [0x140048d10]
or eax, dword [0x140048d60]
xor eax, 0x4a
mov dword [0x140048d60], eax
mov eax, dword [r10 + 0x4200]
cdq
idiv dword [0x140048cd8]
mov eax, 0x1945
or word [r14 + rbp*8], dx
movsxd r9, dword [0x140048d14]
movsxd rcx, dword [r10 + r9*4]
cmp ecx, eax
je 0x140012b54
sub eax, ecx
lea r9, [r10 + rcx*4]
mov edi, eax
lea rbx, [rcx*8 + 0xdf8]
mov r8, rcx
movzx eax, word [r14 + rbp*4]
mov ecx, r15d
movsxd rdx, dword [0x140048cb4]
sub ecx, dword [0x140048d30]
xor ecx, eax
sub ecx, dword [0x140048d48]
mov eax, dword [r11 + rdx*4]
imul eax, ecx
mov dword [r11 + rdx*4], eax
xor edx, edx
dec dword [0x140048cb4]
mov rax, r8
div qword [rbx]
inc r8
lea rbx, [rbx + 8]
or dword [r9], edx
lea r9, [r9 + 4]
sub rdi, 1
jne 0x140012b00
mov r9d, dword [0x140048d14]
lea ebx, [rdi + 1]
movzx r8d, word [0x140048d00]
movsxd rdx, dword [0x140048ce8]
add r8w, bx
mov rbp, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x40]
mov word [0x140048d00], r8w
movsxd rcx, dword [r11]
mov rax, qword [rsi + rcx*8]
mov rsi, qword [rsp + 0x38]
xor rax, rdx
xor edx, edx
movzx ecx, r8w
div rcx
movsxd rcx, r9d
mov dword [r10 + rcx*4], eax
mov ecx, dword [0x140048d14]
add ecx, ebx
mov rbx, qword [rsp + 0x28]
mov dword [0x140048d14], ecx
lea eax, [rcx + rcx]
cdqe
mov eax, dword [r12 + rax*8 + 0xe75]
pop r15
pop r14
pop r13
pop r12
ret