Function at 0x5134a0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
mov rdi, r9
mov rbp, rdx
mov r15, rcx
movsxd rsi, dword [r8 + 0x28]
mov r12, qword [r8 + 0x48]
cmp rsi, 1
jne 0x513557
movzx edx, word [rbp + 0x34]
xor eax, eax
test dx, dx
js 0x5135a3
test r12, r12
je 0x513823
mov r10, rsi
mov qword [rsp + 0x28], rdi
mov r9, rbp
mov rcx, qword [rbp + 8]
lea rax, [rdx + rdx*2]
mov rsi, qword [rcx + rax*8]
xor eax, eax
lea rdi, [0x005fade0]
xor edx, edx
jmp 0x51351d
test bpl, bpl
je 0x513947
add rdx, 1
movzx ebp, byte [rsi + rdx]
movzx ebx, byte [r12 + rdx]
cmp bpl, bl
je 0x513510
movzx ecx, byte [rbp + rdi]
cmp cl, byte [rbx + rdi]
je 0x513519
mov qword [rsp + 0x30], r15
mov rbp, r9
mov rsi, r10
mov r14, qword [rbp + 0x10]
test r14, r14
mov qword [rsp + 0x40], rax
jne 0x5135de
jmp 0x5137e7
mov rbx, qword [rsp + 0xc0]
test rbx, rbx
je 0x5135c0
mov r14, r8
mov rcx, qword [r15]
lea rdx, [rsi*4]
call fcn.00429840
test rax, rax
je 0x51381e
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], rdi
mov qword [rbx], rax
mov r8, r14
mov r14, qword [rbp + 0x10]
test r14, r14
mov qword [rsp + 0x40], rax
jne 0x5135de
jmp 0x5137e7
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], rdi
mov r14, qword [rbp + 0x10]
test r14, r14
mov qword [rsp + 0x40], rax
jne 0x5135de
jmp 0x5137e7
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], rdi
xor eax, eax
mov r14, qword [rbp + 0x10]
test r14, r14
mov qword [rsp + 0x40], rax
je 0x5137e7
mov r9d, esi
lea r13, [0x005fade0]
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x48], rsi
jmp 0x51361d
mov ecx, dword [r14 + 0x64]
mov edx, ecx
xor edx, 0xfffffffc
and edx, ecx
cmp edx, 2
je 0x513834
nop dword [rax + rax]
mov r14, qword [r14 + 0x28]
test r14, r14
je 0x5137e7
movzx ecx, word [r14 + 0x5e]
cmp r9d, ecx
jne 0x513610
cmp byte [r14 + 0x62], 0
je 0x513610
cmp qword [r14 + 0x48], 0
jne 0x513610
test r12, r12
je 0x5135f4
test r9d, r9d
jle 0x5137c3
mov rcx, qword [r14 + 8]
xor r15d, r15d
mov qword [rsp + 0x50], rcx
movzx ecx, word [rcx + r15*2]
test cx, cx
js 0x5137c6
mov r10, qword [rbp + 8]
lea r11, [rcx + rcx*2]
movzx esi, word [r10 + r11*8 + 0x12]
mov ecx, esi
xor ecx, 0xfdff
test cx, si
je 0x5136b0
mov rdi, qword [r10 + r11*8]
add rdi, 0xffffffffffffffff
cmp byte [rdi + 1], 0
lea rdi, [rdi + 1]
jne 0x513680
mov ecx, esi
xor ecx, 0xfffb
test cx, si
je 0x5136c0
nop
lea rsi, [rdi + 1]
cmp byte [rdi + 1], 0
mov rdi, rsi
jne 0x5136a0
jmp 0x5136c3
xor esi, esi
jmp 0x5136c7
mov rsi, rdi
add rsi, 1
test rsi, rsi
lea rax, [0x005fc4bb]
cmove rsi, rax
mov rcx, qword [r14 + 0x40]
mov rbp, qword [rcx + r15*8]
xor ebx, ebx
jmp 0x5136f9
test dil, dil
je 0x513720
add rbx, 1
movzx edi, byte [rbp + rbx]
movzx ecx, byte [rsi + rbx]
cmp dil, cl
je 0x5136f0
movzx edx, byte [rdi + r13]
cmp dl, byte [rcx + r13]
je 0x5136f5
jmp 0x5137ab
mov rbx, qword [r10 + r11*8]
xor r10d, r10d
mov rax, qword [rsp + 0x40]
mov rcx, r10
shl rcx, 4
mov rsi, qword [r8 + rcx + 0x48]
xor edi, edi
jmp 0x513748
test cl, cl
je 0x513770
add rdi, 1
movzx ecx, byte [rsi + rdi]
movzx ebp, byte [rbx + rdi]
cmp cl, bpl
je 0x513740
movzx ecx, byte [rcx + r13]
cmp cl, byte [rbp + r13]
je 0x513744
add r10, 1
cmp r10, r9
jne 0x51372c
jmp 0x5137d4
test rax, rax
je 0x513785
mov ecx, r10d
shl rcx, 4
mov ecx, dword [r8 + rcx + 0x40]
mov dword [rax + r15*4], ecx
mov rsi, qword [rsp + 0x48]
cmp esi, r10d
mov rbp, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x50]
je 0x5137c6
add r15, 1
cmp r15, r9
jne 0x51364f
jmp 0x51393f
mov rbp, qword [rsp + 0x38]
mov rax, qword [rsp + 0x40]
cmp r15d, r9d
jne 0x513610
jmp 0x51393f
xor r15d, r15d
cmp r15d, r9d
jne 0x513610
jmp 0x51393f
mov rbp, qword [rsp + 0x38]
cmp r15d, r9d
jne 0x513610
jmp 0x51393f
mov rsi, qword [rsp + 0x30]
cmp byte [rsi + 0xd7], 0
jne 0x513813
mov rax, qword [r8]
mov r9, qword [r8 + 0x10]
mov r8, qword [rax]
lea rdx, [0x006049b1]
mov rcx, rsi
call fcn.00419aa0
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsi]
mov rdx, rax
call fcn.00408130
mov eax, 1
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
test rax, rax
je 0x51393f
test r9d, r9d
jle 0x51393f
mov cl, 1
test cl, cl
je 0x51393f
lea rcx, [r9 - 1]
mov r10d, r9d
xor r10d, 0xfffffffc
and r10d, r9d
cmp rcx, 3
jae 0x51386b
xor ebp, ebp
jmp 0x5138f5
not r9d
mov esi, 0xfffffffc
not rsi
or rsi, r9
not rsi
lea rbx, [r8 + 0x40]
xor ebp, ebp
mov rdi, rsi
mov edx, dword [rbx]
mov dword [rax + rbp*4], edx
mov edx, ebp
and edx, 1
mov rcx, rbp
xor rcx, 1
or rcx, rdx
mov rdx, rcx
shl rdx, 4
mov edx, dword [r8 + rdx + 0x40]
mov dword [rax + rcx*4], edx
mov ecx, ebp
and ecx, 2
mov rdx, rbp
xor rdx, 2
or rdx, rcx
mov rcx, rdx
shl rcx, 4
mov ecx, dword [r8 + rcx + 0x40]
mov dword [rax + rdx*4], ecx
mov ecx, ebp
and ecx, 3
mov rdx, rbp
xor rdx, 3
or rdx, rcx
mov rcx, rdx
shl rcx, 4
mov ecx, dword [r8 + rcx + 0x40]
mov dword [rax + rdx*4], ecx
add rbp, 4
add rdi, 0xfffffffffffffffc
add rbx, 0x40
cmp rsi, rbp
jne 0x513885
test r10, r10
je 0x51393f
movabs r11, 0xdfad11e35535b15d
lea r9, [rax + rbp*4]
mov rcx, rbp
shl rcx, 4
lea rdi, [rcx + r8]
add rdi, 0x40
xor esi, esi
mov rcx, r11
not rcx
mov rdx, r10
mov ebx, dword [rdi]
mov dword [r9 + rsi*4], ebx
add rbp, 1
add rdx, r11
add rdx, rcx
add rsi, 1
add rdi, 0x10
cmp r10, rsi
jne 0x513922
mov rcx, qword [rsp + 0x28]
mov qword [rcx], r14
xor eax, eax
jmp 0x513823