Function at 0x140351300
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
push rbp
sub rsp, 0x58
mov r13, rcx
mov r15, rdx
mov rbp, r13
mov dword [rsp + 0xb8], r9d
mov r14, r15
mov edi, dword [r13 + 0x18]
mov esi, edi
and esi, 0x20
je 0x140351337
mov r15, qword [r15]
mov rbp, r14
jmp 0x14035134a
test edi, 0x40
je 0x14035134a
test edi, 2
jne 0x14035134a
mov r15, qword [r15]
mov rax, qword [rbp + 0x20]
add rax, qword [rbp + 0x10]
lea r12, [rax + rax*2]
test edi, 1
je 0x140351377
test edi, 0x600
jne 0x140351377
cmp qword [r13 + r12*8 + 0x70], 0
je 0x140351377
mov qword [r13 + r12*8 + 0x70], 0
mov r9, qword [rbp + 0x20]
mov ebx, 1
test r9, r9
jle 0x14035154b
mov r8, r9
mov r11d, 1
xor r10d, r10d
shr r8, 3
je 0x14035148c
mov qword [rsp + 0x20], r12
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x38], edi
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x48], r13
movsxd r10, r10d
lea r15, [r10 + r10*2]
inc r10d
shl r15, 6
mov eax, dword [rbp + r15 + 0xd8]
cdq
xor eax, edx
sub eax, edx
movsxd r14, eax
mov eax, dword [rbp + r15 + 0xc0]
cdq
xor eax, edx
sub eax, edx
movsxd r13, eax
mov eax, dword [rbp + r15 + 0xa8]
cdq
xor eax, edx
sub eax, edx
movsxd r12, eax
mov eax, dword [rbp + r15 + 0x90]
cdq
xor eax, edx
sub eax, edx
movsxd r11, eax
mov eax, dword [rbp + r15 + 0x78]
cdq
xor eax, edx
sub eax, edx
movsxd rdi, eax
mov eax, dword [rbp + r15 + 0x60]
cdq
xor eax, edx
sub eax, edx
movsxd rsi, eax
mov eax, dword [rbp + r15 + 0x48]
cdq
xor eax, edx
sub eax, edx
movsxd rcx, eax
mov eax, dword [rbp + r15 + 0x30]
cdq
xor eax, edx
sub eax, edx
movsxd rax, eax
imul rbx, rax
imul rbx, rcx
imul rbx, rsi
imul rbx, rdi
imul rbx, r11
imul rbx, r12
imul rbx, r13
imul rbx, r14
cmp r10, r8
jb 0x1403513bb
shl r10d, 3
movsxd r11, r10d
mov r12, qword [rsp + 0x20]
inc r11
mov r15, qword [rsp + 0x28]
mov esi, dword [rsp + 0x30]
mov edi, dword [rsp + 0x38]
mov r14, qword [rsp + 0x40]
mov r13, qword [rsp + 0x48]
cmp r11, r9
ja 0x14035154b
sub r9, r11
lea r8, [0x140000000]
inc r9
dec r9d
movzx eax, byte [r8 + r9 + 0x5947f0]
lea rax, [r8 + rax + 0x3514b8]
jmp rax
test edi, 0x200
jne 0x14035177b
mov rcx, r13
mov rdx, r14
call fcn.14034bf40
mov r9, qword [r13 + r12*8 + 0x68]
test r9, r9
je 0x14035164a
mov r8, r15
mov r11, qword [r9]
cmp rbx, 1
jne 0x1403515d5
xor r10d, r10d
xor r8d, r8d
test r11, r11
jle 0x14035164a
mov r14d, dword [r8 + r9 + 8]
mov rdx, qword [r8 + r9 + 0x10]
mov rax, qword [r8 + r9 + 0x18]
cmp r14d, 1
je 0x1403517a8
cmp r14d, 2
je 0x1403515c2
cmp r14d, 3
jne 0x1403515b6
mov dword [rdx + r15], eax
jmp 0x1403515c7
cmp r14d, 4
jne 0x1403515c7
mov qword [rdx + r15], rax
jmp 0x1403515c7
mov word [rdx + r15], ax
inc r10d
add r8, 0x18
cmp r10, r11
jb 0x14035158b
jmp 0x14035164a
mov r10d, 0
jb 0x14035164a
mov qword [rsp + 0x48], r13
xor ecx, ecx
xor eax, eax
test r11, r11
jle 0x140351632
mov r13d, dword [rax + r9 + 8]
mov rdx, qword [rax + r9 + 0x10]
mov r14, qword [rax + r9 + 0x18]
cmp r13d, 1
je 0x1403517db
cmp r13d, 2
je 0x140351622
cmp r13d, 3
jne 0x140351616
mov dword [rdx + r8], r14d
jmp 0x140351627
cmp r13d, 4
jne 0x140351627
mov qword [rdx + r8], r14
jmp 0x140351627
mov word [rdx + r8], r14w
inc ecx
add rax, 0x18
cmp rcx, r11
jb 0x1403515eb
cmp qword [rbp + 0x20], 0
jle 0x14035163d
add r8, qword [rbp + 8]
inc r10
cmp r10, rbx
jb 0x1403515e2
mov r13, qword [rsp + 0x48]
test edi, 0x40
je 0x140351656
test esi, esi
je 0x14035165b
or qword [rbp + 0x18], 1
mov r13, qword [r13 + r12*8 + 0x70]
test r13, r13
je 0x140351768
movsxd rdi, dword [r13]
add r13, 8
je 0x140351768
mov r8d, 1
cmp rbx, 1
jb 0x140351768
mov rax, rbx
mov rdx, rbp
xor ebx, ebx
xor ebp, ebp
test rdi, rdi
jle 0x140351751
mov qword [rsp + 0x30], r8
mov r14d, 2
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdx
mov r8d, dword [rbp + r13]
cmp r8d, 3
cmove r8d, r14d
test r8d, r8d
je 0x140351700
lea eax, [r8 - 1]
cmp eax, 1
ja 0x1403516d9
mov r12, r15
mov rsi, qword [rbp + r13 + 0x10]
add r12, qword [rbp + r13 + 8]
jmp 0x14035170b
cmp r8d, 4
jne 0x14035170b
mov rax, qword [rbp + r13 + 0x10]
mov r12, r15
add r12, qword [rbp + r13 + 8]
test byte [rax], 0x20
je 0x1403516fa
mov rsi, r12
mov r12, qword [r12]
jmp 0x14035170b
mov rsi, qword [rax + 0x30]
jmp 0x14035170b
mov rsi, r15
add rsi, qword [rbp + r13 + 8]
mov r12, qword [rsi]
test dword [rsi + 0x18], 0x200
jne 0x1403517b1
mov rcx, rsi
mov rdx, r12
xor r8d, r8d
mov r9d, dword [rsp + 0xb8]
call fcn.1403517f0
test eax, eax
jne 0x14035176a
inc rbx
add rbp, 0x18
cmp rbx, rdi
jl 0x1403516af
mov r8, qword [rsp + 0x30]
mov rax, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x20]
cmp qword [rdx + 0x20], 0
jle 0x14035175c
add r15, qword [rdx + 8]
inc r8
cmp r8, rax
jbe 0x14035168d
xor eax, eax
add rsp, 0x58
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov rdx, rbp
mov r8d, dword [rsp + 0xb8]
mov rcx, rbx
imul rcx, qword [rbp + 8]
call fcn.14035a550
test eax, eax
je 0x1403517e4
add rsp, 0x58
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov byte [rdx + r15], al
jmp 0x1403515c7
mov rax, qword [rsi + 0x20]
mov rcx, r12
add rax, qword [rsi + 0x10]
mov rdx, rsi
lea r9, [rax + rax*2]
lea r10, [r9*8 + 0x80]
movsxd r8, r10d
call fcn.14042ae90
mov rsi, r12
jmp 0x140351718
mov byte [rdx + r8], r14b
jmp 0x140351627
mov r15, qword [rbp]
jmp 0x140351557