Function at 0x140351db0
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
push rbp
sub rsp, 0x68
mov rdi, rcx
mov dword [rsp + 0xc8], r9d
mov r15, rdx
mov r12, r15
mov r14, rdi
mov r9d, dword [rdi + 0x18]
mov ebp, r9d
mov ebx, r9d
and ebp, 0x40
and ebx, 0x20
je 0x140351dee
mov r15, qword [r15]
mov r14, r12
jmp 0x140351dfe
test ebp, ebp
je 0x140351dfe
test r9d, 2
jne 0x140351dfe
mov r15, qword [r15]
mov rax, qword [r14 + 0x20]
mov r8d, r9d
add rax, qword [r14 + 0x10]
lea rsi, [rax + rax*2]
and r8d, 1
je 0x140351e2d
test r9d, 0x600
jne 0x140351e2d
cmp qword [rdi + rsi*8 + 0x70], 0
je 0x140351e2d
mov qword [rdi + rsi*8 + 0x70], 0
mov r10, qword [r14 + 0x20]
mov r13d, 1
test r10, r10
jle 0x140352018
mov rax, r10
mov ecx, 1
xor r11d, r11d
shr rax, 3
je 0x140351f59
mov dword [rsp + 0x20], r8d
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x38], r15
mov r15, rax
mov dword [rsp + 0x40], ebx
mov dword [rsp + 0x48], ebp
mov dword [rsp + 0x50], r9d
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x28], rdi
movsxd r11, r11d
lea r12, [r11 + r11*2]
inc r11d
shl r12, 6
mov eax, dword [r14 + r12 + 0xd8]
cdq
xor eax, edx
sub eax, edx
movsxd r9, eax
mov eax, dword [r14 + r12 + 0xc0]
cdq
xor eax, edx
sub eax, edx
movsxd r8, eax
mov eax, dword [r14 + r12 + 0xa8]
cdq
xor eax, edx
sub eax, edx
movsxd rdi, eax
mov eax, dword [r14 + r12 + 0x90]
cdq
xor eax, edx
sub eax, edx
movsxd rsi, eax
mov eax, dword [r14 + r12 + 0x78]
cdq
xor eax, edx
sub eax, edx
movsxd rbp, eax
mov eax, dword [r14 + r12 + 0x60]
cdq
xor eax, edx
sub eax, edx
movsxd rbx, eax
mov eax, dword [r14 + r12 + 0x48]
cdq
xor eax, edx
sub eax, edx
movsxd rcx, eax
mov eax, dword [r14 + r12 + 0x30]
cdq
xor eax, edx
sub eax, edx
movsxd rax, eax
imul r13, rax
imul r13, rcx
imul r13, rbx
imul r13, rbp
imul r13, rsi
imul r13, rdi
imul r13, r8
imul r13, r9
cmp r11, r15
jb 0x140351e7e
shl r11d, 3
movsxd rcx, r11d
mov r8d, dword [rsp + 0x20]
inc rcx
mov rsi, qword [rsp + 0x30]
mov r15, qword [rsp + 0x38]
mov ebx, dword [rsp + 0x40]
mov ebp, dword [rsp + 0x48]
mov r9d, dword [rsp + 0x50]
mov r12, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x28]
cmp rcx, r10
ja 0x140352018
sub r10, rcx
lea r11, [0x140000000]
inc r10
dec r10d
movzx eax, byte [r11 + r10 + 0x594800]
lea rax, [r11 + rax + 0x351f85]
jmp rax
test ebp, ebp
je 0x140352020
test ebx, ebx
je 0x140352025
mov rdx, r14
jmp 0x140352028
mov rdx, r12
test r8d, r8d
je 0x140352259
test r9d, 2
je 0x140352259
mov rcx, rdi
mov rdx, r12
call fcn.14034bf40
mov r8, qword [rdi + rsi*8 + 0x68]
test r8, r8
je 0x14035212d
mov rdx, r15
mov r10, qword [r8]
cmp r13, 1
jne 0x1403520bc
xor r11d, r11d
xor r9d, r9d
test r10, r10
jle 0x14035212d
mov r12d, dword [r9 + r8 + 8]
mov rdx, qword [r9 + r8 + 0x10]
mov rax, qword [r9 + r8 + 0x18]
cmp r12d, 1
je 0x14035228d
cmp r12d, 2
je 0x1403520a9
cmp r12d, 3
jne 0x14035209d
mov dword [rdx + r15], eax
jmp 0x1403520ae
cmp r12d, 4
jne 0x1403520ae
mov qword [rdx + r15], rax
jmp 0x1403520ae
mov word [rdx + r15], ax
inc r11d
add r9, 0x18
cmp r11, r10
jb 0x140352072
jmp 0x14035212d
mov r9d, 0
jb 0x14035212d
mov qword [rsp + 0x28], rdi
xor ecx, ecx
xor eax, eax
test r10, r10
jle 0x140352115
mov edi, dword [rax + r8 + 8]
mov r12, qword [rax + r8 + 0x10]
mov r11, qword [rax + r8 + 0x18]
cmp edi, 1
je 0x1403522c0
cmp edi, 2
je 0x140352105
cmp edi, 3
jne 0x1403520fa
mov dword [r12 + rdx], r11d
jmp 0x14035210a
cmp edi, 4
jne 0x14035210a
mov qword [r12 + rdx], r11
jmp 0x14035210a
mov word [r12 + rdx], r11w
inc ecx
add rax, 0x18
cmp rcx, r10
jb 0x1403520d2
cmp qword [r14 + 0x20], 0
jle 0x140352120
add rdx, qword [r14 + 8]
inc r9
cmp r9, r13
jb 0x1403520c9
mov rdi, qword [rsp + 0x28]
test ebp, ebp
je 0x140352135
test ebx, ebx
je 0x14035213a
or qword [r14 + 0x18], 1
mov rdi, qword [rdi + rsi*8 + 0x70]
test rdi, rdi
je 0x140352246
movsxd rbp, dword [rdi]
add rdi, 8
je 0x140352246
mov r8d, 1
cmp r13, 1
jb 0x140352246
mov rax, r13
mov rdx, r14
xor r13d, r13d
xor r14d, r14d
test rbp, rbp
jle 0x14035222f
mov qword [rsp + 0x30], r8
mov r12d, 2
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdx
mov r8d, dword [r14 + rdi]
cmp r8d, 3
cmove r8d, r12d
test r8d, r8d
je 0x1403521de
lea eax, [r8 - 1]
cmp eax, 1
ja 0x1403521b8
mov rsi, r15
mov rbx, qword [r14 + rdi + 0x10]
add rsi, qword [r14 + rdi + 8]
jmp 0x1403521e9
cmp r8d, 4
jne 0x1403521e9
mov rax, qword [r14 + rdi + 0x10]
mov rsi, r15
add rsi, qword [r14 + rdi + 8]
test byte [rax], 0x20
je 0x1403521d8
mov rbx, rsi
mov rsi, qword [rsi]
jmp 0x1403521e9
mov rbx, qword [rax + 0x30]
jmp 0x1403521e9
mov rbx, r15
add rbx, qword [r14 + rdi + 8]
mov rsi, qword [rbx]
test dword [rbx + 0x18], 0x200
jne 0x140352296
mov rcx, rbx
mov rdx, rsi
xor r8d, r8d
mov r9d, dword [rsp + 0xc8]
call fcn.140351300
test eax, eax
jne 0x140352248
inc r13
add r14, 0x18
cmp r13, rbp
jl 0x14035218f
mov r8, qword [rsp + 0x30]
mov rax, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x20]
cmp qword [rdx + 0x20], 0
jle 0x14035223a
add r15, qword [rdx + 8]
inc r8
cmp r8, rax
jbe 0x14035216b
xor eax, eax
add rsp, 0x68
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov rcx, r13
imul rcx, qword [r14 + 8]
mov r8d, dword [rsp + 0xc8]
mov qword [rsp + 0x20], rdx
call fcn.14035a550
mov rdx, qword [rsp + 0x20]
test eax, eax
je 0x1403522c9
add rsp, 0x68
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov byte [rdx + r15], al
jmp 0x1403520ae
mov rax, qword [rbx + 0x20]
mov rcx, rsi
add rax, qword [rbx + 0x10]
mov rdx, rbx
lea r9, [rax + rax*2]
lea r10, [r9*8 + 0x80]
movsxd r8, r10d
call fcn.14042ae90
mov rbx, rsi
jmp 0x1403521f6
mov byte [r12 + rdx], r11b
jmp 0x14035210a
mov r15, qword [rdx]
jmp 0x14035203e