Function at 0x140065da0
Capabilities:
Encode data using xor

Disassembly:
push rdi
sub rsp, 0x30
mov edx, edx
mov r10, rcx
mov r9d, 0x400
mov dword [rcx], 0x4000400
mov qword [rsp + 0x58], rdx
test rdx, rdx
je 0x140065e1c
lea rax, [rcx + 0x104]
mov ecx, edx
nop word [rax + rax]
mov dword [rax - 0x100], 0x4000400
mov dword [rax - 0xfc], 0x4000400
mov dword [rax - 0xf8], 0x4000400
mov dword [rax - 0xf4], 0x4000400
mov dword [rax], 0x4000400
mov dword [rax + 4], 0x4000400
mov dword [rax + 8], 0x4000400
mov dword [rax + 0xc], 0x4000400
lea rax, [rax + 0x10]
dec rcx
jne 0x140065dd0
lea rdi, [r10 + 0x204]
movzx eax, r9w
mov ecx, 0x100
rep stosw word [rdi], ax
test r8b, r8b
jne 0x140066071
xor eax, eax
mov qword [rsp + 0x40], rax
test rdx, rdx
je 0x140066071
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rsi
mov qword [rsp + 0x18], r12
mov qword [rsp + 0x10], r13
mov qword [rsp + 8], r14
mov qword [rsp], r15
lea rdi, [0x1400a5900]
mov esi, dword [r10 + 0x4804]
mov r14d, eax
lea r12, [r10 + 0x404]
mov dword [r10 + r14*4 + 0x4808], esi
movzx ecx, word [r10]
xor r8d, r8d
mov eax, ecx
xor rcx, 0x7f0
shr rcx, 4
shr rax, 4
movzx edx, byte [rcx + rdi]
movzx ebp, byte [rax + rdi]
movzx ecx, word [r10 + 2]
mov eax, ecx
xor rcx, 0x7f0
mov dword [rsp + 0x50], ebp
shr rax, 4
shr rcx, 4
movzx r15d, byte [rax + rdi]
movzx r13d, byte [rcx + rdi]
imul rax, r14, 0x440
add r12, rax
add r15d, edx
add r13d, edx
test esi, esi
je 0x140066037
mov rbx, r12
nop dword [rax]
cmp r8d, 8
jae 0x140065f5b
xor r9d, r9d
lea edi, [r8 + 8]
lea r11, [r14*8]
lea rbp, [0x1400a5900]
nop dword [rax]
mov ecx, edi
shr edi, 1
and ecx, 1
mov eax, edi
add rax, r11
movzx edx, word [r10 + rax*2 + 4]
mov eax, ecx
neg eax
shr rdx, 4
shr rax, 4
and eax, 0x7f
xor rdx, rax
movzx eax, byte [rdx + rbp]
add r9d, eax
cmp edi, 1
jne 0x140065f10
mov eax, dword [rsp + 0x50]
inc r8d
add rbx, 4
add eax, r9d
mov dword [rbx - 4], eax
cmp r8d, esi
jb 0x140065ef0
jmp 0x140066030
cmp r8d, esi
jae 0x140066030
lea rbx, [r12 + r8*4]
lea rbp, [0x1400a5900]
nop
cmp r8d, 0x10
jae 0x140065fcc
xor r9d, r9d
mov edi, r8d
lea r11, [r14*8]
mov ecx, edi
shr edi, 1
and ecx, 1
mov eax, edi
add rax, r11
movzx edx, word [r10 + rax*2 + 0x104]
mov eax, ecx
neg eax
shr rdx, 4
shr rax, 4
and eax, 0x7f
xor rdx, rax
movzx eax, byte [rdx + rbp]
add r9d, eax
cmp edi, 1
jne 0x140065f84
lea eax, [r9 + r15]
inc r8d
add rbx, 4
mov dword [rbx - 4], eax
cmp r8d, esi
jb 0x140065f70
jmp 0x140066030
cmp r8d, esi
jae 0x140066030
lea r11, [r12 + r8*4]
nop word [rax + rax]
xor r9d, r9d
lea eax, [r8 + 0xf0]
nop word [rax + rax]
mov ecx, eax
shr eax, 1
movzx edi, word [r10 + rax*2 + 0x204]
and ecx, 1
neg ecx
shr rdi, 4
shr rcx, 4
and ecx, 0x7f
xor rdi, rcx
movzx ecx, byte [rdi + rbp]
add r9d, ecx
cmp eax, 1
jne 0x140065ff0
lea eax, [r9 + r13]
inc r8d
add r11, 4
mov dword [r11 - 4], eax
cmp r8d, esi
jb 0x140065fe0
lea rdi, [0x1400a5900]
mov rax, qword [rsp + 0x40]
inc rax
mov qword [rsp + 0x40], rax
cmp rax, qword [rsp + 0x58]
jb 0x140065e71
mov r15, qword [rsp]
mov r14, qword [rsp + 8]
mov r13, qword [rsp + 0x10]
mov r12, qword [rsp + 0x18]
mov rsi, qword [rsp + 0x20]
mov rbp, qword [rsp + 0x28]
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret