Function at 0x100012b2c
Capabilities:
Encode data using xor
Encrypt data using salsa20 or chacha

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x1b0
mov rax, qword [0x100083348]
xor rax, rsp
mov qword [rsp + 0x1a0], rax
mov r12, rcx
mov qword [rsp + 0xe8], rcx
mov rbp, rdx
lea rsi, [rcx + 0x18]
mov rax, qword [rsi]
lea r8, [0x100079010]
mov ebx, dword [rax + 9]
mov r14d, dword [rax + 5]
mov r15d, dword [rax + 1]
mov qword [rsp + 0xf8], rdx
lea r9, [rax + 0xd]
mov ecx, 0xfffffff
lea rdx, [0x100000000]
and rbx, rcx
lea rdi, [r9 - 1]
shr r15, 1
and r14, rcx
and r15, rcx
add rbx, rdx
mov qword [rsp + 0xb0], r15
xor r13d, r13d
mov qword [rsp + 0xc8], rsi
mov qword [rsp + 0xf0], r14
mov qword [rsp + 0xd8], rbx
cmp rdi, r8
jb 0x100012c0f
mov ecx, dword [0x10001c66c]
mov eax, dword [0x10000dfa4]
imul ecx, eax
mov eax, ecx
add rax, r8
cmp rdi, rax
jae 0x100012c0f
mov rax, rdi
mov ecx, dword [0x10000dfa4]
sub rax, r8
cqo
idiv rcx
mov edx, dword [0x10000dfa4]
imul rdx, rax
add r8, rdx
lea rdx, [0x100000000]
jmp 0x100012c12
mov r8, r13
cmp r8, r13
jne 0x100012c21
mov r8, rdi
and r8, 0xffffffffffff0000
mov r11d, dword [0x10000dfa4]
sub r9, r8
mov r10d, ebx
lea rax, [r9 - 0x40]
cmp rax, r13
cmovl rax, r13
sub r11, r14
sub r10d, edx
lea rdi, [rax + r8]
xor eax, eax
inc r11
mov r9, r11
cmp r11, r13
lea ecx, [rax + 0x40]
rep stosb byte [rdi], al
mov rdi, r13
je 0x100012c8e
mov rdx, qword [0x100082270]
imul rdx, rdx, 0x343fd
shl rdi, 0x10
shr r9, 0x10
add rdx, 0x269ec3
mov rcx, rdx
shr rcx, 0x10
movzx eax, cx
or rdi, rax
cmp r9, r13
jne 0x100012c5f
mov qword [0x100082270], rdx
mov rax, rdi
xor edx, edx
mov ecx, r10d
div r11
lea r13, [rdx + r8]
mov r8, r13
mov rdx, r14
mov qword [rsp + 0x50], r13
mov eax, 0xfad14573
mov rdx, qword [r14 + rbx]
xor dil, dil
test r14, r14
mov byte [rsp + 0x20], dil
mov qword [rsp + 0x100], r14
mov qword [rsp + 0xb8], rbx
mov qword [rsp + 0xd0], rdx
mov qword [rsp + 0xc0], r13
je 0x10001354e
lea rcx, [rsp + 0xd0]
mov eax, 0xab5ea6a3
mov r9, qword [rsp + 0xd0]
mov r10d, dword [rsp + 0xd4]
lea rdx, [0x100000000]
mov rcx, rdx
and qword [rsp + 0x30], 0
mov eax, 0xfffffff
and r9, rax
and r10, rax
mov rax, qword [0x100033ac0]
add r9, rdx
sub rcx, rax
mov qword [rsp + 0x60], rcx
jne 0x100012dab
xor r11d, r11d
test r10, r10
je 0x1000130bd
mov r8d, dword [rsp + 0x30]
mov r15d, 0x637ce67c
mov edx, dword [rsp + 0x34]
movzx ecx, byte [r11 + r9]
inc r11
add ecx, r15d
add r8d, ecx
add ecx, edx
mov eax, ecx
imul eax, eax, 0x3041
rol eax, 0xc
ror ecx, 0xc
xor eax, ecx
imul rax, rax, 0x637ce67c
mov qword [rsp + 0x28], rax
shr rax, 0x20
mov ecx, dword [rsp + 0x28]
add eax, ecx
imul rax, rax, 0x637ce67c
mov qword [rsp + 0x28], rax
mov edx, dword [rsp + 0x28]
shr rax, 0x20
add edx, eax
add r8d, edx
cmp r11, r10
jb 0x100012d49
mov dword [rsp + 0x34], edx
mov dword [rsp + 0x30], r8d
jmp 0x1000130bd
movsxd rcx, dword [0x10000003c]
lea rax, [r9 + r10]
mov r8d, dword [rcx + rdx + 0xb0]
mov qword [rsp + 0xe0], rax
mov eax, r9d
sub eax, edx
add r8, rdx
mov r11d, eax
mov edx, dword [rcx + rdx + 0xb4]
mov ecx, eax
mov rbp, rcx
mov rax, 0xfffffffffffff000
lea r13, [rcx + r10]
and r11, rax
sub rbp, r11
mov r12, r13
and r12, rax
mov qword [rsp + 0x58], r12
sub r13, r12
add rdx, r8
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x40], r13
jmp 0x100012e1a
mov eax, dword [r8]
cmp rax, r11
jae 0x100012e1f
mov eax, dword [r8 + 4]
add r8, rax
cmp r8, rdx
jne 0x100012e0b
xor esi, esi
cmp r8, rdx
je 0x100012e5d
mov eax, dword [r8]
cmp rax, r11
jne 0x100012e5d
mov ecx, dword [r8 + 4]
sub rcx, 8
shr rcx, 1
je 0x100012e5d
lea rdx, [r8 + 8]
movzx eax, word [rdx]
and eax, 0xfff
cmp rax, rbp
jae 0x100012e58
inc rsi
add rdx, 2
cmp rsi, rcx
jne 0x100012e3f
mov rdx, qword [rsp + 0x38]
mov r15d, 0x637ce67c
mov r11d, dword [rsp + 0x30]
mov rbx, qword [rsp + 0x60]
mov r10d, dword [rsp + 0x34]
lea rdi, [0x100000000]
cmp r8, rdx
je 0x100013040
mov eax, dword [r8]
cmp rax, r12
ja 0x100013040
mov ecx, dword [r8 + 4]
lea rax, [rcx - 8]
shr rax, 1
cmp rsi, rax
jne 0x100012eba
add r8, rcx
cmp r8, rdx
je 0x100013040
mov eax, dword [r8]
cmp rax, r12
ja 0x100013040
xor esi, esi
jmp 0x100012e8e
mov eax, dword [r8]
cmp rax, r12
jne 0x100012ed6
movzx eax, word [r8 + rsi*2 + 8]
and eax, 0xfff
cmp rax, r13
jae 0x100013040
mov ecx, 0xf000
mov rax, rsi
inc rsi
test word [r8 + rax*2 + 8], cx
je 0x100012e79
xor r12d, r12d
movzx edx, word [r8 + rax*2 + 8]
mov ebp, edx
and ebp, 0xfff
add ebp, dword [r8]
add rbp, rdi
mov r13, rbp
sub r13, r9
je 0x100012f69
movzx ecx, byte [r12 + r9]
inc r12
add ecx, r15d
add r11d, ecx
add ecx, r10d
mov eax, ecx
imul eax, eax, 0x3041
rol eax, 0xc
ror ecx, 0xc
xor eax, ecx
imul rax, rax, 0x637ce67c
mov qword [rsp + 0x48], rax
shr rax, 0x20
mov ecx, dword [rsp + 0x48]
add eax, ecx
imul rax, rax, 0x637ce67c
mov qword [rsp + 0x48], rax
mov r10d, dword [rsp + 0x48]
shr rax, 0x20
add r10d, eax
add r11d, r10d
cmp r12, r13
jb 0x100012f08
mov dword [rsp + 0x34], r10d
mov dword [rsp + 0x30], r11d
mov rax, qword [rbp]
shr edx, 0xc
mov qword [rsp + 0x48], rax
cmp edx, 3
je 0x100012f88
sub edx, 0xa
neg edx
sbb r9d, r9d
add r9d, 3
jmp 0x100012f8e
mov r9d, 2
mov rdx, rbx
neg rdx
sub r9d, 2
je 0x100012fb5
cmp r9d, 1
je 0x100012fa6
or rdx, 0xffffffffffffffff
jmp 0x100012fbe
add rax, rdx
mov edx, 8
mov qword [rsp + 0x48], rax
jmp 0x100012fbe
add dword [rsp + 0x48], edx
mov edx, 4
xor r9d, r9d
test rdx, rdx
je 0x100013028
movzx ecx, byte [rsp + r9 + 0x48]
inc r9
add ecx, r15d
add r11d, ecx
add ecx, r10d
mov eax, ecx
imul eax, eax, 0x3041
rol eax, 0xc
ror ecx, 0xc
xor eax, ecx
imul rax, rax, 0x637ce67c
mov qword [rsp + 0x28], rax
shr rax, 0x20
mov ecx, dword [rsp + 0x28]
add eax, ecx
imul rax, rax, 0x637ce67c
mov qword [rsp + 0x28], rax
shr rax, 0x20
mov r10d, dword [rsp + 0x28]
add r10d, eax
add r11d, r10d
cmp r9, rdx
jb 0x100012fc6
mov dword [rsp + 0x34], r10d
mov dword [rsp + 0x30], r11d
mov r12, qword [rsp + 0x58]
lea r9, [rdx + rbp]
mov r13, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x38]
jmp 0x100012e79
mov r8, qword [rsp + 0xe0]
xor edx, edx
mov rbx, qword [rsp + 0xd8]
sub r8, r9
je 0x1000130b8
movzx ecx, byte [rdx + r9]
inc rdx
add ecx, r15d
add r11d, ecx
add ecx, r10d
mov eax, ecx
imul eax, eax, 0x3041
rol eax, 0xc
ror ecx, 0xc
xor eax, ecx
imul rax, rax, 0x637ce67c
mov qword [rsp + 0x28], rax
shr rax, 0x20
mov ecx, dword [rsp + 0x28]
add eax, ecx
imul rax, rax, 0x637ce67c
mov qword [rsp + 0x28], rax
shr rax, 0x20
mov r10d, dword [rsp + 0x28]
add r10d, eax
add r11d, r10d
cmp rdx, r8
jb 0x100013057
mov dword [rsp + 0x34], r10d
mov dword [rsp + 0x30], r11d
mov r13, qword [rsp + 0x50]
xor ecx, ecx
mov rax, rcx
inc rcx
and eax, 7
mov al, byte [rsp + rax + 0x30]
cmp rcx, 0x10
mov byte [rsp + rcx + 0x14f], al
jb 0x1000130bf
mov eax, 0xbb86d1a6
mov eax, dword [rsp + 0x15c]
mov edx, dword [rsp + 0x154]
mov ecx, dword [rsp + 0x158]
mov r11d, dword [rsp + 0x150]
mov rsi, r13
mov r12, rbx
and dword [rsp + 0x128], 0
and dword [rsp + 0x12c], 0
mov dword [rsp + 0x120], eax
xor ebp, ebp
mov dword [rsp + 0x148], eax
lea ebx, [rbp + 0x40]
mov eax, dword [0x10006a908]
and dword [rsp + 0x134], ebp
mov dword [rsp + 0x110], eax
mov eax, dword [0x10006a90c]
mov dword [rsp + 0x124], eax
mov eax, dword [0x10006a910]
mov dword [rsp + 0x138], eax
mov eax, dword [0x10006a914]
mov dword [rsp + 0x114], r11d
mov dword [rsp + 0x14c], eax
mov dword [rsp + 0x118], edx
mov dword [rsp + 0x11c], ecx
lea rax, [rsp + 0x160]
sub rsi, rax
sub r12, r13
mov dword [rsp + 0x13c], r11d
mov dword [rsp + 0x140], edx
mov dword [rsp + 0x144], ecx
mov qword [rsp + 0xe0], r12
mov dword [rsp + 0x130], ebp
lea rcx, [rsp + 0x70]
lea rdx, [rsp + 0x110]
mov qword [rsp + 0x60], rsi
mov r8, rbx
call sub.msvcrt.dll_memcpy
mov ebp, dword [rsp + 0x80]
mov ebx, dword [rsp + 0x88]
mov r15d, dword [rsp + 0x90]
mov edi, dword [rsp + 0x78]
mov edx, dword [rsp + 0xa8]
mov r14d, dword [rsp + 0x8c]
mov r13d, dword [rsp + 0x94]
mov r8d, dword [rsp + 0xa4]
mov ecx, dword [rsp + 0xac]
mov r11d, dword [rsp + 0x98]
mov r10d, dword [rsp + 0x9c]
mov eax, dword [rsp + 0x84]
mov r9d, dword [rsp + 0xa0]
mov esi, dword [rsp + 0x7c]
mov dword [rsp + 0x28], eax
mov r12d, dword [rsp + 0x28]
mov eax, dword [rsp + 0x74]
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x38], eax
mov qword [rsp + 0x58], 2
add eax, r9d
rol eax, 7
xor ebp, eax
mov eax, dword [rsp + 0x38]
add eax, ebp
rol eax, 9
xor r15d, eax
lea eax, [r15 + rbp]
rol eax, 0xd
xor r9d, eax
mov dword [rsp + 0x28], r9d
lea eax, [r15 + r9]
ror eax, 0xe
xor dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x40]
add eax, r12d
rol eax, 7
mov r9d, dword [rsp + 0x38]
xor r13d, eax
lea eax, [r12 + r13]
rol eax, 9
xor r8d, eax
lea eax, [r8 + r13]
rol eax, 0xd
xor dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x40]
add eax, r8d
ror eax, 0xe
xor r12d, eax
lea eax, [rbx + r11]
rol eax, 7
xor edx, eax
lea eax, [r11 + rdx]
rol eax, 9
xor edi, eax
lea eax, [rdi + rdx]
rol eax, 0xd
xor ebx, eax
lea eax, [rbx + rdi]
ror eax, 0xe
xor r11d, eax
lea eax, [r10 + rcx]
rol eax, 7
xor esi, eax
lea eax, [rcx + rsi]
rol eax, 9
xor r14d, eax
lea eax, [r14 + rsi]
rol eax, 0xd
xor r10d, eax
lea eax, [r10 + r14]
ror eax, 0xe
xor ecx, eax
mov eax, dword [rsp + 0x38]
add eax, esi
rol eax, 7
xor dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x74], eax
add eax, r9d
rol eax, 9
xor edi, eax
mov eax, dword [rsp + 0x40]
add eax, edi
rol eax, 0xd
xor esi, eax
lea eax, [rsi + rdi]
ror eax, 0xe
xor r9d, eax
mov eax, r9d
mov dword [rsp + 0x38], r9d
mov dword [rsp + 0x70], eax
lea eax, [r12 + rbp]
rol eax, 7
xor ebx, eax
mov r9d, dword [rsp + 0x28]
lea eax, [r12 + rbx]
rol eax, 9
xor r14d, eax
lea eax, [r14 + rbx]
rol eax, 0xd
xor ebp, eax
lea eax, [r14 + rbp]
ror eax, 0xe
xor r12d, eax
lea eax, [r11 + r13]
rol eax, 7
xor r10d, eax
lea eax, [r10 + r11]
rol eax, 9
xor r15d, eax
lea eax, [r10 + r15]
rol eax, 0xd
xor r13d, eax
lea eax, [r13 + r15]
ror eax, 0xe
xor r11d, eax
lea eax, [rcx + rdx]
rol eax, 7
xor r9d, eax
mov dword [rsp + 0xa0], r9d
lea eax, [rcx + r9]
rol eax, 9
xor r8d, eax
lea eax, [r8 + r9]
rol eax, 0xd
xor edx, eax
lea eax, [rdx + r8]
ror eax, 0xe
xor ecx, eax
sub qword [rsp + 0x58], 1
mov eax, dword [rsp + 0x38]
jne 0x100013247
mov dword [rsp + 0xac], ecx
mov dword [rsp + 0x88], ebx
mov dword [rsp + 0x84], r12d
mov r12, qword [rsp + 0xe0]
xor ecx, ecx
mov dword [rsp + 0x80], ebp
lea ebx, [rcx + 0x40]
mov ebp, dword [rsp + 0x130]
mov dword [rsp + 0x7c], esi
mov rsi, qword [rsp + 0x60]
mov dword [rsp + 0x78], edi
mov dil, byte [rsp + 0x20]
mov dword [rsp + 0xa8], edx
mov dword [rsp + 0xa4], r8d
mov dword [rsp + 0x9c], r10d
mov dword [rsp + 0x98], r11d
mov dword [rsp + 0x94], r13d
mov dword [rsp + 0x90], r15d
mov dword [rsp + 0x8c], r14d
mov eax, dword [rsp + rcx + 0x110]
add rcx, 4
add dword [rsp + rcx + 0x6c], eax
cmp rcx, rbx
jl 0x100013439
mov r8, rbx
lea rcx, [rsp + 0x160]
lea rdx, [rsp + 0x70]
call sub.msvcrt.dll_memcpy
inc ebp
mov r9, qword [rsp + 0x100]
mov dword [rsp + 0x130], ebp
cmp r9, rbx
jbe 0x1000134c4
lea r8, [r12 + rsi]
mov rdx, rbx
lea rcx, [rsp + 0x160]
mov al, byte [r8 + rcx]
xor al, byte [rcx]
mov byte [rsi + rcx], al
inc rcx
xor dil, al
sub rdx, 1
jne 0x100013487
add qword [rsp + 0xc0], rbx
sub r9, rbx
add rsi, rbx
add qword [rsp + 0xb8], rbx
mov byte [rsp + 0x20], dil
mov qword [rsp + 0x100], r9
jmp 0x1000131a8
mov rbx, qword [rsp + 0xd8]
xor edx, edx
mov r14, qword [rsp + 0xf0]
test r9, r9
je 0x100013529
mov r8, qword [rsp + 0xc0]
lea rax, [rsp + 0x160]
mov rbx, qword [rsp + 0xb8]
lea rcx, [rsp + 0x160]
sub rbx, rax
lea rax, [rsp + 0x160]
sub r8, rax
mov al, byte [rcx + rbx]
inc edx
xor al, byte [rcx]
mov byte [rcx + r8], al
xor dil, al
mov eax, edx
inc rcx
cmp rax, r9
jb 0x100013509
mov rbx, qword [rsp + 0xd8]
mov rsi, qword [rsp + 0xc8]
mov r15, qword [rsp + 0xb0]
mov r12, qword [rsp + 0xe8]
mov r13, qword [rsp + 0x50]
mov rbp, qword [rsp + 0xf8]
cmp dil, byte [r14 + rbx + 8]
je 0x100013615
call fcn.1000749ec
lea r10, [0x100010fb8]
mov r8, rsi
and r8, 0xfffffffffffffff8
mov ebx, 0xffff
mov r11, rax
lea r9, [r8 + 0xfff]
and r11, 0xfffffffffffff000
and r9, 0xfffffffffffff000
xor edi, edi
mov qword [r12 + 0x10], r10
mov rcx, qword [0x100082270]
imul rcx, rcx, 0x343fd
shl rdi, 0x10
shr rbx, 0x10
add rcx, 0x269ec3
mov rax, rcx
shr rax, 0x10
movzx edx, ax
or rdi, rdx
test rbx, rbx
jne 0x100013597
movabs rax, 0x8000800080008001
mul rdi
shr rdx, 0xf
mov qword [0x100082270], rcx
imul rdx, rdx, 0xffff
mov qword [rbp + 0x98], r11
sub rdi, rdx
inc rdi
mov qword [rbp + 0xb0], rdi
mov qword [rsp + 0xf0], rbx
jmp 0x10001360b
mov rax, qword [rsp + 0xf0]
mov qword [r8], rax
add r8, 8
cmp r8, r9
jb 0x1000135fc
jmp 0x100013742
mov rax, qword [0x100033ac0]
lea rcx, [0x100000000]
mov rsi, rbx
mov rbp, rcx
sub rsi, r13
sub rbp, rax
jne 0x10001363a
test rsi, rsi
je 0x100013722
mov r11, r13
xor edi, edi
sub r11, rbx
sub ebx, ecx
mov rcx, qword [0x10004bc78]
lea r12d, [r14 + rbx]
lea r14, [0x10004bc78]
lea r8d, [rcx - 1]
test r8d, r8d
js 0x10001368c
lea eax, [r8 + rdi]
cdq
sub eax, edx
sar eax, 1
movsxd rdx, eax
mov r9d, dword [r14 + rdx*4 + 4]
and r9d, 0xfffffff
cmp ebx, r9d
jae 0x100013682
lea r8d, [rax - 1]
jmp 0x100013687
jbe 0x1000136e5
lea edi, [rax + 1]
cmp r8d, edi
jge 0x10001365f
movsxd r10, edi
mov eax, ecx
cmp r10, rax
jae 0x100013722
lea r15, [0x100000000]
mov edx, dword [r14 + r10*4 + 4]
mov eax, edx
mov edi, 0xfffffff
and eax, edi
cmp eax, r12d
jae 0x10001371a
xor r9d, r9d
mov r8, rdx
and r8, rdi
mov edi, edx
sar edx, 0x1e
shl edi, 2
add r8, r15
and edx, 3
sar edi, 0x1e
and edi, 3
sub edi, 1
je 0x1000136ef
sub edi, 1
je 0x1000136ea
cmp edi, 1
jne 0x1000136f5
mov r9, rbp
jmp 0x1000136f5
movsxd r10, eax
jmp 0x10001368f
mov r9, rsi
jmp 0x1000136f5
mov r9, rbp
sub r9, rsi
sub edx, 2
je 0x100013705
cmp edx, 1
jne 0x100013710
add qword [r8 + r11], r9
jmp 0x100013709
add dword [r8 + r11], r9d
mov rcx, qword [0x10004bc78]
inc r10
mov eax, ecx
cmp r10, rax
jb 0x1000136a1
mov r15, qword [rsp + 0xb0]
mov eax, dword [0x10000dfa4]
mov eax, 0xb0ee827d
lea r10, [r13 + r15]
mov r12, qword [rsp + 0xe8]
mov rsi, qword [rsp + 0xc8]
mov qword [r12 + 0x10], r10
add qword [rsi], 0xd
mov rcx, qword [rsp + 0x1a0]
xor rcx, rsp
call fcn.100060d50
mov rbx, qword [rsp + 0x200]
add rsp, 0x1b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret