Function at 0x140012364
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
movsxd r11, dword [0x140058fdc]
mov rbp, rcx
mov rcx, qword [rsp + 0xa0]
xor edx, edx
mov r15, qword [rsp + 0x88]
mov eax, 0x1dc3
mov rdi, qword [rsp + 0x90]
mov r14, r9
mov rsi, r8
movzx r10d, word [rcx + r11*2]
div r10d
movsxd r12, edx
mov rdx, qword [0x140058f50]
movsxd r10, dword [r15 + rdx*8]
lea rax, [rdx + rdx*2]
mov r13, qword [r15 + rax*8]
lea eax, [r11 + 0x258]
cdqe
mov qword [rsp + 0x18], rax
mov rax, qword [0x140058f78]
movsxd r9, dword [rbp + rax*4 + 0xc]
movzx eax, word [0x140058fd8]
xor r9, rax
mov rax, qword [r14]
mov qword [rsp + 0x10], r9
movzx r8d, word [rcx + rax*8]
movsxd rax, dword [0x140058fc0]
xor r8, qword [r15 + 0x89a8]
mov qword [rsp + 8], rax
movzx eax, byte [0x140058f42]
mov qword [rsp + 0x78], rax
lea eax, [r11 + 8]
movsxd rcx, eax
mov r11d, 0x1c80
movsxd rbx, dword [rsi + rcx*4]
mov qword [rsp], rbx
cmp r10d, r11d
jl 0x1400124ef
mov ebx, 0x307
lea rbp, [r10 + 3]
sub rbx, rdi
lea rsi, [rdi + r10*8]
mov rdi, qword [rsp + 0x70]
lea rbp, [r8 + rbp*2]
lea rcx, [rbx + rsi]
movsxd rax, r10d
mov qword [rcx + r14 - 0x307], rax
inc r10d
mov rax, qword [0x140058fe0]
mov rdx, qword [rax + 0x840]
add rdx, qword [rcx]
movzx eax, word [r12 + 0x2aaa]
or rdx, rax
mov rax, qword [rsi]
imul rax, rdx
mov qword [rsi], rax
lea rsi, [rsi + 8]
movzx ecx, word [rbp]
lea rbp, [rbp + 2]
mov rax, qword [r15]
mov r8, qword [0x140058f50]
movsxd r9, dword [rdi]
movzx eax, word [r13 + rax*4 + 0xc]
imul eax, ecx
mov rcx, qword [0x140058f38]
cdq
idiv dword [rcx + r8*4]
movzx ecx, byte [r9 + 0x27f8]
cdq
idiv ecx
mov byte [r9 + 0x27f8], al
cmp r10d, r11d
jge 0x140012456
mov rdi, qword [rsp + 0x90]
mov rsi, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x60]
mov r9, qword [rsp + 0x10]
mov rbx, qword [rsp]
mov r15, qword [rsp + 0x98]
mov r10d, 0x307
inc qword [r10]
mov rcx, qword [r10]
mov eax, dword [0x140058fbc]
add rcx, rcx
add eax, 0xfa1
xor dword [rbx + rcx*8], eax
mov rdx, qword [r10]
mov eax, dword [0x140058f84]
add eax, 4
movsxd r8, eax
mov rax, qword [rsp + 0x78]
mov cl, byte [rax + rdx*4]
lea rax, [rdx + rdx*2]
xor cl, byte [0x140058fc0]
xor edx, edx
sub cl, 0x2d
or cl, byte [r12 + rax*2]
or byte [r8 + r9], cl
dec dword [0x140058fc0]
inc qword [r10]
mov rax, qword [r10]
mov r8, qword [0x140058f90]
movzx r10d, byte [rax + 0x27f8]
mov eax, dword [0x140058fb8]
dec r10d
lea ecx, [rax + rax*2]
movsxd rax, dword [0x140058f98]
movsxd r9, ecx
mov rcx, qword [rsp + 8]
movzx ecx, word [rcx + rax*2]
mov rax, qword [0x140058f50]
shl rax, 5
mov rax, qword [rax + r15]
mov r15, qword [rsp + 0x88]
div rcx
sub rax, r11
or qword [r8 + r9*8], rax
mov r9d, 0x307
inc qword [rdi]
mov eax, dword [0x9d07]
xor eax, dword [0x140058fac]
or eax, dword [0x140058fe8]
mov rcx, qword [rdi]
mov r8, qword [rsp + 0x78]
or dword [r8 + rcx*4], eax
dec qword [r9]
mov ax, word [0xf367]
mov rcx, qword [r9]
sub ax, word [r13 + rcx*8 + 0xa]
mov word [r13 + rcx*8 + 0xa], ax
movzx eax, word [0x140058f40]
add eax, r10d
cdq
idiv r10d
cmp dword [0x140058f84], r11d
mov r10d, eax
mov dword [rsp + 0x70], eax
jg 0x1400126c7
lea r10, [r13 + 0xab00]
mov ebp, r9d
mov r13, qword [rsp + 0x18]
lea rbx, [r12 + 0x392e]
mov r12, qword [rsp + 0x98]
mov eax, 0x6d5
mov word [rbx], ax
lea rbx, [rbx + 2]
mov rcx, qword [0x140058f78]
movzx edx, word [r13 + rcx*8 + 0x42]
mov rcx, qword [rdi]
mov qword [rcx*8 + 0x307], rdx
mov rcx, qword [0x140058f78]
mov edx, dword [0x140058fe8]
dec rcx
mov qword [0x140058f78], rcx
add edx, ecx
movzx eax, word [r10]
lea r10, [r10 + 6]
or edx, eax
mov eax, dword [0x140058f84]
add eax, 4
movsxd rcx, eax
mov eax, r11d
inc r11d
mov dword [rsi + rcx*4], edx
cdq
idiv dword [0x140059018]
mov rax, qword [rbp]
movsxd r9, dword [0x140058fb8]
movsxd r8, edx
movzx ecx, byte [rax + 0x27f8]
xor r8, rcx
add qword [r12 + r9*8], r8
cmp r11d, dword [0x140058f84]
jge 0x140012620
mov rbp, qword [rsp + 0x60]
mov r9d, 0x307
mov rbx, qword [rsp]
mov r8, qword [rsp + 0x78]
mov r10d, dword [rsp + 0x70]
jmp 0x1400126cf
mov r12, qword [rsp + 0x98]
mov rcx, qword [0x140058fe8]
mov rax, qword [0x140058f50]
inc rcx
add rax, rax
mov qword [0x140058fe8], rcx
movsxd rax, dword [rbx + rax*8]
cmp rax, rcx
ja 0x1400127e4
mov eax, dword [rbp]
add eax, 0xc
movsxd rcx, eax
movzx eax, word [0x140058fa8]
cmp qword [r14 + rcx*8], rax
jne 0x1400127e4
inc qword [r9]
mov rax, qword [r9]
movsxd rcx, dword [0x140058fdc]
add rax, rax
mov r9, qword [rsp + 0xa0]
mov eax, dword [r8 + rax*8 + 4]
mov dword [rbx + rcx*4], eax
mov eax, dword [0x140058fb8]
mov rcx, qword [rsp + 0x80]
shl eax, 2
movsxd rdx, eax
mov rax, qword [rcx]
add rax, rax
movzx r8d, word [r9 + rdx*2]
xor edx, edx
or r8w, word [rcx + rax*8]
mov eax, dword [0x140058f98]
add eax, eax
movsxd rcx, eax
mov rax, qword [r14]
xor r8w, word [rdi + rcx*8]
mov word [r9 + rax*2 + 6], r8w
mov eax, dword [0x140058f98]
mov r9, qword [rsp + 8]
shl eax, 2
movsxd r8, eax
mov eax, dword [0x140058fb8]
add eax, eax
movsxd rcx, eax
mov eax, 0x9a2
div qword [r12 + rcx*8]
movabs rax, 0x1f7a5e1e3ff0474f
mov rcx, rdx
mul rdx
mov rax, qword [r15 + r8*8]
sub rcx, rdx
shr rcx, 1
add rcx, rdx
shr rcx, 0xc
imul rax, rcx
mov qword [r15 + r8*8], rax
mov eax, 0x307
inc dword [0x140058fb8]
mov r8, qword [rax]
mov eax, r10d
cdq
idiv dword [rbp + r8*4]
movzx ecx, word [r9 + r8*2 + 0x30]
cdq
idiv ecx
mov word [r9 + r8*2 + 0x30], ax
mov eax, dword [0x140058fdc]
xor rax, qword [0x140058f68]
mov rbx, qword [rsp + 0x68]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret