Function at 0x140012740
Capabilities:
Encode data using xor

Disassembly:
push rsi
sub rsp, 0x90
mov edx, dword [rcx + 0x1c]
mov rsi, rcx
cmp edx, 1
jne 0x140012768
cmp dword [rcx + 0x90], 7
jne 0x140012768
xor eax, eax
add rsp, 0x90
pop rsi
ret
cmp dword [rcx + 0x8b60], 0
mov qword [rsp + 0x88], rbx
mov qword [rsp + 0x80], rbp
mov qword [rsp + 0x78], rdi
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x68], r13
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x58], r15
jne 0x140012976
mov r10, qword [rcx + 0x8b58]
test r10, r10
je 0x140012976
mov eax, dword [rcx + 0x85bc]
mov r8, qword [rsi + 0x8630]
mov r9, qword [rcx + 0x86d0]
mov rdi, qword [r8 + 0x28]
mov rbx, qword [r8 + 0x30]
neg eax
mov rax, qword [r8 + 0x38]
sbb r15d, r15d
mov r11d, 0x10
and r15d, 3
lea rcx, [r9 - 1]
shl rcx, 4
sub rax, rcx
inc rax
cmp rax, r11
cmovb r11, rax
inc rdi
xor ebp, ebp
mov qword [rsp + 0xb0], r11
cmp rcx, rbx
jbe 0x140012808
mov ebx, ebp
jmp 0x14001280b
and ebx, 0xf
mov r14, qword [r8 + 0x20]
mov ecx, dword [rsi + 0x18]
movzx eax, byte [rsi + 0x80d1]
mov r13, qword [r8 + 0x40]
mov r11, qword [r10 + 0x8830]
movzx r10d, byte [rsi + 0x80d0]
cmp ecx, 4
mov r12, rbp
mov byte [rsp + 0xa8], al
mov rax, qword [r8 + 0x48]
sete r12b
shl r9, 7
add r12, 3
lea r8, [r9 - 0x80]
mov qword [rsp + 0xb8], rbx
add r12, qword [rsi + 0x28]
add r8, rax
mov qword [rsp + 0x20], r14
mov qword [rsp + 0x28], r8
mov qword [rsp + 0x30], r11
mov byte [rsp + 0xa0], r10b
cmp ecx, 7
je 0x140012881
cmp ecx, 4
jne 0x140012eb4
cmp edx, 1
jne 0x1400129aa
mov r9d, edx
test r15d, r15d
jne 0x140012896
mov eax, ebp
jmp 0x14001289f
lea ecx, [r15 - 1]
mov eax, r9d
shl eax, cl
lea ecx, [r15 + 7]
shl r9d, cl
add r9d, eax
mov rax, qword [rsp + 0xb0]
cmp rbx, rax
jae 0x140012976
mov r10, rbx
lea r11, [0x140265fb0]
mov rcx, r8
shl r10, 4
nop dword [rax + rax]
mov r8, r14
mov r14, qword [rcx + rbx*8]
cmp qword [rsp + 0x20], rdi
jae 0x140012959
mov rbx, qword [rsp + 0x30]
nop dword [rax]
nop word [rax + rax]
mov rax, r8
and eax, 0xf
add rax, r10
movzx ecx, byte [rax + r11]
mov rax, r8
and rax, 0xfffffffffffffff0
shl rax, 4
add rcx, rax
mov edx, dword [rbx + rcx*4]
mov ecx, r15d
add edx, r9d
sar edx, cl
test edx, edx
jns 0x14001291f
mov edx, ebp
jmp 0x140012929
mov eax, 0xff
cmp edx, eax
cmovg edx, eax
mov rax, qword [r13 + r8*8]
inc r8
add rax, qword [rsi + 0x80f0]
add rax, r14
mov byte [rax + r12], dl
cmp r8, rdi
jb 0x1400128f0
mov rbx, qword [rsp + 0xb8]
mov rax, qword [rsp + 0xb0]
mov rcx, qword [rsp + 0x28]
mov r14, qword [rsp + 0x20]
inc rbx
add r10, 0x10
mov qword [rsp + 0xb8], rbx
cmp rbx, rax
jb 0x1400128d0
xor eax, eax
mov r14, qword [rsp + 0x60]
mov r13, qword [rsp + 0x68]
mov r12, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x88]
mov r15, qword [rsp + 0x58]
add rsp, 0x90
pop rsi
ret
cmp edx, 2
jne 0x140012ab7
lea r9d, [rdx - 1]
test r15d, r15d
jne 0x1400129c0
mov eax, ebp
jmp 0x1400129c9
lea ecx, [r15 - 1]
mov eax, r9d
shl eax, cl
lea ecx, [r15 + 0xf]
shl r9d, cl
add r9d, eax
cmp rbx, qword [rsp + 0xb0]
jae 0x140012976
movzx eax, r10b
mov r10, rbx
lea r11, [0x140265fb0]
mov dword [rsp + 0xa0], eax
mov rax, qword [rsp + 0xb0]
shl r10, 4
mov rcx, r8
mov r8, r14
mov r14, qword [rcx + rbx*8]
cmp qword [rsp + 0x20], rdi
jae 0x140012a95
mov rbx, qword [rsp + 0x30]
nop dword [rax + rax]
mov rax, r8
and eax, 0xf
add rax, r10
movzx ecx, byte [rax + r11]
mov rax, r8
and rax, 0xfffffffffffffff0
shl rax, 4
add rcx, rax
mov edx, dword [rbx + rcx*4]
mov ecx, r15d
add edx, r9d
sar edx, cl
mov ecx, dword [rsp + 0xa0]
shl edx, cl
test edx, edx
jns 0x140012a58
mov edx, ebp
jmp 0x140012a62
mov eax, 0xffff
cmp edx, eax
cmovg edx, eax
mov rcx, qword [r13 + r8*8]
mov rax, qword [rsi + 0x80f0]
inc r8
add rcx, r14
add rcx, r12
mov word [rax + rcx*2], dx
cmp r8, rdi
jb 0x140012a20
mov rbx, qword [rsp + 0xb8]
mov rax, qword [rsp + 0xb0]
mov rcx, qword [rsp + 0x28]
mov r14, qword [rsp + 0x20]
inc rbx
add r10, 0x10
mov qword [rsp + 0xb8], rbx
cmp rbx, rax
jb 0x140012a01
jmp 0x140012976
cmp edx, 3
jne 0x140012bca
test r15d, r15d
je 0x140012ad0
lea ecx, [r15 - 1]
mov ebp, 1
shl ebp, cl
cmp rbx, qword [rsp + 0xb0]
jae 0x140012976
movzx eax, r10b
mov r10, rbx
lea r11, [0x140265fb0]
mov dword [rsp + 0xa0], eax
mov rax, qword [rsp + 0xb0]
mov r9d, 0x7fff
shl r10, 4
mov rcx, r8
nop dword [rax + rax]
mov r8, r14
mov r14, qword [rcx + rbx*8]
cmp qword [rsp + 0x20], rdi
jae 0x140012ba8
mov rbx, qword [rsp + 0x30]
nop word [rax + rax]
mov rax, r8
and eax, 0xf
add rax, r10
movzx ecx, byte [rax + r11]
mov rax, r8
and rax, 0xfffffffffffffff0
shl rax, 4
add rcx, rax
mov edx, dword [rbx + rcx*4]
mov ecx, r15d
add edx, ebp
sar edx, cl
mov ecx, dword [rsp + 0xa0]
shl edx, cl
cmp edx, 0xffff8000
jge 0x140012b6e
mov edx, 0xffff8000
jmp 0x140012b75
cmp edx, r9d
cmovg edx, r9d
mov rcx, qword [r13 + r8*8]
mov rax, qword [rsi + 0x80f0]
inc r8
add rcx, r14
add rcx, r12
mov word [rax + rcx*2], dx
cmp r8, rdi
jb 0x140012b30
mov rbx, qword [rsp + 0xb8]
mov rax, qword [rsp + 0xb0]
mov rcx, qword [rsp + 0x28]
mov r14, qword [rsp + 0x20]
inc rbx
add r10, 0x10
mov qword [rsp + 0xb8], rbx
cmp rbx, rax
jb 0x140012b10
jmp 0x140012976
cmp edx, 4
jne 0x140012cba
test r15d, r15d
je 0x140012be3
lea ecx, [r15 - 1]
mov ebp, 1
shl ebp, cl
mov rax, qword [rsp + 0xb0]
cmp rbx, rax
jae 0x140012976
mov r10, rbx
lea r11, [0x140265fb0]
mov r9d, 0x7fff
shl r10, 4
mov rcx, r8
nop dword [rax + rax]
mov r8, r14
mov r14, qword [rcx + rbx*8]
cmp qword [rsp + 0x20], rdi
jae 0x140012c98
mov rbx, qword [rsp + 0x30]
nop dword [rax]
nop word [rax + rax]
mov rax, r8
and eax, 0xf
add rax, r10
movzx ecx, byte [rax + r11]
mov rax, r8
inc r8
and rax, 0xfffffffffffffff0
shl rax, 4
add rcx, rax
mov edx, dword [rbx + rcx*4]
mov ecx, r15d
add edx, ebp
sar edx, cl
mov rcx, qword [r13 + r8*8 - 8]
mov eax, edx
and dx, r9w
add rcx, r14
sar eax, 0x1f
add rcx, r12
xor dx, ax
sub dx, ax
mov rax, qword [rsi + 0x80f0]
mov word [rax + rcx*2], dx
cmp r8, rdi
jb 0x140012c30
mov rbx, qword [rsp + 0xb8]
mov rax, qword [rsp + 0xb0]
mov rcx, qword [rsp + 0x28]
mov r14, qword [rsp + 0x20]
inc rbx
add r10, 0x10
mov qword [rsp + 0xb8], rbx
cmp rbx, rax
jb 0x140012c10
jmp 0x140012976
cmp edx, 6
jne 0x140012d9f
test r15d, r15d
je 0x140012cd3
lea ecx, [r15 - 1]
mov ebp, 1
shl ebp, cl
cmp rbx, qword [rsp + 0xb0]
jae 0x140012976
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0xb0]
mov r9, rbx
shl r9, 4
movzx r14d, r10b
lea r11, [0x140265fb0]
mov rdx, r8
mov r10, qword [rdx + rbx*8]
mov r8, rax
cmp rax, rdi
jae 0x140012d82
mov rbx, qword [rsp + 0x30]
nop dword [rax]
nop dword [rax + rax]
mov rax, r8
and eax, 0xf
add rax, r9
movzx ecx, byte [rax + r11]
mov rax, r8
inc r8
and rax, 0xfffffffffffffff0
shl rax, 4
add rcx, rax
mov rax, qword [rsi + 0x80f0]
mov edx, dword [rbx + rcx*4]
mov ecx, r15d
add edx, ebp
sar edx, cl
mov ecx, r14d
shl edx, cl
mov rcx, qword [r13 + r8*8 - 8]
add rcx, r10
add rcx, r12
mov dword [rax + rcx*4], edx
cmp r8, rdi
jb 0x140012d20
mov rbx, qword [rsp + 0xb8]
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0xb0]
mov rdx, qword [rsp + 0x28]
inc rbx
add r9, 0x10
mov qword [rsp + 0xb8], rbx
cmp rbx, rcx
jb 0x140012d03
jmp 0x140012976
cmp edx, 7
jne 0x140012eb4
test r15d, r15d
je 0x140012db8
lea ecx, [r15 - 1]
mov ebp, 1
shl ebp, cl
cmp rbx, qword [rsp + 0xb0]
jae 0x140012976
mov rax, rbx
lea rcx, [0x140265fb0]
shl rax, 4
mov qword [rsp + 0x38], rax
nop dword [rax]
mov rdx, qword [r8 + rbx*8]
mov qword [rsp + 0x40], rdx
cmp qword [rsp + 0x20], rdi
jae 0x140012e88
mov rbx, qword [rsp + 0x38]
nop dword [rax]
movzx edx, byte [rsp + 0xa8]
mov rax, r14
movzx r8d, r10b
and eax, 0xf
add rax, rbx
movzx ecx, byte [rax + rcx]
mov rax, r14
and rax, 0xfffffffffffffff0
shl rax, 4
add rcx, rax
mov eax, dword [r11 + rcx*4]
mov ecx, r15d
add eax, ebp
sar eax, cl
mov ecx, eax
call fcn.1400118d0
mov rcx, qword [r13 + r14*8]
mov rax, qword [rsi + 0x80f0]
add rcx, qword [rsp + 0x40]
movzx r10d, byte [rsp + 0xa0]
mov r11, qword [rsp + 0x30]
add rcx, r12
inc r14
movss dword [rax + rcx*4], xmm0
lea rcx, [0x140265fb0]
cmp r14, rdi
jb 0x140012e00
mov rbx, qword [rsp + 0xb8]
mov rax, qword [rsp + 0x38]
mov r8, qword [rsp + 0x28]
lea rcx, [0x140265fb0]
mov r14, qword [rsp + 0x20]
inc rbx
add rax, 0x10
mov qword [rsp + 0xb8], rbx
mov qword [rsp + 0x38], rax
cmp rbx, qword [rsp + 0xb0]
jb 0x140012de0
jmp 0x140012976
or eax, 0xffffffff
jmp 0x140012978